Skip to content

Commit

Permalink
Merge pull request #174 from bact/remove-unused-code
Browse files Browse the repository at this point in the history
Remove unused code + add asserts in OwlToXSDTest.java test case
  • Loading branch information
goneall authored Dec 17, 2024
2 parents 43baad0 + 4ec316d commit 180ac2e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/test/java/org/spdx/tools/schema/OwlToXSDTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringWriter;

import org.apache.jena.ontology.OntModel;
import org.apache.jena.ontology.OntModelSpec;
Expand All @@ -16,8 +14,8 @@
import junit.framework.TestCase;

public class OwlToXSDTest extends TestCase {
static final String OWL_FILE_PATH = "testResources" + File.separator + "spdx-2-2-revision-8-onotology.owl.xml";

static final String OWL_FILE_PATH = "testResources" + File.separator + "spdx-2-2-revision-8-ontology.owl.xml";

protected void setUp() throws Exception {
super.setUp();
Expand All @@ -35,12 +33,11 @@ public void testConvertToXsd() throws IOException, XmlSchemaSerializerException,
otx = new OwlToXsd(model);
}
XmlSchema result = otx.convertToXsd();

try (StringWriter sw = new StringWriter()) {
result.write(sw);
String str = sw.toString();
int i = 0;
}

assertNotNull(result);
assertNotNull(result.getElementByName("Document"));
String expectedIRI = "http://spdx.org/rdf/terms";
assertEquals(expectedIRI, result.getTargetNamespace());
}

}

0 comments on commit 180ac2e

Please sign in to comment.