Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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());
}

}
Loading