Skip to content

Commit 180ac2e

Browse files
authored
Merge pull request #174 from bact/remove-unused-code
Remove unused code + add asserts in OwlToXSDTest.java test case
2 parents 43baad0 + 4ec316d commit 180ac2e

2 files changed

Lines changed: 7 additions & 10 deletions

File tree

src/test/java/org/spdx/tools/schema/OwlToXSDTest.java

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
import java.io.File;
44
import java.io.FileInputStream;
5-
import java.io.FileNotFoundException;
65
import java.io.IOException;
76
import java.io.InputStream;
8-
import java.io.StringWriter;
97

108
import org.apache.jena.ontology.OntModel;
119
import org.apache.jena.ontology.OntModelSpec;
@@ -16,8 +14,8 @@
1614
import junit.framework.TestCase;
1715

1816
public class OwlToXSDTest extends TestCase {
19-
20-
static final String OWL_FILE_PATH = "testResources" + File.separator + "spdx-2-2-revision-8-onotology.owl.xml";
17+
18+
static final String OWL_FILE_PATH = "testResources" + File.separator + "spdx-2-2-revision-8-ontology.owl.xml";
2119

2220
protected void setUp() throws Exception {
2321
super.setUp();
@@ -35,12 +33,11 @@ public void testConvertToXsd() throws IOException, XmlSchemaSerializerException,
3533
otx = new OwlToXsd(model);
3634
}
3735
XmlSchema result = otx.convertToXsd();
38-
39-
try (StringWriter sw = new StringWriter()) {
40-
result.write(sw);
41-
String str = sw.toString();
42-
int i = 0;
43-
}
36+
37+
assertNotNull(result);
38+
assertNotNull(result.getElementByName("Document"));
39+
String expectedIRI = "http://spdx.org/rdf/terms";
40+
assertEquals(expectedIRI, result.getTargetNamespace());
4441
}
4542

4643
}
File renamed without changes.

0 commit comments

Comments
 (0)