Tests for different in-memory setups
Project: http://git-wip-us.apache.org/repos/asf/jena/repo Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/9d6c8e7d Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/9d6c8e7d Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/9d6c8e7d Branch: refs/heads/master Commit: 9d6c8e7d511ea7d7c633e138de572c5cee6875e0 Parents: 204f253 Author: Andy Seaborne <a...@apache.org> Authored: Mon May 16 16:30:32 2016 +0100 Committer: Andy Seaborne <a...@apache.org> Committed: Mon May 16 16:30:32 2016 +0100 ---------------------------------------------------------------------- .../org/apache/jena/osgi/test/JenaOSGITest.java | 24 ++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/jena/blob/9d6c8e7d/apache-jena-osgi/jena-osgi-test/src/test/java/org/apache/jena/osgi/test/JenaOSGITest.java ---------------------------------------------------------------------- diff --git a/apache-jena-osgi/jena-osgi-test/src/test/java/org/apache/jena/osgi/test/JenaOSGITest.java b/apache-jena-osgi/jena-osgi-test/src/test/java/org/apache/jena/osgi/test/JenaOSGITest.java index 619d174..bc707a0 100644 --- a/apache-jena-osgi/jena-osgi-test/src/test/java/org/apache/jena/osgi/test/JenaOSGITest.java +++ b/apache-jena-osgi/jena-osgi-test/src/test/java/org/apache/jena/osgi/test/JenaOSGITest.java @@ -71,7 +71,7 @@ public class JenaOSGITest { @Configuration public Option[] config() { - return options( + return options( // OSGi container configuration karafDistributionConfiguration().frameworkUrl( maven().groupId("org.apache.karaf") @@ -122,8 +122,17 @@ public class JenaOSGITest { } @Test - public void testJenaArq() throws Exception { - Dataset dataset = DatasetFactory.createMem(); + public void testJenaArq1() throws Exception { + Dataset dataset = DatasetFactory.create(); + testJenaARQ(dataset) ; + } + + @Test + public void testJenaArq2() throws Exception { + Dataset dataset = DatasetFactory.createTxnMem(); + } + + public void testJenaARQ(Dataset dataset) throws Exception { dataset.addNamedModel(EXAMPLE_COM_GRAPH, makeModel()); // We test JSON-LD as it involves multiple other bundles @@ -157,7 +166,7 @@ public class JenaOSGITest { @Test public void testJenaIRI() throws Exception { - IRIFactory iriFactory = IRIFactory.jenaImplementation(); + IRIFactory iriFactory = IRIFactory.iriImplementation() ; IRI iri = iriFactory.create("http://example.com/"); assertEquals("http://example.com/", iri.toASCIIString()); } @@ -177,6 +186,13 @@ public class JenaOSGITest { dataset.end(); } + @Test + public void testMaking() { + DatasetFactory.createTxnMem() ; + DatasetFactory.create() ; + ModelFactory.createDefaultModel(); + } + private Model makeModel() { Model model = ModelFactory.createDefaultModel(); alice = model.createResource("http://example.com/alice");