01: package org.ontoware.rdfreactor.generator;
02:
03: import org.junit.Assert;
04: import org.junit.Test;
05: import org.ontoware.rdf2go.model.node.URI;
06: import org.ontoware.rdf2go.model.node.impl.URIImpl;
07: import org.ontoware.rdfreactor.generator.java.JClass;
08: import org.ontoware.rdfreactor.generator.java.JModel;
09: import org.ontoware.rdfreactor.generator.java.JPackage;
10:
11: public class TestJModel {
12:
13: @Test
14: public void testMapping() {
15:
16: JPackage jp = new JPackage("Package");
17: JClass root = new JClass(jp, "Rootclass", new URIImpl(
18: "urn:java:class.Rootclass"));
19: JModel jm = new JModel(root);
20:
21: URI testURI = new URIImpl("urn:test:classX");
22: JClass testClass = new JClass(jp, "Testclass", testURI);
23:
24: jm.addMapping(testURI, testClass);
25:
26: Assert.assertNotNull(jm.getMapping(testURI));
27: }
28:
29: }
|