jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cla...@apache.org
Subject svn commit: r1534038 [1/3] - in /jena/Experimental/new-test: ./ src/test/java/ src/test/java/com/hp/hpl/jena/graph/ src/test/java/com/hp/hpl/jena/graph/compose/ src/test/java/com/hp/hpl/jena/graph/impl/ src/test/java/com/hp/hpl/jena/mem/ src/test/java/...
Date Mon, 21 Oct 2013 06:41:00 GMT
Author: claude
Date: Mon Oct 21 06:40:58 2013
New Revision: 1534038

URL: http://svn.apache.org/r1534038
Log:
First cut at move to junit-contracts 0.0.2

Added:
    jena/Experimental/new-test/src/test/java/AltTest.java   (with props)
    jena/Experimental/new-test/src/test/java/BagTest.java   (with props)
    jena/Experimental/new-test/src/test/java/SeqTest.java   (with props)
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DyadicTest.java
      - copied, changed from r1530718, jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/AbstractDyadicTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/PolyadicTest.java   (with props)
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ModelGraphInterfaceContractTests.java
      - copied, changed from r1530718, jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/AbstractModelGraphInterfaceContractTests.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/testing_framework/ContractTemplate.java   (with props)
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/testing_framework/IIteratorProducer.java   (with props)
    jena/Experimental/new-test/src/test/java/dummy.java   (with props)
Removed:
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/AbstractDyadicTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/FileGraphSuite2.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/AbstractModelGraphInterfaceContractTests.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ModelTestBase.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/temp/ModelGraphInterfaceTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/temp/ModelLockTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/temp/ModelSuite.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/temp/RDFNodeTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/temp/RDFWriterFTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/temp/StatementTest.java
Modified:
    jena/Experimental/new-test/pom.xml
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/AbstractGraphSuite.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/GraphContractTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/GraphEventManagerContractTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/GraphMakerContractTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/GraphWithPerformContractTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/ReifierTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/TestGraphUtil.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/TestNode.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/TransactionHandlerContractTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DeltaSuite.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DeltaTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DifferenceSuite.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DifferenceTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DisjointUnionSuite.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DisjointUnionTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/IntersectionSuite.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/IntersectionTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/MultiUnionSuite.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/MultiUnionTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/PolyadicPrefixMappingTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/UnionTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/CollectionGraphSuite.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/CollectionGraphTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/FileGraphMakerTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/FileGraphSuite.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/FileGraphTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/SimpleEventManagerTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/SimpleGraphMakerTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/TripleStoreContractTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/WrappedGraphSuite.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/WrappedGraphTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/ArrayBunchTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/BunchMapContractTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/GraphMemSuite.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/GraphMemTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/GraphTripleStoreTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/HashedBunchMapTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/HashedTripleBunchTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/TripleBunchContractTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/WrappedHashMapTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/AbstractModelContractSuite.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/AbstractModelMakerTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/AltContractTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/BagContractTests.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ContainerContractTests.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/DefaultModelTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/LiteralContractTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/LockContractTests.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ModelConContractTests.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ModelContractTests.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ModelExtractTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ModelFactoryTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/PropertyContractTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/RDFListContractTests.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/RDFNodeContractTests.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/RDFReaderFContractTests.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/RDFWriterFContractTests.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ResourceContractTests.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/SeqContractTests.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/SimpleSelectorTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/StatementContractTests.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/impl/ModelComSuite.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/impl/ModelMakerImplTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/impl/PropertyImplTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/temp/AltMethodsTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/temp/BagMethodsTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/temp/ModelComTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/temp/ModelConTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/temp/ModelTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/temp/RDFListTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/temp/RDFReaderFTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/temp/ResourceNodeTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/temp/SeqMethodsTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/shared/PrefixMappingContractTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/shared/RandomOrderGraphTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/shared/impl/PrefixMappingTest.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/testing_framework/GraphEventManagerProducerInterface.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/testing_framework/GraphHelper.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/testing_framework/ModelHelper.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/testing_framework/TestUtils.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/testing_framework/package-info.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/util/iterator/ExtendedIteratorContractTests.java
    jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/util/iterator/WrappedIteratorTest.java

Modified: jena/Experimental/new-test/pom.xml
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/pom.xml?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/pom.xml (original)
+++ jena/Experimental/new-test/pom.xml Mon Oct 21 06:40:58 2013
@@ -31,7 +31,7 @@
   <dependency>
   	<groupId>org.xenei</groupId>
   	<artifactId>junit-contracts</artifactId>
-  	<version>0.0.1-SNAPSHOT</version>
+  	<version>0.0.2-SNAPSHOT</version>
   	<scope>test</scope>
   </dependency>
   </dependencies>

Added: jena/Experimental/new-test/src/test/java/AltTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/AltTest.java?rev=1534038&view=auto
==============================================================================
--- jena/Experimental/new-test/src/test/java/AltTest.java (added)
+++ jena/Experimental/new-test/src/test/java/AltTest.java Mon Oct 21 06:40:58 2013
@@ -0,0 +1,24 @@
+import com.hp.hpl.jena.rdf.model.Model;
+import com.hp.hpl.jena.rdf.model.ModelFactory;
+import com.hp.hpl.jena.rdf.model.Resource;
+import com.hp.hpl.jena.rdf.model.Alt;
+
+public class AltTest {
+
+	public static void main(String[] args) {
+		Model m1 = ModelFactory.createDefaultModel();
+		Resource r = m1.createResource();
+
+		Model m2 = ModelFactory.createDefaultModel();
+
+		Alt s = m2.getAlt(r);
+
+		System.out.println("Alt should be in m2");
+		System.out.println("Alt is " + (s.getModel() == m1 ? "" : "not ")
+				+ "in m1");
+		System.out.println("Alt is " + (s.getModel() == m2 ? "" : "not ")
+				+ "in m2");
+
+	}
+
+}

Propchange: jena/Experimental/new-test/src/test/java/AltTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: jena/Experimental/new-test/src/test/java/BagTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/BagTest.java?rev=1534038&view=auto
==============================================================================
--- jena/Experimental/new-test/src/test/java/BagTest.java (added)
+++ jena/Experimental/new-test/src/test/java/BagTest.java Mon Oct 21 06:40:58 2013
@@ -0,0 +1,24 @@
+import com.hp.hpl.jena.rdf.model.Model;
+import com.hp.hpl.jena.rdf.model.ModelFactory;
+import com.hp.hpl.jena.rdf.model.Resource;
+import com.hp.hpl.jena.rdf.model.Bag;
+
+public class BagTest {
+
+	public static void main(String[] args) {
+		Model m1 = ModelFactory.createDefaultModel();
+		Resource r = m1.createResource();
+
+		Model m2 = ModelFactory.createDefaultModel();
+
+		Bag s = m2.getBag(r);
+
+		System.out.println("Bag should be in m2");
+		System.out.println("Bag is " + (s.getModel() == m1 ? "" : "not ")
+				+ "in m1");
+		System.out.println("Bag is " + (s.getModel() == m2 ? "" : "not ")
+				+ "in m2");
+
+	}
+
+}

Propchange: jena/Experimental/new-test/src/test/java/BagTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: jena/Experimental/new-test/src/test/java/SeqTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/SeqTest.java?rev=1534038&view=auto
==============================================================================
--- jena/Experimental/new-test/src/test/java/SeqTest.java (added)
+++ jena/Experimental/new-test/src/test/java/SeqTest.java Mon Oct 21 06:40:58 2013
@@ -0,0 +1,48 @@
+import com.hp.hpl.jena.rdf.model.Model;
+import com.hp.hpl.jena.rdf.model.ModelFactory;
+import com.hp.hpl.jena.rdf.model.Resource;
+import com.hp.hpl.jena.rdf.model.Seq;
+import com.hp.hpl.jena.vocabulary.RDF;
+
+public class SeqTest {
+
+	public static void main(String[] args) {
+		Model m1 = ModelFactory.createDefaultModel();
+		Resource r = m1.createResource();
+
+		Model m2 = ModelFactory.createDefaultModel();
+
+		Seq s = m2.getSeq(r);
+
+		System.out.println("Seq should be in m2");
+		System.out.println("Seq is " + (s.getModel() == m1 ? "" : "not ")
+				+ "in m1");
+		System.out.println("Seq is " + (s.getModel() == m2 ? "" : "not ")
+				+ "in m2");
+
+		m1 = ModelFactory.createDefaultModel();
+		r = m1.createResource("http://example.com/foo");
+
+		m2 = ModelFactory.createDefaultModel();
+		m2.createResource("http://example.com/foo");
+
+		s = m2.getSeq(r);
+
+		System.out.println("Seq should be in m2");
+		System.out.println("Seq is " + (s.getModel() == m1 ? "" : "not ")
+				+ "in m1");
+		System.out.println("Seq is " + (s.getModel() == m2 ? "" : "not ")
+				+ "in m2");
+
+		m2.add(r, RDF.value, "foo");
+		s = m2.getSeq(r);
+
+		System.out.println("Seq should be in m2");
+		System.out.println("Seq is " + (s.getModel() == m1 ? "" : "not ")
+				+ "in m1");
+		System.out.println("Seq is " + (s.getModel() == m2 ? "" : "not ")
+				+ "in m2");
+
+	}
+
+}

Propchange: jena/Experimental/new-test/src/test/java/SeqTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/AbstractGraphSuite.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/AbstractGraphSuite.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/AbstractGraphSuite.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/AbstractGraphSuite.java Mon Oct 21 06:40:58 2013
@@ -17,43 +17,74 @@
  */
 package com.hp.hpl.jena.graph;
 
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+
+import org.junit.Ignore;
 import org.junit.runner.RunWith;
+import org.junit.runner.Runner;
 import org.junit.runners.Suite;
+import org.junit.runners.model.InitializationError;
 import org.xenei.junit.contract.Contract;
 import org.xenei.junit.contract.Contract.Inject;
 import org.xenei.junit.contract.ContractImpl;
 import org.xenei.junit.contract.ContractSuite;
+import org.xenei.junit.contract.Dynamic;
 
 import com.hp.hpl.jena.shared.PrefixMapping;
+import com.hp.hpl.jena.shared.PrefixMappingContractTest;
+
 import org.xenei.junit.contract.IProducer;
 
-@Suite.SuiteClasses({ AbstractGraphSuite.GraphTest.class,
-		AbstractGraphSuite.GraphReifierTest.class,
-		AbstractGraphSuite.ExtractTest.class,
-		AbstractGraphSuite.EventManagerTest.class,
-		AbstractGraphSuite.TransactionTest.class,
-		AbstractGraphSuite.PrefixMappingTest.class })
-public abstract class AbstractGraphSuite {
+@Ignore
+public abstract class AbstractGraphSuite implements Dynamic {
 
-	static protected IProducer<? extends Graph> graphProducer;
+	protected IProducer<? extends Graph> graphProducer;
 
-	public static void setGraphProducer(IProducer<? extends Graph> graphProducer) {
-		AbstractGraphSuite.graphProducer = graphProducer;
+	public Collection<Class<?>> getSuiteClasses()
+	{
+		Class<?>[] retval = { AbstractGraphSuite.GraphTest.class,
+			AbstractGraphSuite.GraphReifierTest.class,
+			AbstractGraphSuite.ExtractTest.class,
+			AbstractGraphSuite.EventManagerTest.class,
+			AbstractGraphSuite.TransactionTest.class,
+			AbstractGraphSuite.PrefixMappingTest.class };
+		return Arrays.asList(retval);
 	}
-
-	protected static class GraphTest extends GraphContractTest {
+	
+	interface G extends Graph{};
+	@RunWith(ContractSuite.class)
+	@ContractImpl(G.class)
+	protected static class GraphTest {
+		private  IProducer<? extends Graph> producer;
+		
 		public GraphTest() {
+			
 		}
-
-		@Override
-		public IProducer<? extends Graph> getGraphProducer() {
-			return AbstractGraphSuite.graphProducer;
+		
+		@Contract.Inject
+		public IProducer<? extends Graph> getProducer()
+		{
+			return producer;
+		}
+		
+		@Contract.Inject
+		public void setProducer(IProducer<? extends Graph> producer)
+		{
+			this.producer = producer;
 		}
+
 	}
 
 	protected static class GraphReifierTest extends ReifierTest {
 		public GraphReifierTest() {
-			super.graphProducer = AbstractGraphSuite.graphProducer;
+			//super.graphProducer = AbstractGraphSuite.graphProducer;
+		}
+		@Contract.Inject
+		public void setProducer( IProducer<? extends Graph> producer )
+		{
+			super.graphProducer = producer;
 		}
 	}
 
@@ -63,52 +94,57 @@ public abstract class AbstractGraphSuite
 		}
 	}
 
-	public static interface GEM extends GraphEventManager {
-	};
-
+	interface GEM extends GraphEventManager{};
 	@RunWith(ContractSuite.class)
 	@ContractImpl(GEM.class)
 	protected static class EventManagerTest {
+		
+		private IProducer<? extends Graph> producer;
+		
 		public EventManagerTest() {
-		};
+		}
 
-		@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
-		public IProducer<GraphEventManager> getEventManagerProducer() {
+		@Contract.Inject
+		public final IProducer<GraphEventManager> getProducer() {
 			return new IProducer<GraphEventManager>() {
 
 				@Override
 				public GraphEventManager newInstance() {
-					return graphProducer.newInstance().getEventManager();
+					return producer.newInstance().getEventManager();
 				}
 
 				@Override
 				public void cleanUp() {
-					// do nothing
+					producer.cleanUp();
 				}
 
 			};
 		}
+		
+		@Contract.Inject
+		public void setProducer( IProducer<? extends Graph> producer )
+		{
+			this.producer = producer;
+		}
 
 	}
 
-	public static interface TH extends TransactionHandler {
-	};
-
+	interface TT extends TransactionHandler{};
 	@RunWith(ContractSuite.class)
-	@ContractImpl(TH.class)
-	protected static class TransactionTest// extends
-											// AbstractTransactionHandlerTest
+	@ContractImpl(TT.class)
+	protected static class TransactionTest 
 	{
+		private IProducer<? extends Graph> producer;
 		public TransactionTest() {
-		};
+		}
 
-		@Inject( "org.xenei.junit.contract.IProducer<%s>" )
-		public IProducer<TransactionHandler> getTransactionHandlerProducer() {
+		@Contract.Inject
+		public final IProducer<TransactionHandler> getTransactionHandlerProducer() {
 			return new IProducer<TransactionHandler>() {
 
 				@Override
 				public TransactionHandler newInstance() {
-					return graphProducer.newInstance().getTransactionHandler();
+					return producer.newInstance().getTransactionHandler();
 				}
 
 				@Override
@@ -117,24 +153,30 @@ public abstract class AbstractGraphSuite
 				}
 			};
 		}
+		
+		@Contract.Inject
+		public void setProducer( IProducer<? extends Graph> producer )
+		{
+			this.producer = producer;
+		}
+		
 	}
 
-	public static interface PM extends PrefixMapping {
-	};
-
+	interface PM extends PrefixMapping {}
 	@RunWith(ContractSuite.class)
 	@ContractImpl(PM.class)
 	protected static class PrefixMappingTest {
+		private IProducer<? extends Graph> producer;
 		public PrefixMappingTest() {
 		};
 
-		@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
-		public IProducer<PrefixMapping> getMappingProducer() {
+		@Contract.Inject
+		public final IProducer<PrefixMapping> getPrefixMappingTestProducer() {
 			return new IProducer<PrefixMapping>() {
 
 				@Override
 				public PrefixMapping newInstance() {
-					return graphProducer.newInstance().getPrefixMapping();
+					return producer.newInstance().getPrefixMapping();
 				}
 
 				@Override
@@ -143,6 +185,11 @@ public abstract class AbstractGraphSuite
 				}
 			};
 		}
+		@Contract.Inject
+		public void setProducer( IProducer<? extends Graph> producer )
+		{
+			this.producer = producer;
+		}
 
 	}
 

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/GraphContractTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/GraphContractTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/GraphContractTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/GraphContractTest.java Mon Oct 21 06:40:58 2013
@@ -26,6 +26,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 import org.junit.After;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -40,6 +41,7 @@ import com.hp.hpl.jena.graph.GraphUtil;
 import com.hp.hpl.jena.graph.Node;
 import com.hp.hpl.jena.graph.Triple;
 import com.hp.hpl.jena.graph.impl.LiteralLabelFactory;
+import com.hp.hpl.jena.mem.GraphMem;
 import com.hp.hpl.jena.mem.TrackingTripleIterator;
 import com.hp.hpl.jena.rdf.model.Model;
 import com.hp.hpl.jena.rdf.model.ModelFactory;
@@ -49,6 +51,9 @@ import com.hp.hpl.jena.shared.ClosedExce
 import com.hp.hpl.jena.shared.DeleteDeniedException;
 import com.hp.hpl.jena.shared.PrefixMapping;
 import org.xenei.junit.contract.IProducer;
+
+import com.hp.hpl.jena.testing_framework.AbstractGraphProducer;
+import com.hp.hpl.jena.testing_framework.ContractTemplate;
 import com.hp.hpl.jena.testing_framework.NodeCreateUtils;
 import com.hp.hpl.jena.util.iterator.ClosableIterator;
 import com.hp.hpl.jena.util.iterator.ExtendedIterator;
@@ -62,25 +67,40 @@ import static com.hp.hpl.jena.testing_fr
  * to deliver a Graph of interest.
  */
 @Contract(Graph.class)
-public abstract class GraphContractTest {
+@Ignore
+public class GraphContractTest<T extends Graph> extends ContractTemplate<T> {
 
 	private static final Logger LOG = LoggerFactory
 			.getLogger(GraphContractTest.class);
 
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
-	public abstract IProducer<? extends Graph> getGraphProducer();
-
 	protected RecordingGraphListener GL = new RecordingGraphListener();
-
+	
+//	public GraphContractTest() {
+//		setProducer(  new AbstractGraphProducer<T>() {
+//
+//			@Override
+//			protected T createNewGraph() {
+//				return (T) new GraphMem();
+//			}
+//
+//		});
+//	}
+	
+	@Contract.Inject
+	public final void setGraphContractTestProducer(IProducer<T> graphProducer)
+	{
+		super.setProducer(graphProducer);
+	}
+	
 	@After
 	public final void afterAbstractGraphTest() {
-		getGraphProducer().cleanUp();
+		getProducer().cleanUp();
 		GL.clear();
 	}
 
 	@Test
 	public void testAdd_Triple() {
-		Graph graph = getGraphProducer().newInstance();
+		Graph graph = getProducer().newInstance();
 		graph.getEventManager().register(GL);
 		txnBegin(graph);
 		graph.add(triple("S P O"));
@@ -127,7 +147,7 @@ public abstract class GraphContractTest 
 	 */
 	@Test
 	public void testClear() {
-		Graph graph = getGraphProducer().newInstance();
+		Graph graph = getProducer().newInstance();
 		Graph base = copy(graph);
 
 		graph.getEventManager().register(GL);
@@ -139,7 +159,7 @@ public abstract class GraphContractTest 
 		GL.clear();
 
 		// test after adding
-		graph = graphWith(getGraphProducer().newInstance(),
+		graph = graphWith(getProducer().newInstance(),
 				"S P O; S e:ff 27; _1 P P3; S4 P4 'en'");
 		graph.getEventManager().register(GL);
 		txnBegin(graph);
@@ -160,8 +180,9 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testClose() {
-		Graph graph = graphWith(getGraphProducer().newInstance(),
+		Graph graph = graphWith(getProducer().newInstance(),
 				"S P O; S P2 O2; S3 P P3");
+System.out.println( "Graph type in close: "+ graph.getClass());
 		graph.getEventManager().register(GL);
 		assertFalse("Graph was constructed closed", graph.isClosed());
 
@@ -252,7 +273,7 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testContains_Node_Node_Node() {
-		Graph graph = graphWith(getGraphProducer().newInstance(),
+		Graph graph = graphWith(getProducer().newInstance(),
 				"S P O; S2 P2 O2; S3 P3 O3");
 
 		assertTrue(graph.contains(node("S"), node("P"), node("O")));
@@ -268,7 +289,7 @@ public abstract class GraphContractTest 
 	@Test
 	public void testContains_Node_Node_Node_RepeatedSubjectDoesNotConceal() {
 
-		Graph g = graphWith(getGraphProducer().newInstance(), "s P o; s Q r");
+		Graph g = graphWith(getProducer().newInstance(), "s P o; s Q r");
 		Node s = node("s");
 		Node P = node("P");
 		Node o = node("o");
@@ -287,17 +308,17 @@ public abstract class GraphContractTest 
 	public void testContains_Node_Node_Node_ByValue() {
 		Node x = node("x");
 		Node P = node("P");
-		if (getGraphProducer().newInstance().getCapabilities()
+		if (getProducer().newInstance().getCapabilities()
 				.handlesLiteralTyping()) {
-			Graph g1 = graphWith(getGraphProducer().newInstance(),
+			Graph g1 = graphWith(getProducer().newInstance(),
 					"x P '1'xsd:integer");
 			assertTrue(g1.contains(x, P, node("'01'xsd:int")));
 			//
-			Graph g2 = graphWith(getGraphProducer().newInstance(),
+			Graph g2 = graphWith(getProducer().newInstance(),
 					"x P '1'xsd:int");
 			assertTrue(g2.contains(x, P, node("'1'xsd:integer")));
 			//
-			Graph g3 = graphWith(getGraphProducer().newInstance(),
+			Graph g3 = graphWith(getProducer().newInstance(),
 					"x P '123'xsd:string");
 			assertTrue(g3.contains(x, P, node("'123'")));
 		}
@@ -316,7 +337,7 @@ public abstract class GraphContractTest 
 		Node x = node("x");
 		Node S = node("S");
 
-		Graph g = graphWith(getGraphProducer().newInstance(),
+		Graph g = graphWith(getProducer().newInstance(),
 				"s P o; _x _R _y; x S 0");
 		assertTrue(g.contains(s, P, o));
 		assertTrue(g.contains(_x, _R, _y));
@@ -337,7 +358,7 @@ public abstract class GraphContractTest 
 		Node y = node("y");
 		Node a = node("a");
 		Node b = node("b");
-		Graph g = graphWith(getGraphProducer().newInstance(), "x R y; a P b");
+		Graph g = graphWith(getProducer().newInstance(), "x R y; a P b");
 		assertTrue(g.contains(Node.ANY, R, y));
 		assertTrue(g.contains(x, Node.ANY, y));
 		assertTrue(g.contains(x, R, Node.ANY));
@@ -356,7 +377,7 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testContains_Triple() {
-		Graph graph = graphWith(getGraphProducer().newInstance(),
+		Graph graph = graphWith(getProducer().newInstance(),
 				"S P O; S2 P2 O2; S3 P3 O3");
 
 		assertTrue(graph.contains(triple("S P O")));
@@ -373,7 +394,7 @@ public abstract class GraphContractTest 
 	@Test
 	public void testContains_Triple_RepeatedSubjectDoesNotConceal() {
 
-		Graph g = graphWith(getGraphProducer().newInstance(), "s P o; s Q r");
+		Graph g = graphWith(getProducer().newInstance(), "s P o; s Q r");
 		assertTrue(g.contains(triple("s P o")));
 		assertTrue(g.contains(triple("s Q r")));
 		assertTrue(g.contains(triple("?? P o")));
@@ -385,17 +406,17 @@ public abstract class GraphContractTest 
 	@Test
 	public void testContains_Triple_ByValue() {
 
-		if (getGraphProducer().newInstance().getCapabilities()
+		if (getProducer().newInstance().getCapabilities()
 				.handlesLiteralTyping()) {
-			Graph g1 = graphWith(getGraphProducer().newInstance(),
+			Graph g1 = graphWith(getProducer().newInstance(),
 					"x P '1'xsd:integer");
 			assertTrue(g1.contains(triple("x P '01'xsd:int")));
 			//
-			Graph g2 = graphWith(getGraphProducer().newInstance(),
+			Graph g2 = graphWith(getProducer().newInstance(),
 					"x P '1'xsd:int");
 			assertTrue(g2.contains(triple("x P '1'xsd:integer")));
 			//
-			Graph g3 = graphWith(getGraphProducer().newInstance(),
+			Graph g3 = graphWith(getProducer().newInstance(),
 					"x P '123'xsd:string");
 			assertTrue(g3.contains(triple("x P '123'")));
 		}
@@ -403,7 +424,7 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testContains_Triple_Concrete() {
-		Graph g = graphWith(getGraphProducer().newInstance(),
+		Graph g = graphWith(getProducer().newInstance(),
 				"s P o; _x _R _y; x S 0");
 		assertTrue(g.contains(triple("s P o")));
 		assertTrue(g.contains(triple("_x _R _y")));
@@ -418,7 +439,7 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testContains_Triple_Fluid() {
-		Graph g = graphWith(getGraphProducer().newInstance(), "x R y; a P b");
+		Graph g = graphWith(getProducer().newInstance(), "x R y; a P b");
 		assertTrue(g.contains(triple("?? R y")));
 		assertTrue(g.contains(triple("x ?? y")));
 		assertTrue(g.contains(triple("x R ??")));
@@ -440,9 +461,9 @@ public abstract class GraphContractTest 
 	 */
 	@Test
 	public void testDelete_Triple() {
-		Graph graph = graphWith(getGraphProducer().newInstance(),
+		Graph graph = graphWith(getProducer().newInstance(),
 				"S P O; S2 P2 O2; S3 P3 O3");
-		Graph base = getGraphProducer().newInstance();
+		Graph base = getProducer().newInstance();
 		graph.getEventManager().register(GL);
 		txnBegin(graph);
 		graph.delete(triple("S P O"));
@@ -474,7 +495,7 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testDelete_Triple_FromNothing() {
-		Graph g = getGraphProducer().newInstance();
+		Graph g = getProducer().newInstance();
 		g.getEventManager().register(GL);
 		txnBegin(g);
 		g.delete(triple("quint rdf:subject S"));
@@ -489,7 +510,7 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testFind_Node_Node_Node() {
-		Graph graph = graphWith(getGraphProducer().newInstance(),
+		Graph graph = graphWith(getProducer().newInstance(),
 				"S P O; S2 P2 O2; S3 P3 O3");
 		List<Triple> s = graph.find(Node.ANY, Node.ANY, Node.ANY).toList();
 		assertEquals(3, s.size());
@@ -533,7 +554,7 @@ public abstract class GraphContractTest 
 		Node x = node("x");
 		Node y = node("y");
 		Node z = node("z");
-		Graph g = graphWith(getGraphProducer().newInstance(), "x y z ");
+		Graph g = graphWith(getProducer().newInstance(), "x y z ");
 		Set<Triple> expect = tripleSet("x y z");
 		assertEquals(expect, g.find(Node.ANY, y, z).toSet());
 		assertEquals(expect, g.find(x, Node.ANY, z).toSet());
@@ -542,7 +563,7 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testFind_Node_Node_Node_ProgrammaticValues() {
-		Graph g = getGraphProducer().newInstance();
+		Graph g = getProducer().newInstance();
 		if (g.getCapabilities().handlesLiteralTyping()) {
 			Node ab = NodeFactory.createLiteral(LiteralLabelFactory
 					.create(new Byte((byte) 42)));
@@ -580,7 +601,7 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testFind_Node_Node_Node_MatchLanguagedLiteralCaseInsensitive() {
-		Graph m = graphWith(getGraphProducer().newInstance(), "a p 'chat'en");
+		Graph m = graphWith(getProducer().newInstance(), "a p 'chat'en");
 		if (m.getCapabilities().handlesLiteralTyping()) {
 			Node chaten = node("'chat'en"), chatEN = node("'chat'EN");
 			assertDiffer(chaten, chatEN);
@@ -593,7 +614,7 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testFind_Node_Node_Node_NoMatchAgainstUnlanguagesLiteral() {
-		Graph m = graphWith(getGraphProducer().newInstance(),
+		Graph m = graphWith(getProducer().newInstance(),
 				"a p 'chat'en; a p 'chat'");
 		if (m.getCapabilities().handlesLiteralTyping()) {
 			Node chaten = node("'chat'en"), chatEN = node("'chat'EN");
@@ -607,7 +628,7 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testFind_Triple() {
-		Graph graph = graphWith(getGraphProducer().newInstance(),
+		Graph graph = graphWith(getProducer().newInstance(),
 				"S P O; S2 P2 O2; S3 P3 O3");
 		List<Triple> s = graph.find(Triple.ANY).toList();
 		assertEquals(3, s.size());
@@ -647,7 +668,7 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testFind_Triple_ByFluidTriple() {
-		Graph g = graphWith(getGraphProducer().newInstance(), "x y z ");
+		Graph g = graphWith(getProducer().newInstance(), "x y z ");
 		Set<Triple> expect = tripleSet("x y z");
 		assertEquals(expect, g.find(triple("?? y z")).toSet());
 		assertEquals(expect, g.find(triple("x ?? z")).toSet());
@@ -656,7 +677,7 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testFind_Triple_ProgrammaticValues() {
-		Graph g = getGraphProducer().newInstance();
+		Graph g = getProducer().newInstance();
 		if (g.getCapabilities().handlesLiteralTyping()) {
 			Node ab = NodeFactory.createLiteral(LiteralLabelFactory
 					.create(new Byte((byte) 42)));
@@ -694,7 +715,7 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testFind_Triple_MatchLanguagedLiteralCaseInsensitive() {
-		Graph m = graphWith(getGraphProducer().newInstance(), "a p 'chat'en");
+		Graph m = graphWith(getProducer().newInstance(), "a p 'chat'en");
 		if (m.getCapabilities().handlesLiteralTyping()) {
 			Node chaten = node("'chat'en"), chatEN = node("'chat'EN");
 			assertDiffer(chaten, chatEN);
@@ -709,7 +730,7 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testFind_Triple_NoMatchAgainstUnlanguagesLiteral() {
-		Graph m = graphWith(getGraphProducer().newInstance(),
+		Graph m = graphWith(getProducer().newInstance(),
 				"a p 'chat'en; a p 'chat'");
 		if (m.getCapabilities().handlesLiteralTyping()) {
 			Node chaten = node("'chat'en"), chatEN = node("'chat'EN");
@@ -725,7 +746,7 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testGetCapabilities() {
-		Graph g = getGraphProducer().newInstance();
+		Graph g = getProducer().newInstance();
 		Capabilities c = g.getCapabilities();
 		assertNotNull("Capabilities are not returned", c);
 		try {
@@ -762,13 +783,13 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testGetEventManager() {
-		assertNotNull("Must return an EventManager", getGraphProducer()
+		assertNotNull("Must return an EventManager", getProducer()
 				.newInstance().getEventManager());
 	}
 
 	@Test
 	public void testGetPrefixMapping() {
-		Graph g = getGraphProducer().newInstance();
+		Graph g = getProducer().newInstance();
 		PrefixMapping pm = g.getPrefixMapping();
 		assertNotNull("Must return prefix mapping", pm);
 		assertSame("getPrefixMapping must always return the same object", pm,
@@ -785,7 +806,7 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testGetStatisticsHandler() {
-		Graph g = getGraphProducer().newInstance();
+		Graph g = getProducer().newInstance();
 		GraphStatisticsHandler sh = g.getStatisticsHandler();
 		if (sh != null) {
 			assertSame(
@@ -796,14 +817,14 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testGetTransactionHandler() {
-		Graph g = getGraphProducer().newInstance();
+		Graph g = getProducer().newInstance();
 		assertNotNull("Must return a Transaction handler",
 				g.getTransactionHandler());
 	}
 
 	@Test
 	public void testIsClosed() {
-		Graph g = getGraphProducer().newInstance();
+		Graph g = getProducer().newInstance();
 		assertFalse("Graph created in closed state", g.isClosed());
 		g.close();
 		assertTrue("Graph does not report closed state after close called",
@@ -812,7 +833,7 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testIsEmpty() {
-		Graph g = getGraphProducer().newInstance();
+		Graph g = getProducer().newInstance();
 		if (!g.isEmpty()) {
 			LOG.warn(String.format(
 					"Graph type %s can not be empty (Empty test skipped)",
@@ -821,12 +842,12 @@ public abstract class GraphContractTest 
 			graphAddTxn(g, "S P O");
 			assertFalse("Graph reports empty after add", g.isEmpty());
 			txnBegin(g);
-			g.add(NodeCreateUtils.createTriple("A B C"));
+			g.add(NodeCreateUtils.createTriple("Foo B C"));
 			g.delete(NodeCreateUtils.createTriple("S P O"));
 			txnCommit(g);
 			assertFalse("Should not report empty", g.isEmpty());
 			txnBegin(g);
-			g.delete(NodeCreateUtils.createTriple("A B C"));
+			g.delete(NodeCreateUtils.createTriple("Foo B C"));
 			txnCommit(g);
 			assertTrue("Should report empty after all entries deleted",
 					g.isEmpty());
@@ -835,12 +856,12 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testIsIsomorphicWith_Graph() {
-		Graph graph = getGraphProducer().newInstance();
+		Graph graph = getProducer().newInstance();
 		Graph g2 = memGraph();
 		assertTrue("Empty graphs should be isomorphic",
 				graph.isIsomorphicWith(g2));
 
-		graph = graphWith(getGraphProducer().newInstance(),
+		graph = graphWith(getProducer().newInstance(),
 				"S P O; S2 P2 O2; S3 P3 O3");
 		g2 = graphWith("S3 P3 O3; S2 P2 O2; S P O");
 		assertTrue("Should be isomorphic", graph.isIsomorphicWith(g2));
@@ -865,7 +886,7 @@ public abstract class GraphContractTest 
 	}
 
 	private Graph copy(Graph g) {
-		Graph result = getGraphProducer().newInstance();
+		Graph result = getProducer().newInstance();
 		txnBegin(result);
 		GraphUtil.addInto(result, g);
 		txnCommit(result);
@@ -889,7 +910,7 @@ public abstract class GraphContractTest 
 	public void testRemove_Node_Node_Node() {
 		for (int i = 0; i < cases.length; i += 1)
 			for (int j = 0; j < 3; j += 1) {
-				Graph content = getGraphProducer().newInstance();
+				Graph content = getProducer().newInstance();
 
 				Graph baseContent = copy(content);
 				graphAddTxn(content, cases[i][0]);
@@ -937,7 +958,7 @@ public abstract class GraphContractTest 
 	}
 
 	private void testRemove(String findRemove, String findCheck) {
-		Graph g = graphWith(getGraphProducer().newInstance(), "S P O");
+		Graph g = graphWith(getProducer().newInstance(), "S P O");
 		ExtendedIterator<Triple> it = g.find(NodeCreateUtils
 				.createTriple(findRemove));
 		try {
@@ -960,7 +981,7 @@ public abstract class GraphContractTest 
 	 */
 	@Test
 	public void testFindAndContains() {
-		Graph g = getGraphProducer().newInstance();
+		Graph g = getProducer().newInstance();
 		Node r = NodeCreateUtils.create("r"), s = NodeCreateUtils.create("s"), p = NodeCreateUtils
 				.create("P");
 		txnBegin(g);
@@ -982,7 +1003,7 @@ public abstract class GraphContractTest 
 	@Test
 	public void testAGraph() {
 		String title = this.getClass().getName();
-		Graph g = getGraphProducer().newInstance();
+		Graph g = getProducer().newInstance();
 		int baseSize = g.size();
 		graphAddTxn(g, "x R y; p S q; a T b");
 		/* */
@@ -1033,7 +1054,7 @@ public abstract class GraphContractTest 
 	// @Test
 	// public void testHasTransactions()
 	// {
-	// Graph g = getGraphProducer().newInstance();
+	// Graph g = getProducer().newInstance();
 	// TransactionHandler th = g.getTransactionHandler();
 	// th.transactionsSupported();
 	// try { th.begin(); } catch (UnsupportedOperationException x) {}
@@ -1050,7 +1071,7 @@ public abstract class GraphContractTest 
 	//
 	// @Test
 	// public void testExecuteInTransactionCatchesThrowable()
-	// {Graph g = getGraphProducer().newInstance();
+	// {Graph g = getProducer().newInstance();
 	// TransactionHandler th = g.getTransactionHandler();
 	// if (th.transactionsSupported())
 	// {
@@ -1064,7 +1085,7 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testAddWithReificationPreamble() {
-		Graph g = getGraphProducer().newInstance();
+		Graph g = getProducer().newInstance();
 		txnBegin(g);
 		xSPO(g);
 		txnCommit(g);
@@ -1079,7 +1100,7 @@ public abstract class GraphContractTest 
 
 	protected void aABC(Graph g) {
 		ReifierStd.reifyAs(g, NodeCreateUtils.create("a"),
-				NodeCreateUtils.createTriple("A B C"));
+				NodeCreateUtils.createTriple("Foo B C"));
 	}
 
 	protected void xSPO(Graph g) {
@@ -1089,7 +1110,7 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void failingTestDoubleRemoveAll() {
-		final Graph g = getGraphProducer().newInstance();
+		final Graph g = getProducer().newInstance();
 		if (g.getCapabilities().iteratorRemoveAllowed()) {
 			try {
 				graphAddTxn(g, "c S d; e:ff GGG hhhh; _i J 27; Ell Em 'en'");
@@ -1170,8 +1191,8 @@ public abstract class GraphContractTest 
 	private void testIsomorphismFile(int n, String lang, String suffix,
 			boolean result) throws URISyntaxException, MalformedURLException {
 
-		Graph g1 = getGraphProducer().newInstance();
-		Graph g2 = getGraphProducer().newInstance();
+		Graph g1 = getProducer().newInstance();
+		Graph g2 = getProducer().newInstance();
 		Model m1 = ModelFactory.createModelForGraph(g1);
 		Model m2 = ModelFactory.createModelForGraph(g2);
 
@@ -1190,7 +1211,7 @@ public abstract class GraphContractTest 
 	}
 
 	protected Graph getClosed() {
-		Graph result = getGraphProducer().newInstance();
+		Graph result = getProducer().newInstance();
 		result.close();
 		return result;
 	}
@@ -1198,7 +1219,7 @@ public abstract class GraphContractTest 
 	// @Test
 	// public void testTransactionCommit()
 	// {
-	// Graph g = getGraphProducer().newInstance();
+	// Graph g = getProducer().newInstance();
 	// if (g.getTransactionHandler().transactionsSupported())
 	// {
 	// Graph initial = graphWithTxn( "initial hasValue 42; also hasURI hello" );
@@ -1224,7 +1245,7 @@ public abstract class GraphContractTest 
 	// @Test
 	// public void testTransactionAbort()
 	// {
-	// Graph g = getGraphProducer().newInstance();
+	// Graph g = getProducer().newInstance();
 	// if (g.getTransactionHandler().transactionsSupported())
 	// {
 	// Graph initial = graphWithTxn( "initial hasValue 42; also hasURI hello" );
@@ -1242,12 +1263,12 @@ public abstract class GraphContractTest 
 	// @Test
 	// public void testTransactionCommitThenAbort()
 	// {
-	// Graph g = getGraphProducer().newInstance();
+	// Graph g = getProducer().newInstance();
 	// if (g.getTransactionHandler().transactionsSupported())
 	// {
-	// Graph initial = graphWithTxn( "A pings B; B pings C" );
+	// Graph initial = graphWithTxn( "Foo pings B; B pings C" );
 	// Graph extra = graphWithTxn( "C pingedBy B; fileGraph rdf:type Graph" );
-	// //Graph g = getGraphProducer().newInstance();
+	// //Graph g = getProducer().newInstance();
 	// //File foo = FileUtils.tempFileName( "fileGraph", ".nt" );
 	// //Graph g = new FileGraph( foo, true, true );
 	// g.getTransactionHandler().begin();
@@ -1271,13 +1292,13 @@ public abstract class GraphContractTest 
 	 */
 	@Test
 	public void testPartialUpdate() {
-		Graph source = graphWith(getGraphProducer().newInstance(),
+		Graph source = graphWith(getProducer().newInstance(),
 				"a R b; b S e");
-		Graph dest = graphWith(getGraphProducer().newInstance(), "b R d");
+		Graph dest = graphWith(getProducer().newInstance(), "b R d");
 		GraphExtract e = new GraphExtract(TripleBoundary.stopNowhere);
 		e.extractInto(dest, node("a"), source);
 		assertIsomorphic(
-				graphWith(getGraphProducer().newInstance(),
+				graphWith(getProducer().newInstance(),
 						"a R b; b S e; b R d"), dest);
 	}
 
@@ -1287,7 +1308,7 @@ public abstract class GraphContractTest 
 	 */
 	@Test
 	public void testIterator_Remove() {
-		Graph graph = graphWith(getGraphProducer().newInstance(),
+		Graph graph = graphWith(getProducer().newInstance(),
 				"a R b; b S e");
 		if (graph.getCapabilities().iteratorRemoveAllowed()) {
 
@@ -1306,11 +1327,11 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testTransactionHandler_Commit() {
-		Graph g = getGraphProducer().newInstance();
+		Graph g = getProducer().newInstance();
 		if (g.getTransactionHandler().transactionsSupported()) {
-			Graph initial = graphWith(getGraphProducer().newInstance(),
+			Graph initial = graphWith(getProducer().newInstance(),
 					"initial hasValue 42; also hasURI hello");
-			Graph extra = graphWith(getGraphProducer().newInstance(),
+			Graph extra = graphWith(getProducer().newInstance(),
 					"extra hasValue 17; also hasURI world");
 
 			GraphUtil.addInto(g, initial);
@@ -1330,11 +1351,11 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testTransactionHandler_Abort() {
-		Graph g = getGraphProducer().newInstance();
+		Graph g = getProducer().newInstance();
 		if (g.getTransactionHandler().transactionsSupported()) {
-			Graph initial = graphWith(getGraphProducer().newInstance(),
+			Graph initial = graphWith(getProducer().newInstance(),
 					"initial hasValue 42; also hasURI hello");
-			Graph extra = graphWith(getGraphProducer().newInstance(),
+			Graph extra = graphWith(getProducer().newInstance(),
 					"extra hasValue 17; also hasURI world");
 			GraphUtil.addInto(g, initial);
 			g.getTransactionHandler().begin();
@@ -1346,11 +1367,11 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testTransactionHandler_CommitThenAbort() {
-		Graph g = getGraphProducer().newInstance();
+		Graph g = getProducer().newInstance();
 		if (g.getTransactionHandler().transactionsSupported()) {
-			Graph initial = graphWith(getGraphProducer().newInstance(),
-					"A pings B; B pings C");
-			Graph extra = graphWith(getGraphProducer().newInstance(),
+			Graph initial = graphWith(getProducer().newInstance(),
+					"Foo pings B; B pings C");
+			Graph extra = graphWith(getProducer().newInstance(),
 					"C pingedBy B; fileGraph rdf:type Graph");
 			g.getTransactionHandler().begin();
 			GraphUtil.addInto(g, initial);
@@ -1379,9 +1400,8 @@ public abstract class GraphContractTest 
 
 	private void testLiteralTypingBasedFind(final String data, final int size,
 			final String search, final String results, boolean reqLitType) {
-		String fmt = "TestFindLiterals: graph '{'{%s}'}' size {%s} search {%s} expecting '{'{%s}'}'";
-
-		Graph g = getGraphProducer().newInstance();
+		
+		Graph g = getProducer().newInstance();
 
 		if (!reqLitType || g.getCapabilities().handlesLiteralTyping()) {
 			graphWith(g, data);
@@ -1443,7 +1463,7 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testQuadRemove() {
-		Graph g = getGraphProducer().newInstance();
+		Graph g = getProducer().newInstance();
 		assertEquals(0, g.size());
 		Triple s = triple("x rdf:subject s");
 		Triple p = triple("x rdf:predicate p");
@@ -1467,7 +1487,7 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testSizeAfterRemove() {
-		Graph g = graphWith(getGraphProducer().newInstance(), "x p y");
+		Graph g = graphWith(getProducer().newInstance(), "x p y");
 		if (g.getCapabilities().iteratorRemoveAllowed()) {
 			try {
 				ExtendedIterator<Triple> it = g.find(triple("x ?? ??"));
@@ -1482,7 +1502,7 @@ public abstract class GraphContractTest 
 	@Test
 	public void testSingletonStatisticsWithSingleTriple() {
 
-		Graph g = graphWith(getGraphProducer().newInstance(), "a P b");
+		Graph g = graphWith(getProducer().newInstance(), "a P b");
 		GraphStatisticsHandler h = g.getStatisticsHandler();
 		if (h != null) {
 			assertEquals(1L, h.getStatistic(node("a"), Node.ANY, Node.ANY));
@@ -1499,7 +1519,7 @@ public abstract class GraphContractTest 
 	@Test
 	public void testSingletonStatisticsWithSeveralTriples() {
 
-		Graph g = graphWith(getGraphProducer().newInstance(),
+		Graph g = graphWith(getProducer().newInstance(),
 				"a P b; a P c; a Q b; x S y");
 		GraphStatisticsHandler h = g.getStatisticsHandler();
 		if (h != null) {
@@ -1520,7 +1540,7 @@ public abstract class GraphContractTest 
 	@Test
 	public void testDoubletonStatisticsWithTriples() {
 
-		Graph g = graphWith(getGraphProducer().newInstance(),
+		Graph g = graphWith(getProducer().newInstance(),
 				"a P b; a P c; a Q b; x S y");
 		GraphStatisticsHandler h = g.getStatisticsHandler();
 		if (h != null) {
@@ -1541,7 +1561,7 @@ public abstract class GraphContractTest 
 	}
 
 	private void testStatsWithAllVariables(String triples) {
-		Graph g = graphWith(getGraphProducer().newInstance(), triples);
+		Graph g = graphWith(getProducer().newInstance(), triples);
 		GraphStatisticsHandler h = g.getStatisticsHandler();
 		if (h != null) {
 			assertEquals(g.size(), h.getStatistic(Node.ANY, Node.ANY, Node.ANY));
@@ -1555,7 +1575,7 @@ public abstract class GraphContractTest 
 
 	private void testStatsWithConcreteTriple(int expect, String triple,
 			String graph) {
-		Graph g = graphWith(getGraphProducer().newInstance(), graph);
+		Graph g = graphWith(getProducer().newInstance(), graph);
 		GraphStatisticsHandler h = g.getStatisticsHandler();
 		if (h != null) {
 			Triple t = triple(triple);
@@ -1568,7 +1588,7 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testBrokenIndexes() {
-		Graph g = graphWith(getGraphProducer().newInstance(), "x R y; x S z");
+		Graph g = graphWith(getProducer().newInstance(), "x R y; x S z");
 		if (g.getCapabilities().iteratorRemoveAllowed()) {
 			try {
 				ExtendedIterator<Triple> it = g.find(Node.ANY, Node.ANY,
@@ -1586,7 +1606,7 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testBrokenSubject() {
-		Graph g = graphWith(getGraphProducer().newInstance(),
+		Graph g = graphWith(getProducer().newInstance(),
 				"x brokenSubject y");
 		if (g.getCapabilities().iteratorRemoveAllowed()) {
 			try {
@@ -1602,7 +1622,7 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testBrokenPredicate() {
-		Graph g = graphWith(getGraphProducer().newInstance(),
+		Graph g = graphWith(getProducer().newInstance(),
 				"x brokenPredicate y");
 		if (g.getCapabilities().iteratorRemoveAllowed()) {
 			try {
@@ -1618,7 +1638,7 @@ public abstract class GraphContractTest 
 
 	@Test
 	public void testBrokenObject() {
-		Graph g = graphWith(getGraphProducer().newInstance(),
+		Graph g = graphWith(getProducer().newInstance(),
 				"x brokenObject y");
 		if (g.getCapabilities().iteratorRemoveAllowed()) {
 			try {

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/GraphEventManagerContractTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/GraphEventManagerContractTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/GraphEventManagerContractTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/GraphEventManagerContractTest.java Mon Oct 21 06:40:58 2013
@@ -33,6 +33,8 @@ import static org.junit.Assert.*;
 import com.hp.hpl.jena.graph.Graph;
 import com.hp.hpl.jena.graph.GraphEventManager;
 import com.hp.hpl.jena.graph.Triple;
+import com.hp.hpl.jena.sparql.graph.GraphFactory;
+import com.hp.hpl.jena.testing_framework.ContractTemplate;
 import com.hp.hpl.jena.testing_framework.GraphHelper;
 import org.xenei.junit.contract.IProducer;
 import com.hp.hpl.jena.testing_framework.NodeCreateUtils;
@@ -47,30 +49,48 @@ import static com.hp.hpl.jena.testing_fr
  * to create a new instance of the EventManager for testing.
  */
 @Contract(GraphEventManager.class)
-public abstract class GraphEventManagerContractTest {
+public class GraphEventManagerContractTest<T extends GraphEventManager> extends ContractTemplate<T> {
+	
+	protected static final Triple[] tripleArray = tripleArray("S P O; Foo R B; X Q Y");
 
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
-	protected abstract IProducer<GraphEventManager> getEventManagerProducer();
-
-	protected static final Triple[] tripleArray = tripleArray("S P O; A R B; X Q Y");
-
-	// the grah that is used as the source of the events.
+	// the graph that is used as the source of the events.
 	private Graph mockGraph;
 	// The event manager we are working with.
 	private GraphEventManager gem;
 
+	public GraphEventManagerContractTest()
+	{
+		setProducer( new IProducer<T>(){
+
+			@Override
+			public T newInstance() {
+				return  (T) GraphFactory.createGraphMem().getEventManager();
+			}
+
+			@Override
+			public void cleanUp() {
+			}});
+		
+	}
+	
+	@Contract.Inject
+	public final void setGraphEventManagerContractTestProducer(IProducer<T>  producer)
+	{
+		super.setProducer(producer);
+	}
+	
+	@After
+	public final void afterGraphEventManagerContractTest() {
+		getProducer().cleanUp();
+	}
+	
 	@Before
-	public final void beforeAbstractEventManagerTest() {
+	public final void beforeGraphEventManagerContractTest() {
 		mockGraph = Mockito.mock(Graph.class);
-		gem = getEventManagerProducer().newInstance();
+		gem = getProducer().newInstance();
 		L = new RecordingGraphListener();
 	}
 
-	@After
-	public final void afterAbstractEventManagerTest() {
-		getEventManagerProducer().cleanUp();
-	}
-
 	/**
 	 * Test that when a listener is registered the same EventManager is
 	 * returned.
@@ -296,7 +316,7 @@ public abstract class GraphEventManagerC
 	}
 
 	//
-	// A series of tests to check modifying the manger in mid notification
+	// Foo series of tests to check modifying the manger in mid notification
 	//
 
 	private ComeAndGoListener all[];

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/GraphMakerContractTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/GraphMakerContractTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/GraphMakerContractTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/GraphMakerContractTest.java Mon Oct 21 06:40:58 2013
@@ -30,6 +30,7 @@ import com.hp.hpl.jena.graph.Graph;
 import com.hp.hpl.jena.graph.GraphMaker;
 import com.hp.hpl.jena.graph.Node;
 import com.hp.hpl.jena.graph.Triple;
+import com.hp.hpl.jena.graph.impl.SimpleGraphMaker;
 import com.hp.hpl.jena.shared.AlreadyExistsException;
 import com.hp.hpl.jena.shared.DoesNotExistException;
 import com.hp.hpl.jena.testing_framework.GraphHelper;
@@ -47,18 +48,49 @@ import com.hp.hpl.jena.testing_framework
  * wasn't abstract.)
  */
 @Contract(GraphMaker.class)
-public abstract class GraphMakerContractTest {
+public class GraphMakerContractTest {
 
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
-	public abstract IProducer<GraphMaker> getGraphMakerProducer();
-
-	private GraphMaker graphMaker;
+	private IProducer<GraphMaker> producer;
+	
+	GraphMaker graphMaker;
+	
+	public GraphMakerContractTest()
+	{
+		producer = new IProducer<GraphMaker>(){
+
+			@Override
+			public GraphMaker newInstance() {
+				return new SimpleGraphMaker();
+			}
+
+			@Override
+			public void cleanUp() {
+				
+			}};
+	}
+	
+	@Contract.Inject
+	public final void setGraphMaker( IProducer<GraphMaker> producer )
+	{
+		this.producer = producer;
+	}
+	
+	protected final IProducer<GraphMaker> getGraphMakerProducer()
+	{
+		return producer;
+	}
+	
+	@After
+	public final void afterGraphMakerContractTest() {
+		producer.cleanUp();
+	}
 
 	@Before
-	public void setUp() {
-		graphMaker = getGraphMakerProducer().newInstance();
+	public final void beforeGraphMakerContractTest()
+	{
+		graphMaker = producer.newInstance();
 	}
-
+	
 	@After
 	public void tearDown() {
 		graphMaker.close();
@@ -66,7 +98,7 @@ public abstract class GraphMakerContract
 	}
 
 	/**
-	 * A trivial test that getGraph delivers a proper graph, not cheating with
+	 * Foo trivial test that getGraph delivers a proper graph, not cheating with
 	 * null, and that getGraph() "always" delivers the same Graph.
 	 */
 	@Test

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/GraphWithPerformContractTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/GraphWithPerformContractTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/GraphWithPerformContractTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/GraphWithPerformContractTest.java Mon Oct 21 06:40:58 2013
@@ -6,12 +6,17 @@ import static com.hp.hpl.jena.testing_fr
 import static com.hp.hpl.jena.testing_framework.GraphHelper.txnCommit;
 
 import static org.junit.Assert.*;
+
+import org.junit.After;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.xenei.junit.contract.Contract;
 
 import com.hp.hpl.jena.graph.impl.GraphWithPerform;
+import com.hp.hpl.jena.mem.GraphMem;
+import com.hp.hpl.jena.testing_framework.ContractTemplate;
+
 import org.xenei.junit.contract.IProducer;
 
 /**
@@ -20,18 +25,42 @@ import org.xenei.junit.contract.IProduce
  * non-notifying versions of add and delete.
  */
 @Contract(GraphWithPerform.class)
-public abstract class GraphWithPerformContractTest {
+public class GraphWithPerformContractTest<T extends GraphWithPerform> extends ContractTemplate<T>{
+	// Recording listener for tests
 	protected RecordingGraphListener GL = new RecordingGraphListener();
 
 	private static final Logger LOG = LoggerFactory
 			.getLogger(GraphWithPerformContractTest.class);
+	
+	@SuppressWarnings("unchecked")
+	public GraphWithPerformContractTest() {
+		setProducer( (IProducer<T>) new IProducer<GraphWithPerform>(){
+
+			@Override
+			public GraphWithPerform newInstance() {
+				return new GraphMem();
+			}
+
+			@Override
+			public void cleanUp() {
+				
+			}});
+	}
+	
+	@Contract.Inject
+	public void setGraphWithPerformContractTestProducer(IProducer<T> producer)
+	{
+		super.setProducer(producer);
+	}
 
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
-	abstract public IProducer<? extends GraphWithPerform> getGraphProducer();
-
+	@After
+	public final void afterGraphWithPerformContractTest() {
+		getProducer().cleanUp();
+	}
+	
 	@Test
 	public void testPerformAdd_Triple() {
-		GraphWithPerform g = (GraphWithPerform) graphWith(getGraphProducer()
+		GraphWithPerform g = (GraphWithPerform) graphWith(getProducer()
 				.newInstance(), "S P O; S2 P2 O2");
 		g.getEventManager().register(GL);
 		txnBegin(g);
@@ -44,7 +73,7 @@ public abstract class GraphWithPerformCo
 
 	@Test
 	public void testPerformDelete_Triple() {
-		GraphWithPerform g = (GraphWithPerform) graphWith(getGraphProducer()
+		GraphWithPerform g = (GraphWithPerform) graphWith(getProducer()
 				.newInstance(), "S P O; S2 P2 O2");
 		g.getEventManager().register(GL);
 		txnBegin(g);

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/ReifierTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/ReifierTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/ReifierTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/ReifierTest.java Mon Oct 21 06:40:58 2013
@@ -107,8 +107,8 @@ public class ReifierTest {
 	@Test
 	public void testOverspecificationSuppressesReification() {
 		graphAddTxn(g,
-				"x rdf:subject A; x rdf:predicate P; x rdf:object O; x rdf:type rdf:Statement");
-		assertEquals(triple("A P O"), ReifierStd.getTriple(g, node("x")));
+				"x rdf:subject Foo; x rdf:predicate P; x rdf:object O; x rdf:type rdf:Statement");
+		assertEquals(triple("Foo P O"), ReifierStd.getTriple(g, node("x")));
 		graphAddTxn(g, "x rdf:subject BOOM");
 		assertNull(ReifierStd.getTriple(g, node("x")));
 	}
@@ -147,16 +147,16 @@ public class ReifierTest {
 	@Test
 	public void testManifestQuads() {
 		txnBegin(g);
-		ReifierStd.reifyAs(g, node("A"), triple("S P O"));
+		ReifierStd.reifyAs(g, node("Foo"), triple("S P O"));
 		txnCommit(g);
-		String reified = "A rdf:type rdf:Statement; A rdf:subject S; A rdf:predicate P; A rdf:object O";
+		String reified = "Foo rdf:type rdf:Statement; Foo rdf:subject S; Foo rdf:predicate P; Foo rdf:object O";
 		assertIsomorphic(graphWith(graphProducer.newInstance(), reified), g);
 	}
 
 	@Test
 	public void testHiddenVsReification() {
 		txnBegin(g);
-		ReifierStd.reifyAs(g, node("A"), triple("S P O"));
+		ReifierStd.reifyAs(g, node("Foo"), triple("S P O"));
 		txnCommit(g);
 		assertTrue(ReifierStd.findEither(g, Triple.ANY, false).hasNext());
 	}

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/TestGraphUtil.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/TestGraphUtil.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/TestGraphUtil.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/TestGraphUtil.java Mon Oct 21 06:40:58 2013
@@ -37,7 +37,7 @@ import com.hp.hpl.jena.util.iterator.Ext
 
 public class TestGraphUtil {
 
-	private static final Triple[] tripleArray = tripleArray("S P O; A R B; X Q Y");
+	private static final Triple[] tripleArray = tripleArray("S P O; Foo R B; X Q Y");
 	private static final List<Triple> tripleList = Arrays
 			.asList(tripleArray("i lt j; p equals q"));
 	private static final Triple[] setTriples = tripleArray("scissors cut paper; paper wraps stone; stone breaks scissors");
@@ -327,7 +327,7 @@ public class TestGraphUtil {
 	}
 
 	/**
-	 * Answer a set with all the elements of <code>A</code> except those in
+	 * Answer a set with all the elements of <code>Foo</code> except those in
 	 * <code>B</code>.
 	 */
 	private <T> Set<T> remove(Set<T> A, Set<T> B) {

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/TestNode.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/TestNode.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/TestNode.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/TestNode.java Mon Oct 21 06:40:58 2013
@@ -697,7 +697,7 @@ public class TestNode {
 		Node a = NodeFactory.createLiteral("10", "", dt1);
 		Node b = NodeFactory.createLiteral("10", "", dt2);
 		TestUtils.assertDiffer("types must make a difference", a, b);
-		assertTrue("A and B must express the same value", a.sameValueAs(b));
+		assertTrue("Foo and B must express the same value", a.sameValueAs(b));
 		assertTrue("matching literals must respect sameValueAs", a.matches(b));
 	}
 

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/TransactionHandlerContractTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/TransactionHandlerContractTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/TransactionHandlerContractTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/TransactionHandlerContractTest.java Mon Oct 21 06:40:58 2013
@@ -29,6 +29,7 @@ import static org.junit.Assert.*;
 
 import com.hp.hpl.jena.graph.TransactionHandler;
 import com.hp.hpl.jena.graph.Triple;
+import com.hp.hpl.jena.graph.impl.SimpleTransactionHandler;
 import com.hp.hpl.jena.shared.Command;
 import com.hp.hpl.jena.shared.JenaException;
 import org.xenei.junit.contract.IProducer;
@@ -41,10 +42,34 @@ import static com.hp.hpl.jena.testing_fr
  * to deliver a Graph of interest.
  */
 @Contract(TransactionHandler.class)
-public abstract class TransactionHandlerContractTest {
+public class TransactionHandlerContractTest {
 
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
-	protected abstract IProducer<TransactionHandler> getTransactionHandlerProducer();
+	private IProducer<TransactionHandler> producer;
+	
+	public TransactionHandlerContractTest() {
+		producer = new IProducer<TransactionHandler>(){
+
+			@Override
+			public TransactionHandler newInstance() {
+				return new SimpleTransactionHandler();
+			}
+
+			@Override
+			public void cleanUp() {
+				
+			}};
+	}
+	
+	@Contract.Inject
+	public void setProducer( IProducer<TransactionHandler> producer )
+	{
+		this.producer = producer;
+	}
+	
+	protected IProducer<TransactionHandler> getTransactionHandlerProducer()
+	{
+		return producer;
+	}
 
 	/**
 	 * Test that Graphs have transaction support methods, and that if they fail
@@ -112,7 +137,7 @@ public abstract class TransactionHandler
 		}
 	}
 
-	static final Triple[] tripleArray = tripleArray("S P O; A R B; X Q Y");
+	static final Triple[] tripleArray = tripleArray("S P O; Foo R B; X Q Y");
 
 	static final List<Triple> tripleList = Arrays
 			.asList(tripleArray("i lt j; p equals q"));

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DeltaSuite.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DeltaSuite.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DeltaSuite.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DeltaSuite.java Mon Oct 21 06:40:58 2013
@@ -17,26 +17,40 @@
  */
 package com.hp.hpl.jena.graph.compose;
 
+import java.util.HashSet;
+
 import org.junit.BeforeClass;
+
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
+import org.xenei.junit.contract.ContractImpl;
+import org.xenei.junit.contract.ContractSuite;
+import org.xenei.junit.contract.Dynamic;
+import org.xenei.junit.contract.IProducer;
 
 import com.hp.hpl.jena.graph.AbstractGraphSuite;
+import com.hp.hpl.jena.graph.Graph;
+import com.hp.hpl.jena.graph.Triple;
+import com.hp.hpl.jena.graph.impl.CollectionGraph;
 import com.hp.hpl.jena.sparql.graph.GraphFactory;
 import com.hp.hpl.jena.testing_framework.AbstractGraphProducer;
 
-@RunWith(Suite.class)
+@RunWith( ContractSuite.class )
+@ContractImpl( Delta.class )
 public class DeltaSuite extends AbstractGraphSuite {
 
-	@BeforeClass
-	public static void beforeClass() {
-		setGraphProducer(new AbstractGraphProducer<Delta>() {
-			@Override
-			protected Delta createNewGraph() {
-				return new Delta(GraphFactory.createGraphMem());
-			}
-
-		});
+	private AbstractGraphProducer<Delta> producer = new 
+			AbstractGraphProducer<Delta>() {
+		@Override
+		protected Delta createNewGraph() {
+			return new Delta(GraphFactory.createGraphMem());
+		}
+
+	};
+
+	@Dynamic.Inject
+	public IProducer<? extends Graph> getCollectionGraphSuiteProducer() {
+		return producer;
 	}
 
 }

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DeltaTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DeltaTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DeltaTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DeltaTest.java Mon Oct 21 06:40:58 2013
@@ -34,25 +34,34 @@ import org.xenei.junit.contract.IProduce
 @SuppressWarnings("deprecation")
 @RunWith(ContractSuite.class)
 @ContractImpl(Delta.class)
-public class DeltaTest extends AbstractDyadicTest {
+public class DeltaTest extends DyadicTest<Delta> {
 
-	private IProducer<Delta> graphProducer = new AbstractGraphProducer<Delta>() {
+	public DeltaTest()
+	{
+		super();
+		producer =  new AbstractGraphProducer<Delta>() {
 		@Override
 		protected Delta createNewGraph() {
 			return new Delta(GraphFactory.createGraphMem());
 		}
-
-	};
-
-	@Override
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
-	public IProducer<Delta> getGraphProducer() {
-		return graphProducer;
+		};
+	}
+	
+	public void setDeltaTestProducer(IProducer<? extends Delta> producer)
+	{
+		this.producer = (IProducer<Delta>) producer;
+	}
+	
+	@Contract.Inject
+	public final IProducer<Delta> getDyadicTestProducer()
+	{
+		return producer;
 	}
+	
 
 	@Test
 	public void testDelta() {
-		Graph x = graphWith(getGraphProducer().newInstance(), "x R y");
+		Graph x = graphWith(getDyadicTestProducer().newInstance(), "x R y");
 		assertContains("x", "x R y", x);
 		x.delete(triple("x R y"));
 		assertOmits("x", x, "x R y");

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DifferenceSuite.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DifferenceSuite.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DifferenceSuite.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DifferenceSuite.java Mon Oct 21 06:40:58 2013
@@ -20,24 +20,36 @@ package com.hp.hpl.jena.graph.compose;
 import org.junit.BeforeClass;
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
+import org.xenei.junit.contract.ContractImpl;
+import org.xenei.junit.contract.ContractSuite;
+import org.xenei.junit.contract.Dynamic;
+import org.xenei.junit.contract.IProducer;
 
 import com.hp.hpl.jena.graph.AbstractGraphSuite;
+import com.hp.hpl.jena.graph.Graph;
 import com.hp.hpl.jena.sparql.graph.GraphFactory;
 import com.hp.hpl.jena.testing_framework.AbstractGraphProducer;
 
-@RunWith(Suite.class)
+@SuppressWarnings("deprecation")
+@RunWith( ContractSuite.class )
+@ContractImpl( Difference.class )
 public class DifferenceSuite extends AbstractGraphSuite {
 
-	@SuppressWarnings("deprecation")
-	@BeforeClass
-	public static void beforeClass() {
-		setGraphProducer(new AbstractGraphProducer<Difference>() {
-			@Override
-			protected Difference createNewGraph() {
-				return new Difference(GraphFactory.createGraphMem(),
-						GraphFactory.createGraphMem());
-			}
+	
+	private AbstractGraphProducer<Difference> producer = new 
+			AbstractGraphProducer<Difference>() {
+		
+		@Override
+		protected Difference createNewGraph() {
+			return new Difference(GraphFactory.createGraphMem(),
+					GraphFactory.createGraphMem());
+		}
 
-		});
+	};
+
+	@Dynamic.Inject
+	public IProducer<? extends Graph> getCollectionGraphSuiteProducer() {
+		return producer;
 	}
+
 }

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DifferenceTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DifferenceTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DifferenceTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DifferenceTest.java Mon Oct 21 06:40:58 2013
@@ -36,31 +36,38 @@ import org.xenei.junit.contract.IProduce
 @SuppressWarnings("deprecation")
 @RunWith(ContractSuite.class)
 @ContractImpl(Difference.class)
-public class DifferenceTest extends AbstractDyadicTest {
+public class DifferenceTest extends DyadicTest<Difference> {
 
-	private IProducer<Difference> graphProducer = new AbstractGraphProducer<Difference>() {
+	public DifferenceTest()
+	{
+		producer = new AbstractGraphProducer<Difference>() {
 		@Override
 		protected Difference createNewGraph() {
 			return new Difference(GraphFactory.createGraphMem(),
 					GraphFactory.createGraphMem());
-		}
-
-	};
-
-	@Override
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
-	public IProducer<Difference> getGraphProducer() {
-		return graphProducer;
+		}};
 	}
 
+	
+	public void setDeltaTestProducer(IProducer<Difference> producer)
+	{
+		this.producer = producer;
+	}
+	
+	@Contract.Inject
+	public final IProducer<Difference> getDyadicTestProducer()
+	{
+		return producer;
+	}
+	
 	@Test
 	public void testDifference() {
 		Graph g1 = graphWith("x R y; p R q");
-		Graph g2 = graphWith("r A s; x R y");
+		Graph g2 = graphWith("r Foo s; x R y");
 		Graph d = new Difference(g1, g2);
 		assertOmits("Difference", d, "x R y");
 		assertContains("Difference", "p R q", d);
-		assertOmits("Difference", d, "r A s");
+		assertOmits("Difference", d, "r Foo s");
 		if (d.size() != 1)
 			fail("oops: size of difference is not 1");
 		d.add(triple("cats eat cheese"));

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DisjointUnionSuite.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DisjointUnionSuite.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DisjointUnionSuite.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DisjointUnionSuite.java Mon Oct 21 06:40:58 2013
@@ -20,24 +20,35 @@ package com.hp.hpl.jena.graph.compose;
 import org.junit.BeforeClass;
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
+import org.xenei.junit.contract.ContractImpl;
+import org.xenei.junit.contract.ContractSuite;
+import org.xenei.junit.contract.Dynamic;
+import org.xenei.junit.contract.IProducer;
 
 import com.hp.hpl.jena.graph.AbstractGraphSuite;
+import com.hp.hpl.jena.graph.Graph;
 import com.hp.hpl.jena.sparql.graph.GraphFactory;
 import com.hp.hpl.jena.testing_framework.AbstractGraphProducer;
 
-@RunWith(Suite.class)
+
+@RunWith( ContractSuite.class )
+@ContractImpl( DisjointUnion.class )
 public class DisjointUnionSuite extends AbstractGraphSuite {
+	
+	private AbstractGraphProducer<DisjointUnion> producer = new 
+			AbstractGraphProducer<DisjointUnion>() {
+		
+		@Override
+		protected DisjointUnion createNewGraph() {
+			return new DisjointUnion(GraphFactory.createGraphMem(),
+					GraphFactory.createGraphMem());
 
-	@BeforeClass
-	public static void beforeClass() {
-		setGraphProducer(new AbstractGraphProducer<DisjointUnion>() {
-			@Override
-			protected DisjointUnion createNewGraph() {
-				return new DisjointUnion(GraphFactory.createGraphMem(),
-						GraphFactory.createGraphMem());
+		}
 
-			}
+	};
 
-		});
+	@Dynamic.Inject
+	public IProducer<? extends Graph> getCollectionGraphSuiteProducer() {
+		return producer;
 	}
 }

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DisjointUnionTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DisjointUnionTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DisjointUnionTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DisjointUnionTest.java Mon Oct 21 06:40:58 2013
@@ -38,23 +38,31 @@ import org.xenei.junit.contract.IProduce
  */
 @RunWith(ContractSuite.class)
 @ContractImpl(DisjointUnion.class)
-public class DisjointUnionTest extends AbstractDyadicTest {
+public class DisjointUnionTest extends DyadicTest<DisjointUnion> {
 
-	private IProducer<DisjointUnion> graphProducer = new AbstractGraphProducer<DisjointUnion>() {
+	public DisjointUnionTest()
+	{
+		producer = new AbstractGraphProducer<DisjointUnion>() {
 		@Override
 		protected DisjointUnion createNewGraph() {
 			return new DisjointUnion(GraphFactory.createGraphMem(),
 					GraphFactory.createGraphMem());
 		}
+		};
+	}
 
-	};
 
-	@Override
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
-	public IProducer<DisjointUnion> getGraphProducer() {
-		return graphProducer;
+	public void setDeltaTestProducer(IProducer<DisjointUnion> producer)
+	{
+		this.producer = producer;
 	}
-
+	
+	@Contract.Inject	
+	public final IProducer<DisjointUnion> getDyadicTestProducer()
+	{
+		return producer;
+	}
+	
 	@Test
 	public void testEmptyUnion() {
 		DisjointUnion du = new DisjointUnion(Graph.emptyGraph, Graph.emptyGraph);
@@ -89,8 +97,8 @@ public class DisjointUnionTest extends A
 		assertIsomorphic(Graph.emptyGraph, du);
 		L.add(triple("x P y"));
 		assertIsomorphic(graphWith("x P y"), du);
-		R.add(triple("A rdf:type Route"));
-		assertIsomorphic(graphWith("x P y; A rdf:type Route"), du);
+		R.add(triple("Foo rdf:type Route"));
+		assertIsomorphic(graphWith("x P y; Foo rdf:type Route"), du);
 	}
 
 	@Test

Copied: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DyadicTest.java (from r1530718, jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/AbstractDyadicTest.java)
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DyadicTest.java?p2=jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DyadicTest.java&p1=jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/AbstractDyadicTest.java&r1=1530718&r2=1534038&rev=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/AbstractDyadicTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/DyadicTest.java Mon Oct 21 06:40:58 2013
@@ -31,16 +31,15 @@ import org.xenei.junit.contract.Contract
 import com.hp.hpl.jena.graph.Graph;
 import com.hp.hpl.jena.graph.Triple;
 import com.hp.hpl.jena.graph.TripleMatch;
+import com.hp.hpl.jena.mem.GraphMem;
+
 import org.xenei.junit.contract.IProducer;
 import com.hp.hpl.jena.util.iterator.ExtendedIterator;
 import com.hp.hpl.jena.util.iterator.NiceIterator;
 
-@RunWith(ContractSuite.class)
-@ContractImpl(Dyadic.class)
-public abstract class AbstractDyadicTest {
+public class DyadicTest<T extends Dyadic> {
 
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
-	public abstract IProducer<? extends Dyadic> getGraphProducer();
+	protected IProducer<T> producer;
 
 	static private NiceIterator<String> things(final String x) {
 		return new NiceIterator<String>() {
@@ -78,8 +77,8 @@ public abstract class AbstractDyadicTest
 
 	@Test
 	public void testDyadicOperands() {
-		Graph g = getGraphProducer().newInstance(), h = getGraphProducer()
-				.newInstance();
+		Graph g = new GraphMem();
+		Graph h = new GraphMem();
 		Dyadic d = new Dyadic(g, h) {
 			@Override
 			protected ExtendedIterator<Triple> _graphBaseFind(TripleMatch m) {

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/IntersectionSuite.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/IntersectionSuite.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/IntersectionSuite.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/IntersectionSuite.java Mon Oct 21 06:40:58 2013
@@ -20,25 +20,34 @@ package com.hp.hpl.jena.graph.compose;
 import org.junit.BeforeClass;
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
+import org.xenei.junit.contract.ContractImpl;
+import org.xenei.junit.contract.ContractSuite;
+import org.xenei.junit.contract.Dynamic;
+import org.xenei.junit.contract.IProducer;
 
 import com.hp.hpl.jena.graph.AbstractGraphSuite;
+import com.hp.hpl.jena.graph.Graph;
 import com.hp.hpl.jena.sparql.graph.GraphFactory;
 import com.hp.hpl.jena.testing_framework.AbstractGraphProducer;
 
-@RunWith(Suite.class)
+@SuppressWarnings("deprecation")
+@RunWith( ContractSuite.class )
+@ContractImpl( Intersection.class )
 public class IntersectionSuite extends AbstractGraphSuite {
 
-	@SuppressWarnings("deprecation")
-	@BeforeClass
-	public static void beforeClass() {
-		setGraphProducer(new AbstractGraphProducer<Intersection>() {
-			@SuppressWarnings("deprecation")
-			@Override
-			protected Intersection createNewGraph() {
-				return new Intersection(GraphFactory.createGraphMem(),
-						GraphFactory.createGraphMem());
-			}
+	
+	private AbstractGraphProducer<Intersection> producer = new 
+			AbstractGraphProducer<Intersection>() {
+		@Override
+		protected Intersection createNewGraph() {
+			return new Intersection(GraphFactory.createGraphMem(),
+					GraphFactory.createGraphMem());
+		}
 
-		});
+	};
+
+	@Dynamic.Inject
+	public IProducer<? extends Graph> getCollectionGraphSuiteProducer() {
+		return producer;
 	}
 }

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/IntersectionTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/IntersectionTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/IntersectionTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/IntersectionTest.java Mon Oct 21 06:40:58 2013
@@ -37,31 +37,33 @@ import org.xenei.junit.contract.IProduce
 @SuppressWarnings("deprecation")
 @RunWith(ContractSuite.class)
 @ContractImpl(Intersection.class)
-public class IntersectionTest extends AbstractDyadicTest {
+public class IntersectionTest extends DyadicTest<Intersection> {
 
-	private IProducer<? extends Intersection> graphProducer = new AbstractGraphProducer<Intersection>() {
+	public IntersectionTest()
+	{
+		super();
+		producer = new AbstractGraphProducer<Intersection>() {
 		@Override
 		protected Intersection createNewGraph() {
 			return new Intersection(GraphFactory.createGraphMem(),
 					GraphFactory.createGraphMem());
-		}
-
-	};
-
-	@Override
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
-	public IProducer<Intersection> getGraphProducer() {
-		return (IProducer<Intersection>) graphProducer;
+		}};
 	}
 
+	@Contract.Inject	
+	public final IProducer<Intersection> getDyadicTestProducer()
+	{
+		return producer;
+	}
+	
 	@Test
 	public void testIntersection() {
 		Graph g1 = graphWith(GraphFactory.createGraphMem(), "x R y; p R q");
-		Graph g2 = graphWith(GraphFactory.createGraphMem(), "r A s; x R y");
+		Graph g2 = graphWith(GraphFactory.createGraphMem(), "r Foo s; x R y");
 		Intersection i = new Intersection(g1, g2);
 		assertContains("Intersection", "x R y", i);
 		assertOmits("Intersection", i, "p R q");
-		assertOmits("Intersection", i, "r A s");
+		assertOmits("Intersection", i, "r Foo s");
 		if (i.size() != 1)
 			fail("oops: size of intersection is not 1");
 		i.add(triple("cats eat cheese"));

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/MultiUnionSuite.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/MultiUnionSuite.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/MultiUnionSuite.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/MultiUnionSuite.java Mon Oct 21 06:40:58 2013
@@ -20,28 +20,37 @@ package com.hp.hpl.jena.graph.compose;
 import org.junit.BeforeClass;
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
+import org.xenei.junit.contract.ContractImpl;
+import org.xenei.junit.contract.ContractSuite;
+import org.xenei.junit.contract.Dynamic;
+import org.xenei.junit.contract.IProducer;
 
 import com.hp.hpl.jena.graph.AbstractGraphSuite;
 import com.hp.hpl.jena.graph.Graph;
 import com.hp.hpl.jena.sparql.graph.GraphFactory;
 import com.hp.hpl.jena.testing_framework.AbstractGraphProducer;
 
-@RunWith(Suite.class)
+@RunWith( ContractSuite.class )
+@ContractImpl( MultiUnion.class )
 public class MultiUnionSuite extends AbstractGraphSuite {
 
-	@BeforeClass
-	public static void beforeClass() {
-		setGraphProducer(new AbstractGraphProducer<MultiUnion>() {
-			@Override
-			protected MultiUnion createNewGraph() {
-				Graph gBase = GraphFactory.createDefaultGraph();
-				Graph g1 = GraphFactory.createDefaultGraph();
-				Graph g2 = GraphFactory.createDefaultGraph();
-				MultiUnion poly = new MultiUnion(new Graph[] { gBase, g1, g2 });
-				poly.setBaseGraph(gBase);
-				return poly;
-			}
+	
+	private AbstractGraphProducer<MultiUnion> producer = new 
+			AbstractGraphProducer<MultiUnion>() {
+		@Override
+		protected MultiUnion createNewGraph() {
+			Graph gBase = GraphFactory.createDefaultGraph();
+			Graph g1 = GraphFactory.createDefaultGraph();
+			Graph g2 = GraphFactory.createDefaultGraph();
+			MultiUnion poly = new MultiUnion(new Graph[] { gBase, g1, g2 });
+			poly.setBaseGraph(gBase);
+			return poly;
+		}
 
-		});
+	};
+
+	@Dynamic.Inject
+	public IProducer<? extends Graph> getCollectionGraphSuiteProducer() {
+		return producer;
 	}
 }

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/MultiUnionTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/MultiUnionTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/MultiUnionTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/MultiUnionTest.java Mon Oct 21 06:40:58 2013
@@ -20,8 +20,6 @@
 ///////////////
 package com.hp.hpl.jena.graph.compose;
 
-// Imports
-///////////////
 import static org.junit.Assert.*;
 import static com.hp.hpl.jena.testing_framework.GraphHelper.*;
 
@@ -54,22 +52,39 @@ import com.hp.hpl.jena.testing_framework
  */
 @RunWith(ContractSuite.class)
 @ContractImpl(MultiUnion.class)
-public class MultiUnionTest {
+public class MultiUnionTest extends PolyadicTest<MultiUnion>{
 
-	public IProducer<MultiUnion> producer = new AbstractGraphProducer<MultiUnion>() {
-		@Override
-		protected MultiUnion createNewGraph() {
-			return new MultiUnion(new Graph[] { GraphFactory.createGraphMem(),
-					GraphFactory.createGraphMem() });
+	
+	public MultiUnionTest()
+	{
+		producer = new AbstractGraphProducer<MultiUnion>() {
+			@Override
+			protected MultiUnion createNewGraph() {
+				return new MultiUnion(new Graph[] { memGraph(),
+						memGraph() });
+
+			}};
+	}
+		
+	
+	protected final IProducer<? extends MultiUnion> getMultiUnionProducer()
+	{
+		return producer;
+	}
+	
 
-		}
-	};
+	public final void setMultiUnionProducer(IProducer<? extends MultiUnion> producer)
+	{
+		this.producer = (IProducer<MultiUnion>) producer;
+	}
 
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
-	public IProducer<? extends MultiUnion> getGraphProducer() {
+	@Contract.Inject
+	public final IProducer<? extends MultiUnion> getProducer()
+	{
 		return producer;
 	}
 
+
 	// External signature methods
 	// ////////////////////////////////
 
@@ -84,7 +99,7 @@ public class MultiUnionTest {
 	}
 
 	/**
-	 * A MultiUnion graph should have a MultiUnionStatisticsHandler, and that
+	 * Foo MultiUnion graph should have a MultiUnionStatisticsHandler, and that
 	 * handler should point right back to that graph.
 	 */
 	@Test

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/PolyadicPrefixMappingTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/PolyadicPrefixMappingTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/PolyadicPrefixMappingTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/PolyadicPrefixMappingTest.java Mon Oct 21 06:40:58 2013
@@ -84,7 +84,7 @@ public class PolyadicPrefixMappingTest {
 
 	};
 
-	@Inject( "org.xenei.junit.contract.IProducer<%s>" )
+	@Inject
 	public PolyadicPrefixMappingProducer getMappingProducer() {
 		return producer;
 	}



Mime
View raw message