You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by sa...@apache.org on 2013/01/29 21:27:39 UTC

svn commit: r1440101 [14/16] - in /jena/branches/streaming-update: ./ apache-jena-libs/ apache-jena/ apache-jena/bat/ apache-jena/bin/ jena-arq/ jena-arq/src-examples/arq/examples/riot/ jena-arq/src/main/java/arq/ jena-arq/src/main/java/arq/cmdline/ je...

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestResourceFactory.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestResourceFactory.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestResourceFactory.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestResourceFactory.java Tue Jan 29 20:27:24 2013
@@ -1,14 +1,14 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * regarding copyright ownership. The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,181 +18,211 @@
 
 package com.hp.hpl.jena.rdf.model.test;
 
-import java.util.Calendar;
-import java.util.GregorianCalendar;
-import java.util.TimeZone;
-
 import com.hp.hpl.jena.datatypes.RDFDatatype;
 import com.hp.hpl.jena.datatypes.xsd.XSDDatatype;
-import com.hp.hpl.jena.rdf.model.*;
+import com.hp.hpl.jena.rdf.model.Literal;
+import com.hp.hpl.jena.rdf.model.Property;
+import com.hp.hpl.jena.rdf.model.RDFNode;
+import com.hp.hpl.jena.rdf.model.Resource;
+import com.hp.hpl.jena.rdf.model.ResourceFactory;
+import com.hp.hpl.jena.rdf.model.Statement;
 
-import junit.framework.*;
-
-public class TestResourceFactory extends TestCase {
-    
-    static final String uri1 = "http://example.org/example#a1";
-    static final String uri2 = "http://example.org/example#a2";
-    
-    public static TestSuite suite() {
-        return new TestSuite(TestResourceFactory.class);
-    }
-
-    public TestResourceFactory(String name) {
-        super(name);
-    }
-
-    public void testCreateResource() {
-        Resource r1 = ResourceFactory.createResource();
-        assertTrue(r1.isAnon());
-        Resource r2 = ResourceFactory.createResource();
-        assertTrue(r2.isAnon());
-        assertTrue(!r1.equals(r2));
-        
-        r1 = ResourceFactory.createResource(uri1);
-        assertTrue(r1.getURI().equals(uri1));
-    }
-
-    public void testCreateProperty() {
-        Property p1 = ResourceFactory.createProperty(uri1);
-        assertTrue(p1.getURI().equals(uri1));
-        Property p2 = ResourceFactory.createProperty(uri1, "2");
-        assertTrue(p2.getURI().equals(uri1+"2"));
-    }
-
-    public void testCreateLiteral()
-    {
-        Literal l = ResourceFactory.createPlainLiteral("lex") ;
-        assertTrue(l.getLexicalForm().equals("lex")) ;
-        assertTrue(l.getLanguage().equals("")) ;
-        assertNull(l.getDatatype()) ;
-        assertNull(l.getDatatypeURI()) ;
-    }
-    
-    public void testCreateLangLiteral()
-    {
-        Literal l = ResourceFactory.createLangLiteral("lex", "en") ;
-        assertTrue(l.getLexicalForm().equals("lex")) ;
-        assertTrue(l.getLanguage().equals("en")) ;
-        assertNull(l.getDatatype()) ;
-        assertNull(l.getDatatypeURI()) ;
-    }
-    
-    public void testCreateTypedLiteral()
-    {
-        Literal l = ResourceFactory.createTypedLiteral("22", XSDDatatype.XSDinteger) ;
-        assertTrue(l.getLexicalForm().equals("22")) ;
-        assertTrue(l.getLanguage().equals("")) ;
-        assertTrue(l.getDatatype()==XSDDatatype.XSDinteger) ;
-        assertTrue(l.getDatatypeURI().equals(XSDDatatype.XSDinteger.getURI())) ;
-        
-    }
-    
-    public void testCreateTypedLiteralObject()
-    {
-        Literal l = ResourceFactory.createTypedLiteral(new Integer(22)) ;
-        assertEquals("22", l.getLexicalForm()) ;
-        assertEquals("", l.getLanguage()) ;
-        assertEquals(XSDDatatype.XSDint, l.getDatatype()) ;
-    }
-    
-    public void testCreateTypedLiteralOverload() {
-        Calendar testCal = new GregorianCalendar(TimeZone.getTimeZone("GMT"));
-        testCal.set(1999, 4, 30, 15, 9, 32);
-        testCal.set(Calendar.MILLISECOND, 0);   // ms field can be undefined on Linux
-        Literal lc = ResourceFactory.createTypedLiteral(testCal);
-        assertEquals("calendar overloading test", 
-                ResourceFactory.createTypedLiteral("1999-05-30T15:09:32Z", XSDDatatype.XSDdateTime), lc );
-        
-    }
-
-    public void testCreateStatement() {
-        Resource s = ResourceFactory.createResource();
-        Property p = ResourceFactory.createProperty(uri2);
-        Resource o = ResourceFactory.createResource();
-        Statement stmt = ResourceFactory.createStatement(s, p, o);
-        assertTrue(stmt.getSubject().equals(s));
-        assertTrue(stmt.getPredicate().equals(p));
-        assertTrue(stmt.getObject().equals(o));
-    }
-
-    public void testGetInstance() {
-        ResourceFactory.Interface factory = ResourceFactory.getInstance();
-        Resource r1 = ResourceFactory.createResource();
-        assertTrue(r1.isAnon());
-        Resource r2 = ResourceFactory.createResource();
-        assertTrue(r2.isAnon());
-        assertTrue(!r1.equals(r2));
-    }
-
-    public void testSetInstance()
-    {
-        ResourceFactory.Interface original = ResourceFactory.getInstance() ;
-        try {
-            Resource r = ResourceFactory.createResource() ;
-            ResourceFactory.Interface factory = new TestFactory(r) ;
-            ResourceFactory.setInstance(factory) ;
-            assertTrue(factory.equals(ResourceFactory.getInstance())) ;
-            assertTrue(ResourceFactory.createResource() == r) ;
-        } finally { ResourceFactory.setInstance(original) ; }
-    }
-    class TestFactory implements ResourceFactory.Interface {
-
-        Resource resource;
-
-        TestFactory(Resource r) {
-            resource = r;
-        }
-
-        @Override
-        public Resource createResource() {
-            return resource;
-        }
-
-        @Override
-        public Resource createResource(String uriref) {
-            return null;
-        }
-        
-        @Override
-        public Literal createPlainLiteral( String string ) {
-            return null;
-        }
-
-        @Override
-        public Literal createLangLiteral( String string, String lang ) {
-            return null;
-        }
-
-
-        @Override
-        public Literal createTypedLiteral(String string, RDFDatatype datatype)
-        {
-            return null ;
-        }
-
-        @Override
-        public Literal createTypedLiteral(Object value)
-        {
-            return null ;
-        }
-
-        @Override
-        public Property createProperty(String uriref) {
-            return null;
-        }
-
-        @Override
-        public Property createProperty(String namespace, String localName) {
-            return null;
-        }
-
-        @Override
-        public Statement createStatement(
-            Resource subject,
-            Property predicate,
-            RDFNode object) {
-            return null;
-        }
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+import java.util.TimeZone;
 
-    }
+import junit.framework.Assert;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+public class TestResourceFactory extends TestCase
+{
+
+	class TestFactory implements ResourceFactory.Interface
+	{
+
+		Resource resource;
+
+		TestFactory( final Resource r )
+		{
+			resource = r;
+		}
+
+		@Override
+		public Literal createLangLiteral( final String string, final String lang )
+		{
+			return null;
+		}
+
+		@Override
+		public Literal createPlainLiteral( final String string )
+		{
+			return null;
+		}
+
+		@Override
+		public Property createProperty( final String uriref )
+		{
+			return null;
+		}
+
+		@Override
+		public Property createProperty( final String namespace,
+				final String localName )
+		{
+			return null;
+		}
+
+		@Override
+		public Resource createResource()
+		{
+			return resource;
+		}
+
+		@Override
+		public Resource createResource( final String uriref )
+		{
+			return null;
+		}
+
+		@Override
+		public Statement createStatement( final Resource subject,
+				final Property predicate, final RDFNode object )
+		{
+			return null;
+		}
+
+		@Override
+		public Literal createTypedLiteral( final Object value )
+		{
+			return null;
+		}
+
+		@Override
+		public Literal createTypedLiteral( final String string,
+				final RDFDatatype datatype )
+		{
+			return null;
+		}
+
+	}
+
+	static final String uri1 = "http://example.org/example#a1";
+
+	static final String uri2 = "http://example.org/example#a2";
+
+	public static TestSuite suite()
+	{
+		return new TestSuite(TestResourceFactory.class);
+	}
+
+	public TestResourceFactory( final String name )
+	{
+		super(name);
+	}
+
+	public void testCreateLiteral()
+	{
+		final Literal l = ResourceFactory.createPlainLiteral("lex");
+		Assert.assertTrue(l.getLexicalForm().equals("lex"));
+		Assert.assertTrue(l.getLanguage().equals(""));
+		Assert.assertNull(l.getDatatype());
+		Assert.assertNull(l.getDatatypeURI());
+	}
+
+	public void testCreateProperty()
+	{
+		final Property p1 = ResourceFactory
+				.createProperty(TestResourceFactory.uri1);
+		Assert.assertTrue(p1.getURI().equals(TestResourceFactory.uri1));
+		final Property p2 = ResourceFactory.createProperty(
+				TestResourceFactory.uri1, "2");
+		Assert.assertTrue(p2.getURI().equals(TestResourceFactory.uri1 + "2"));
+	}
+
+	public void testCreateResource()
+	{
+		Resource r1 = ResourceFactory.createResource();
+		Assert.assertTrue(r1.isAnon());
+		final Resource r2 = ResourceFactory.createResource();
+		Assert.assertTrue(r2.isAnon());
+		Assert.assertTrue(!r1.equals(r2));
+
+		r1 = ResourceFactory.createResource(TestResourceFactory.uri1);
+		Assert.assertTrue(r1.getURI().equals(TestResourceFactory.uri1));
+	}
+
+	public void testCreateStatement()
+	{
+		final Resource s = ResourceFactory.createResource();
+		final Property p = ResourceFactory
+				.createProperty(TestResourceFactory.uri2);
+		final Resource o = ResourceFactory.createResource();
+		final Statement stmt = ResourceFactory.createStatement(s, p, o);
+		Assert.assertTrue(stmt.getSubject().equals(s));
+		Assert.assertTrue(stmt.getPredicate().equals(p));
+		Assert.assertTrue(stmt.getObject().equals(o));
+	}
+
+	public void testCreateTypedLiteral()
+	{
+		final Literal l = ResourceFactory.createTypedLiteral("22",
+				XSDDatatype.XSDinteger);
+		Assert.assertTrue(l.getLexicalForm().equals("22"));
+		Assert.assertTrue(l.getLanguage().equals(""));
+		Assert.assertTrue(l.getDatatype() == XSDDatatype.XSDinteger);
+		Assert.assertTrue(l.getDatatypeURI().equals(
+				XSDDatatype.XSDinteger.getURI()));
+
+	}
+
+	public void testCreateTypedLiteralObject()
+	{
+		final Literal l = ResourceFactory.createTypedLiteral(new Integer(22));
+		Assert.assertEquals("22", l.getLexicalForm());
+		Assert.assertEquals("", l.getLanguage());
+		Assert.assertEquals(XSDDatatype.XSDint, l.getDatatype());
+	}
+
+	public void testCreateTypedLiteralOverload()
+	{
+		final Calendar testCal = new GregorianCalendar(
+				TimeZone.getTimeZone("GMT"));
+		testCal.set(1999, 4, 30, 15, 9, 32);
+		testCal.set(Calendar.MILLISECOND, 0); // ms field can be undefined on
+		// Linux
+		final Literal lc = ResourceFactory.createTypedLiteral(testCal);
+		Assert.assertEquals("calendar overloading test", ResourceFactory
+				.createTypedLiteral("1999-05-30T15:09:32Z",
+						XSDDatatype.XSDdateTime), lc);
+
+	}
+
+	public void testGetInstance()
+	{
+		ResourceFactory.getInstance();
+		final Resource r1 = ResourceFactory.createResource();
+		Assert.assertTrue(r1.isAnon());
+		final Resource r2 = ResourceFactory.createResource();
+		Assert.assertTrue(r2.isAnon());
+		Assert.assertTrue(!r1.equals(r2));
+	}
+
+	public void testSetInstance()
+	{
+		final Resource r = ResourceFactory.createResource();
+		final ResourceFactory.Interface oldFactory = ResourceFactory
+				.getInstance();
+		final ResourceFactory.Interface factory = new TestFactory(r);
+		try
+		{
+			ResourceFactory.setInstance(factory);
+			Assert.assertTrue(factory.equals(ResourceFactory.getInstance()));
+			Assert.assertTrue(ResourceFactory.createResource() == r);
+		}
+		finally
+		{
+			ResourceFactory.setInstance(oldFactory);
+		}
+	}
 }

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestResourceImpl.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestResourceImpl.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestResourceImpl.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestResourceImpl.java Tue Jan 29 20:27:24 2013
@@ -1,14 +1,14 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * regarding copyright ownership. The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,215 +18,231 @@
 
 package com.hp.hpl.jena.rdf.model.test;
 
-import com.hp.hpl.jena.rdf.model.*;
+import com.hp.hpl.jena.rdf.model.Literal;
+import com.hp.hpl.jena.rdf.model.Model;
+import com.hp.hpl.jena.rdf.model.Resource;
+import com.hp.hpl.jena.rdf.model.ResourceFactory;
+import com.hp.hpl.jena.rdf.model.ResourceRequiredException;
+import com.hp.hpl.jena.rdf.model.test.helpers.ModelHelper;
+import com.hp.hpl.jena.rdf.model.test.helpers.TestingModelFactory;
+import com.hp.hpl.jena.test.JenaTestBase;
 import com.hp.hpl.jena.vocabulary.RDF;
 
-import junit.framework.*;
+import junit.framework.Assert;
 
 /**
-	TestResourceImpl - fresh tests, make sure as-ing works a bit.
-
-	@author kers
-*/
-public class TestResourceImpl extends ModelTestBase 
-    {
-	public TestResourceImpl( String name ) 
-        { super(name); }
-
-    public static TestSuite suite()
-        { return new TestSuite( TestResourceImpl.class ); }
-
-    /**
-        Test that a non-literal node can be as'ed into a resource
-    */
-    public void testCannotAsNonLiteral()
-        { Model m = ModelFactory.createDefaultModel();  
-        resource( m, "plumPie" ).as( Resource.class ); }
-    
-    /**
-        Test that a literal node cannot be as'ed into a resource.
-    */    
-    public void testAsLiteral()
-        { Model m = ModelFactory.createDefaultModel();  
-        try 
-            { literal( m, "17" ).as( Resource.class );  
-            fail( "literals cannot be resources"); }
-        catch (ResourceRequiredException e)
-            { pass(); }}
-    
-    public void testNameSpace()
-        { 
-        assertEquals( "eh:", resource( "eh:xyz" ).getNameSpace() ); 
-        assertEquals( "http://d/", resource( "http://d/stuff" ).getNameSpace() ); 
-        assertEquals( "ftp://dd.com/12345", resource( "ftp://dd.com/12345" ).getNameSpace() ); 
-        assertEquals( "http://domain/spoo#", resource( "http://domain/spoo#anchor" ).getNameSpace() ); 
-        assertEquals( "ftp://abd/def#ghi#", resource( "ftp://abd/def#ghi#e11-2" ).getNameSpace() ); 
-        }
-    
-    public void testGetModel()
-        {
-        Model m = ModelFactory.createDefaultModel();
-        assertSame( m, m.createResource( "eh:/wossname" ).getModel() );
-        }
-    
-    public void testGetLocalNameReturnsLocalName()
-        { 
-        assertEquals( "xyz", resource( "eh:xyz" ).getLocalName() );
-        }
-    
-    public void testHasURI()
-        { 
-        assertTrue( resource( "eh:xyz" ).hasURI( "eh:xyz" ) );
-        assertFalse( resource( "eh:xyz" ).hasURI( "eh:1yz" ) );
-        assertFalse( ResourceFactory.createResource().hasURI( "42" ) );
-        }
-    
-    public void testAddTypedPropertyDouble()
-        {
-        Model m = ModelFactory.createDefaultModel();
-        Resource r = m.createResource();
-        r.addLiteral( RDF.value, 1.0d );
-        assertEquals( m.createTypedLiteral( 1.0d ), r.getProperty( RDF.value ).getLiteral() );
-        }
-    
-    public void testAddTypedPropertyFloat()
-        {
-        Model m = ModelFactory.createDefaultModel();
-        Resource r = m.createResource();
-        r.addLiteral( RDF.value, 1.0f );
-        assertEquals( m.createTypedLiteral( 1.0f ), r.getProperty( RDF.value ).getLiteral() );
-        }
-    
-    public void testHasTypedPropertyDouble()
-        {
-        Model m = ModelFactory.createDefaultModel();
-        Resource r = m.createResource();
-        r.addLiteral( RDF.value, 1.0d );
-        assertTrue( r.hasLiteral( RDF.value, 1.0d ) );       
-        }
-    
-    public void testHasTypedPropertyFloat()
-        {
-        Model m = ModelFactory.createDefaultModel();
-        Resource r = m.createResource();
-        r.addLiteral( RDF.value, 1.0f );
-        assertTrue( r.hasLiteral( RDF.value, 1.0f ) );       
-        }
-    
-    public void testAddTypedPropertyLong()
-        {
-        Model m = ModelFactory.createDefaultModel();
-        Resource r = m.createResource();
-        r.addLiteral( RDF.value, 1L );
-        assertEquals( m.createTypedLiteral( 1L ), r.getProperty( RDF.value ).getLiteral() );
-        }
-    
-    public void testHasTypedPropertyLong()
-        {
-        Model m = ModelFactory.createDefaultModel();
-        Resource r = m.createResource();
-        r.addLiteral( RDF.value, 1L );
-        assertTrue( r.hasLiteral( RDF.value, 1L ) );       
-        }
-    
-    public void testAddTypedPropertyInt()
-        {
-//        Model m = ModelFactory.createDefaultModel();
-//        Resource r = m.createResource();
-//        r.addLiteral( RDF.value, 1 );
-//        assertEquals( m.createTypedLiteral( 1 ), r.getProperty( RDF.value ).getLiteral() );
-        }
-    
-    public void testHasTypedPropertyInt()
-        {
-        Model m = ModelFactory.createDefaultModel();
-        Resource r = m.createResource();
-        r.addLiteral( RDF.value, 1 );
-        assertTrue( r.hasLiteral( RDF.value, 1 ) ); 
-        }
-    
-    public void testAddTypedPropertyChar()
-        {
-        Model m = ModelFactory.createDefaultModel();
-        Resource r = m.createResource();
-        r.addLiteral( RDF.value, 'x' );
-        assertEquals( m.createTypedLiteral( 'x' ), r.getProperty( RDF.value ).getLiteral() );
-        }
-    
-    public void testHasTypedPropertyChar()
-        {
-        Model m = ModelFactory.createDefaultModel();
-        Resource r = m.createResource();
-        r.addLiteral( RDF.value, 'x' );
-        assertTrue( r.hasLiteral( RDF.value, 'x' ) );     
-        }
-    
-    public void testAddTypedPropertyBoolean()
-        {
-        Model m = ModelFactory.createDefaultModel();
-        Resource r = m.createResource();
-        r.addLiteral( RDF.value, true );
-        assertEquals( m.createTypedLiteral( true ), r.getProperty( RDF.value ).getLiteral() );
-        }
-    
-    public void testHasTypedPropertyBoolean()
-        {
-        Model m = ModelFactory.createDefaultModel();
-        Resource r = m.createResource();
-        r.addLiteral( RDF.value, false );
-        assertTrue( r.hasLiteral( RDF.value, false ) ); 
-        }
-    
-    public void testAddTypedPropertyString()
-        {
-        
-        }
-    
-    public void testHasTypedPropertyString()
-        {
-        
-        }
-    
-    public void testAddTypedPropertyObject()
-        {
-        Object z = new Object();
-        Model m = ModelFactory.createDefaultModel();
-        Resource r = m.createResource();
-        r.addLiteral( RDF.value, z );
-        assertEquals( m.createTypedLiteral( z ), r.getProperty( RDF.value ).getLiteral() );
-        }
-    
-    public void testAddLiteralPassesLiteralUnmodified()
-        {
-        Model m = ModelFactory.createDefaultModel();
-        Resource r = m.createResource();
-        Literal lit = m.createLiteral( "spoo" );
-        r.addLiteral( RDF.value, lit );
-        assertTrue( "model should contain unmodified literal", m.contains( null, RDF.value, lit ) );       
-        }
-    
-    public void testHasTypedPropertyObject()
-        {
-        Object z = new Object();
-        Model m = ModelFactory.createDefaultModel();
-        Resource r = m.createResource();
-        r.addLiteral( RDF.value, z );
-        assertTrue( r.hasLiteral( RDF.value, z ) ); 
-        }
-    
-    public void testGetPropertyResourceValueReturnsResource()
-        {
-        Model m = modelWithStatements( "x p 17; x p y" );
-        Resource r = m.createResource( "eh:/x" );
-        Resource value = r.getPropertyResourceValue( property( "p" ) );
-        assertEquals( resource( "y" ), value );
-        }
-    
-    public void testGetPropertyResourceValueReturnsNull()
-        {
-        Model m = modelWithStatements( "x p 17" );
-        Resource r = m.createResource( "eh:/x" );
-        assertNull( r.getPropertyResourceValue( property( "q" ) ) );
-        assertNull( r.getPropertyResourceValue( property( "p" ) ) );
-        }
-    }
+ * TestResourceImpl - fresh tests, make sure as-ing works a bit.
+ */
+public class TestResourceImpl extends AbstractModelTestBase
+{
+	public TestResourceImpl( final TestingModelFactory modelFactory,
+			final String name )
+	{
+		super(modelFactory, name);
+	}
+
+	public void testAddLiteralPassesLiteralUnmodified()
+	{
+		final Resource r = model.createResource();
+		final Literal lit = model.createLiteral("spoo");
+		r.addLiteral(RDF.value, lit);
+		Assert.assertTrue("model should contain unmodified literal",
+				model.contains(null, RDF.value, lit));
+	}
+
+	public void testAddTypedPropertyBoolean()
+	{
+		final Resource r = model.createResource();
+		r.addLiteral(RDF.value, true);
+		Assert.assertEquals(model.createTypedLiteral(true),
+				r.getProperty(RDF.value).getLiteral());
+	}
+
+	public void testAddTypedPropertyChar()
+	{
+		final Resource r = model.createResource();
+		r.addLiteral(RDF.value, 'x');
+		Assert.assertEquals(model.createTypedLiteral('x'),
+				r.getProperty(RDF.value).getLiteral());
+	}
+
+	public void testAddTypedPropertyDouble()
+	{
+		final Resource r = model.createResource();
+		r.addLiteral(RDF.value, 1.0d);
+		Assert.assertEquals(model.createTypedLiteral(1.0d),
+				r.getProperty(RDF.value).getLiteral());
+	}
+
+	public void testAddTypedPropertyFloat()
+	{
+		final Resource r = model.createResource();
+		r.addLiteral(RDF.value, 1.0f);
+		Assert.assertEquals(model.createTypedLiteral(1.0f),
+				r.getProperty(RDF.value).getLiteral());
+	}
+
+	public void testAddTypedPropertyInt()
+	{
+		// Model model = ModelFactory.createDefaultModel();
+		// Resource r = model.createResource();
+		// r.addLiteral( RDF.value, 1 );
+		// assertEquals( model.createTypedLiteral( 1 ), r.getProperty( RDF.value
+		// ).getLiteral() );
+	}
+
+	public void testAddTypedPropertyLong()
+	{
+		final Resource r = model.createResource();
+		r.addLiteral(RDF.value, 1L);
+		Assert.assertEquals(model.createTypedLiteral(1L),
+				r.getProperty(RDF.value).getLiteral());
+	}
+
+	public void testAddTypedPropertyObject()
+	{
+		final Object z = new Object();
+		final Resource r = model.createResource();
+		r.addLiteral(RDF.value, z);
+		Assert.assertEquals(model.createTypedLiteral(z),
+				r.getProperty(RDF.value).getLiteral());
+	}
+
+	public void testAddTypedPropertyString()
+	{
+
+	}
+
+	/**
+	 * Test that a literal node cannot be as'ed into a resource.
+	 */
+	public void testAsLiteral()
+	{
+		try
+		{
+			ModelHelper.literal(model, "17").as(Resource.class);
+			Assert.fail("literals cannot be resources");
+		}
+		catch (final ResourceRequiredException e)
+		{
+			JenaTestBase.pass();
+		}
+	}
+
+	/**
+	 * Test that a non-literal node can be as'ed into a resource
+	 */
+	public void testCannotAsNonLiteral()
+	{
+		ModelHelper.resource(model, "plumPie").as(Resource.class);
+	}
+
+	public void testGetLocalNameReturnsLocalName()
+	{
+		Assert.assertEquals("xyz", ModelHelper.resource("eh:xyz")
+				.getLocalName());
+	}
+
+	public void testGetModel()
+	{
+
+		Assert.assertSame(model, model.createResource("eh:/wossname")
+				.getModel());
+	}
+
+	public void testGetPropertyResourceValueReturnsNull()
+	{
+		final Model model = ModelHelper.modelWithStatements(this, "x p 17");
+		final Resource r = model.createResource("eh:/x");
+		Assert.assertNull(r.getPropertyResourceValue(ModelHelper.property("q")));
+		Assert.assertNull(r.getPropertyResourceValue(ModelHelper.property("p")));
+	}
+
+	public void testGetPropertyResourceValueReturnsResource()
+	{
+		final Model model = ModelHelper.modelWithStatements(this,
+				"x p 17; x p y");
+		final Resource r = model.createResource("eh:/x");
+		final Resource value = r.getPropertyResourceValue(ModelHelper
+				.property("p"));
+		Assert.assertEquals(ModelHelper.resource("y"), value);
+	}
+
+	public void testHasTypedPropertyBoolean()
+	{
+		final Resource r = model.createResource();
+		r.addLiteral(RDF.value, false);
+		Assert.assertTrue(r.hasLiteral(RDF.value, false));
+	}
+
+	public void testHasTypedPropertyChar()
+	{
+		final Resource r = model.createResource();
+		r.addLiteral(RDF.value, 'x');
+		Assert.assertTrue(r.hasLiteral(RDF.value, 'x'));
+	}
+
+	public void testHasTypedPropertyDouble()
+	{
+		final Resource r = model.createResource();
+		r.addLiteral(RDF.value, 1.0d);
+		Assert.assertTrue(r.hasLiteral(RDF.value, 1.0d));
+	}
+
+	public void testHasTypedPropertyFloat()
+	{
+		final Resource r = model.createResource();
+		r.addLiteral(RDF.value, 1.0f);
+		Assert.assertTrue(r.hasLiteral(RDF.value, 1.0f));
+	}
+
+	public void testHasTypedPropertyInt()
+	{
+		final Resource r = model.createResource();
+		r.addLiteral(RDF.value, 1);
+		Assert.assertTrue(r.hasLiteral(RDF.value, 1));
+	}
+
+	public void testHasTypedPropertyLong()
+	{
+
+		final Resource r = model.createResource();
+		r.addLiteral(RDF.value, 1L);
+		Assert.assertTrue(r.hasLiteral(RDF.value, 1L));
+	}
+
+	public void testHasTypedPropertyObject()
+	{
+		final Object z = new Object();
+		final Resource r = model.createResource();
+		r.addLiteral(RDF.value, z);
+		Assert.assertTrue(r.hasLiteral(RDF.value, z));
+	}
+
+	public void testHasTypedPropertyString()
+	{
+
+	}
+
+	public void testHasURI()
+	{
+		Assert.assertTrue(ModelHelper.resource("eh:xyz").hasURI("eh:xyz"));
+		Assert.assertFalse(ModelHelper.resource("eh:xyz").hasURI("eh:1yz"));
+		Assert.assertFalse(ResourceFactory.createResource().hasURI("42"));
+	}
+
+	public void testNameSpace()
+	{
+		Assert.assertEquals("eh:", ModelHelper.resource("eh:xyz")
+				.getNameSpace());
+		Assert.assertEquals("http://d/", ModelHelper.resource("http://d/stuff")
+				.getNameSpace());
+		Assert.assertEquals("ftp://dd.com/12345",
+				ModelHelper.resource("ftp://dd.com/12345").getNameSpace());
+		Assert.assertEquals("http://domain/spoo#",
+				ModelHelper.resource("http://domain/spoo#anchor")
+						.getNameSpace());
+		Assert.assertEquals("ftp://abd/def#ghi#",
+				ModelHelper.resource("ftp://abd/def#ghi#e11-2").getNameSpace());
+	}
+}

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestSelectors.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestSelectors.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestSelectors.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestSelectors.java Tue Jan 29 20:27:24 2013
@@ -1,14 +1,14 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * regarding copyright ownership. The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,36 +18,43 @@
 
 package com.hp.hpl.jena.rdf.model.test;
 
-import com.hp.hpl.jena.rdf.model.*;
-import junit.framework.*;
+import com.hp.hpl.jena.rdf.model.Property;
+import com.hp.hpl.jena.rdf.model.RDFNode;
+import com.hp.hpl.jena.rdf.model.Resource;
+import com.hp.hpl.jena.rdf.model.Selector;
+import com.hp.hpl.jena.rdf.model.SimpleSelector;
+import com.hp.hpl.jena.rdf.model.test.helpers.ModelHelper;
+import com.hp.hpl.jena.rdf.model.test.helpers.TestingModelFactory;
 
-/**
- 	@author kers
-*/
-public class TestSelectors extends ModelTestBase
-    {
-    public TestSelectors( String name )
-        { super( name ); }
-
-    public static TestSuite suite()
-        { return new TestSuite( TestSelectors.class ); }
-        
-     public void testSelectors()
-        {
-        Model m = ModelFactory.createDefaultModel();
-        check( null, null, null );
-        check( resource( m, "A" ), null, null );
-        check( null, property( m, "B" ), null );
-        check( null, null, literal( m, "10" ) );
-        check( resource( m, "C" ), property( m, "D" ), resource( m, "_E" ) );
-        }
-        
-    public void check( Resource S, Property P, RDFNode O )
-        {
-        Selector s = new SimpleSelector( S, P, O );
-        assertTrue( s.isSimple() );
-        assertEquals( S, s.getSubject() );
-        assertEquals( P, s.getPredicate() );
-        assertEquals( O, s.getObject() );
-        }   
-    }
+import junit.framework.Assert;
+
+public class TestSelectors extends AbstractModelTestBase
+{
+
+	public TestSelectors( final TestingModelFactory modelFactory,
+			final String name )
+	{
+		super(modelFactory, name);
+	}
+
+	public void check( final Resource S, final Property P, final RDFNode O )
+	{
+		final Selector s = new SimpleSelector(S, P, O);
+		Assert.assertTrue(s.isSimple());
+		Assert.assertEquals(S, s.getSubject());
+		Assert.assertEquals(P, s.getPredicate());
+		Assert.assertEquals(O, s.getObject());
+	}
+
+	public void testSelectors()
+	{
+
+		check(null, null, null);
+		check(ModelHelper.resource(model, "A"), null, null);
+		check(null, ModelHelper.property(model, "B"), null);
+		check(null, null, ModelHelper.literal(model, "10"));
+		check(ModelHelper.resource(model, "C"),
+				ModelHelper.property(model, "D"),
+				ModelHelper.resource(model, "_E"));
+	}
+}

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestSimpleListStatements.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestSimpleListStatements.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestSimpleListStatements.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestSimpleListStatements.java Tue Jan 29 20:27:24 2013
@@ -1,14 +1,14 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * regarding copyright ownership. The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,205 +18,245 @@
 
 package com.hp.hpl.jena.rdf.model.test;
 
-/**
-	@author bwm out of kers
-*/
+import com.hp.hpl.jena.rdf.model.Model;
+import com.hp.hpl.jena.rdf.model.Property;
+import com.hp.hpl.jena.rdf.model.RDFNode;
+import com.hp.hpl.jena.rdf.model.Resource;
+import com.hp.hpl.jena.rdf.model.Selector;
+import com.hp.hpl.jena.rdf.model.SimpleSelector;
+import com.hp.hpl.jena.rdf.model.Statement;
+import com.hp.hpl.jena.rdf.model.StmtIterator;
+import com.hp.hpl.jena.rdf.model.test.helpers.ModelHelper;
+import com.hp.hpl.jena.rdf.model.test.helpers.TestingModelFactory;
+import com.hp.hpl.jena.vocabulary.RDF;
 
 import java.util.List;
 
-import com.hp.hpl.jena.rdf.model.*;
-import com.hp.hpl.jena.vocabulary.*;
+import junit.framework.Assert;
 
+public class TestSimpleListStatements extends AbstractModelTestBase
+{
 
-import junit.framework.*;
+	static boolean booleanValue = true;
 
-public class TestSimpleListStatements extends ModelTestBase
-    {    
-        
-    public TestSimpleListStatements( String name )
-        { super( name ); }
-    
-    public static TestSuite suite()
-        { return new TestSuite( TestSimpleListStatements.class ); }   
-    
-    Model model = null; 
-    
-    static boolean booleanValue = true;
-    static char    charValue   = 'c';
-    static long    longValue   = 456;
-    static float   floatValue  = 5.67F;
-    static double  doubleValue = 6.78;
-    static String   stringValue ="stringValue";
-    static String   langValue   = "en";   
-        
-    @Override
-    protected void setUp() throws java.lang.Exception {
-        
-    	model = ModelFactory.createDefaultModel();
-    	model.createResource("http://example.org/boolean")
-    	     .addLiteral(RDF.value, booleanValue);             
-        model.createResource("http://example.org/char")
-             .addLiteral(RDF.value, charValue);             
-        model.createResource("http://example.org/long")             
-             .addLiteral(RDF.value, longValue);              
-        model.createResource("http://example.org/float")
-             .addLiteral(RDF.value, floatValue);            
-        model.createResource("http://example.org/double")
-             .addLiteral(RDF.value, doubleValue);             
-        model.createResource("http://example.org/string")
-             .addProperty(RDF.value, stringValue);             
-        model.createResource("http://example.org/langString")
-             .addProperty(RDF.value, stringValue, langValue);
-    	
-    }
-    
-    @Override
-    protected void tearDown() throws java.lang.Exception {
-    	model.close();
-        model = null;
-    }
-    
-    public void testBoolean() 
-        {
-        List<Statement> got = model.listLiteralStatements( null, null, booleanValue ).toList();
-        assertEquals( 1, got.size() );
-        Statement it = got.get( 0 );
-        assertEquals( resource( "http://example.org/boolean" ), it.getSubject() );
-        assertEquals( model.createTypedLiteral( booleanValue ), it.getObject() );
-        }
-    
-    public void testChar() 
-        {
-        List<Statement> got = model.listLiteralStatements( null, null, charValue ).toList();
-        assertEquals( 1, got.size() );
-        Statement it = got.get( 0 );
-        assertEquals( resource( "http://example.org/char" ), it.getSubject() );
-        assertEquals( model.createTypedLiteral( charValue ), it.getObject() );
-        }
-    
-    public void testLong() 
-        {
-        List<Statement> got = model.listLiteralStatements( null, null, longValue ).toList();
-        assertEquals( 1, got.size() );
-        Statement it = got.get( 0 );
-        assertEquals( resource( "http://example.org/long" ), it.getSubject() );
-        assertEquals( model.createTypedLiteral( longValue ), it.getObject() );
-        }
-    
-    public void testFloat() 
-        {
-        List<Statement> got = model.listLiteralStatements( null, null, floatValue ).toList();
-        assertEquals( 1, got.size() );
-        Statement it = got.get( 0 );
-        assertEquals( resource( "http://example.org/float" ), it.getSubject() );
-        assertEquals( model.createTypedLiteral( floatValue ), it.getObject() );
-        }
-    
-    public void testDouble() 
-        {
-        List<Statement> got = model.listLiteralStatements( null, null, doubleValue ).toList();
-        assertEquals( 1, got.size() );
-        Statement it = got.get( 0 );
-        assertEquals( resource( "http://example.org/double" ), it.getSubject() );
-        assertEquals( model.createTypedLiteral( doubleValue ), it.getObject() );
-        }
-    
-    public void testString() {
-        StmtIterator iter = model.listStatements(null, null, stringValue);
-        int i =0;
-        while (iter.hasNext()) {
-            i++;
-            assertEquals(iter.nextStatement().getSubject().getURI(),
-                         "http://example.org/string");
-        }
-        assertEquals(1, i);
-    }
-    
-    public void testLangString() {
-        StmtIterator iter = model.listStatements(null, null,
-                                                           stringValue, langValue);
-        int i =0;
-        while (iter.hasNext()) {
-            i++;
-            assertEquals(iter.nextStatement().getSubject().getURI(),
-                         "http://example.org/langString");
-        }
-        assertEquals(1, i);
-    }
-        
-    
-    public void testAll() {
-        StmtIterator iter = model.listStatements(null, null, (RDFNode) null);
-        int i =0;
-        while (iter.hasNext()) {
-            i++;
-            iter.next();
-        }
-        assertEquals(7, i);
-    }
-    
-    public void testAllString() {
-        StmtIterator iter = model.listStatements(null, null, (String) null);
-        int i =0;
-        while (iter.hasNext()) {
-            i++;
-            iter.next();
-        }
-        assertEquals(7, i);
-    }
-
-    public Model modelWithStatements( StmtIterator it )
-        {
-        Model m = ModelFactory.createDefaultModel();
-        while (it.hasNext()) m.add( it.nextStatement() );
-        return m;
-        }
-        
-    public void checkReturns( String things, StmtIterator it )
-        {
-        Model wanted = modelWithStatements( things );
-        Model got = modelWithStatements( it );
-        if (wanted.isIsomorphicWith( got ) == false)
-            fail( "wanted " + wanted + " got " + got );
-        }
-        
-    public void testListStatementsSPO()
-        {
-        Model m = ModelFactory.createDefaultModel();
-        Resource A = resource( m, "A" ), X = resource( m, "X" );
-        Property P = property( m, "P" ), P1 = property( m, "P1" );
-        RDFNode O = resource( m, "O" ), Y = resource( m, "Y" );
-        String S1 = "S P O; S1 P O; S2 P O";
-        String S2 = "A P1 B; A P1 B; A P1 C";
-        String S3 = "X P1 Y; X P2 Y; X P3 Y";
-        modelAdd( m, S1 );
-        modelAdd( m,  S2 );
-        modelAdd( m, S3 );
-        checkReturns( S1, m.listStatements( null, P, O ) );
-        checkReturns( S2, m.listStatements( A, P1, (RDFNode) null ) );
-        checkReturns( S3, m.listStatements( X, null, Y ) );
-        m.close();
-        }
-        
-    public void testListStatementsClever()
-        {
-        Model m = ModelFactory.createDefaultModel();
-        modelAdd( m, "S P O; S P O2; S P2 O; S2 P O" );
-        Selector sel = new SimpleSelector( null, null, (RDFNode) null )
-            {
-            @Override
-            public boolean test( Statement st )
-                { return 
-                        st.getSubject().toString().length() 
-                        + st.getPredicate().toString().length()
-                        + st.getObject().toString().length()
-                        == 15; /* eh:/S + eh:/P + eh:/O */
-                }
-                
-            @Override
-            public boolean isSimple()
-                { return false; }
-            };
-        checkReturns( "S P O", m.listStatements( sel ) );
-        }
+	static char charValue = 'c';
+	static long longValue = 456;
+	static float floatValue = 5.67F;
+	static double doubleValue = 6.78;
+	static String stringValue = "stringValue";
+	static String langValue = "en";
+
+	public TestSimpleListStatements( final TestingModelFactory modelFactory,
+			final String name )
+	{
+		super(modelFactory, name);
+	}
+
+	public void checkReturns( final String things, final StmtIterator it )
+	{
+		final Model wanted = ModelHelper.modelWithStatements(this, things);
+		final Model got = modelWithStatements(it);
+		if (wanted.isIsomorphicWith(got) == false)
+		{
+			Assert.fail("wanted " + wanted + " got " + got);
+		}
+	}
+
+	public Model modelWithStatements( final StmtIterator it )
+	{
+		final Model m = createModel();
+		while (it.hasNext())
+		{
+			m.add(it.nextStatement());
+		}
+		return m;
+	}
+
+	@Override
+	public void setUp() throws Exception
+	{
+
+		super.setUp();
+		model.createResource("http://example.org/boolean").addLiteral(
+				RDF.value, TestSimpleListStatements.booleanValue);
+		model.createResource("http://example.org/char").addLiteral(RDF.value,
+				TestSimpleListStatements.charValue);
+		model.createResource("http://example.org/long").addLiteral(RDF.value,
+				TestSimpleListStatements.longValue);
+		model.createResource("http://example.org/float").addLiteral(RDF.value,
+				TestSimpleListStatements.floatValue);
+		model.createResource("http://example.org/double").addLiteral(RDF.value,
+				TestSimpleListStatements.doubleValue);
+		model.createResource("http://example.org/string").addProperty(
+				RDF.value, TestSimpleListStatements.stringValue);
+		model.createResource("http://example.org/langString").addProperty(
+				RDF.value, TestSimpleListStatements.stringValue,
+				TestSimpleListStatements.langValue);
+
+	}
+
+	public void testAll()
+	{
+		final StmtIterator iter = model.listStatements(null, null,
+				(RDFNode) null);
+		int i = 0;
+		while (iter.hasNext())
+		{
+			i++;
+			iter.next();
+		}
+		Assert.assertEquals(7, i);
+	}
+
+	public void testAllString()
+	{
+		final StmtIterator iter = model.listStatements(null, null,
+				(String) null);
+		int i = 0;
+		while (iter.hasNext())
+		{
+			i++;
+			iter.next();
+		}
+		Assert.assertEquals(7, i);
+	}
+
+	public void testBoolean()
+	{
+		final List<Statement> got = model.listLiteralStatements(null, null,
+				TestSimpleListStatements.booleanValue).toList();
+		Assert.assertEquals(1, got.size());
+		final Statement it = got.get(0);
+		Assert.assertEquals(ModelHelper.resource("http://example.org/boolean"),
+				it.getSubject());
+		Assert.assertEquals(
+				model.createTypedLiteral(TestSimpleListStatements.booleanValue),
+				it.getObject());
+	}
+
+	public void testChar()
+	{
+		final List<Statement> got = model.listLiteralStatements(null, null,
+				TestSimpleListStatements.charValue).toList();
+		Assert.assertEquals(1, got.size());
+		final Statement it = got.get(0);
+		Assert.assertEquals(ModelHelper.resource("http://example.org/char"),
+				it.getSubject());
+		Assert.assertEquals(
+				model.createTypedLiteral(TestSimpleListStatements.charValue),
+				it.getObject());
+	}
+
+	public void testDouble()
+	{
+		final List<Statement> got = model.listLiteralStatements(null, null,
+				TestSimpleListStatements.doubleValue).toList();
+		Assert.assertEquals(1, got.size());
+		final Statement it = got.get(0);
+		Assert.assertEquals(ModelHelper.resource("http://example.org/double"),
+				it.getSubject());
+		Assert.assertEquals(
+				model.createTypedLiteral(TestSimpleListStatements.doubleValue),
+				it.getObject());
+	}
+
+	public void testFloat()
+	{
+		final List<Statement> got = model.listLiteralStatements(null, null,
+				TestSimpleListStatements.floatValue).toList();
+		Assert.assertEquals(1, got.size());
+		final Statement it = got.get(0);
+		Assert.assertEquals(ModelHelper.resource("http://example.org/float"),
+				it.getSubject());
+		Assert.assertEquals(
+				model.createTypedLiteral(TestSimpleListStatements.floatValue),
+				it.getObject());
+	}
+
+	public void testLangString()
+	{
+		final StmtIterator iter = model.listStatements(null, null,
+				TestSimpleListStatements.stringValue,
+				TestSimpleListStatements.langValue);
+		int i = 0;
+		while (iter.hasNext())
+		{
+			i++;
+			Assert.assertEquals(iter.nextStatement().getSubject().getURI(),
+					"http://example.org/langString");
+		}
+		Assert.assertEquals(1, i);
+	}
+
+	public void testListStatementsClever()
+	{
+
+		ModelHelper.modelAdd(model, "S P O; S P O2; S P2 O; S2 P O");
+		final Selector sel = new SimpleSelector(null, null, (RDFNode) null) {
+			@Override
+			public boolean isSimple()
+			{
+				return false;
+			}
+
+			@Override
+			public boolean test( final Statement st )
+			{
+				return (st.getSubject().toString().length()
+						+ st.getPredicate().toString().length() + st
+						.getObject().toString().length()) == 15; /*
+																 * eh:/S + eh:/P
+																 * + eh:/O
+																 */
+			}
+		};
+		checkReturns("S P O", model.listStatements(sel));
+	}
+
+	public void testListStatementsSPO()
+	{
+
+		final Resource A = ModelHelper.resource(model, "A"), X = ModelHelper
+				.resource(model, "X");
+		final Property P = ModelHelper.property(model, "P"), P1 = ModelHelper
+				.property(model, "P1");
+		final RDFNode O = ModelHelper.resource(model, "O"), Y = ModelHelper
+				.resource(model, "Y");
+		final String S1 = "S P O; S1 P O; S2 P O";
+		final String S2 = "A P1 B; A P1 B; A P1 C";
+		final String S3 = "X P1 Y; X P2 Y; X P3 Y";
+		ModelHelper.modelAdd(model, S1);
+		ModelHelper.modelAdd(model, S2);
+		ModelHelper.modelAdd(model, S3);
+		checkReturns(S1, model.listStatements(null, P, O));
+		checkReturns(S2, model.listStatements(A, P1, (RDFNode) null));
+		checkReturns(S3, model.listStatements(X, null, Y));
+	}
+
+	public void testLong()
+	{
+		final List<Statement> got = model.listLiteralStatements(null, null,
+				TestSimpleListStatements.longValue).toList();
+		Assert.assertEquals(1, got.size());
+		final Statement it = got.get(0);
+		Assert.assertEquals(ModelHelper.resource("http://example.org/long"),
+				it.getSubject());
+		Assert.assertEquals(
+				model.createTypedLiteral(TestSimpleListStatements.longValue),
+				it.getObject());
+	}
+
+	public void testString()
+	{
+		final StmtIterator iter = model.listStatements(null, null,
+				TestSimpleListStatements.stringValue);
+		int i = 0;
+		while (iter.hasNext())
+		{
+			i++;
+			Assert.assertEquals(iter.nextStatement().getSubject().getURI(),
+					"http://example.org/string");
+		}
+		Assert.assertEquals(1, i);
+	}
 }

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestSimpleSelector.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestSimpleSelector.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestSimpleSelector.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestSimpleSelector.java Tue Jan 29 20:27:24 2013
@@ -1,14 +1,14 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * regarding copyright ownership. The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,120 +18,127 @@
 
 package com.hp.hpl.jena.rdf.model.test;
 
-/**
-	@author bwm out of kers
-*/
-
-import com.hp.hpl.jena.rdf.model.*;
-import com.hp.hpl.jena.vocabulary.*;
-
-import junit.framework.*;
-
-public class TestSimpleSelector extends TestCase
-    {    
-        
-    public TestSimpleSelector( String name )
-        { super( name ); }
-    
-    public static TestSuite suite()
-        { return new TestSuite( TestSimpleSelector.class ); }   
-    
-    Model model = null;    
-        
-    @Override
-    protected void setUp() throws java.lang.Exception {
-    	model = ModelFactory.createDefaultModel();
-    	model.createResource()
-    	     .addProperty(RDF.type, RDFS.Resource)
-    	     .addProperty(RDFS.label, "foo")
-    	     .addProperty(RDF.value, "123");
-    	model.createResource()
-    	     .addProperty(RDF.type, RDFS.Resource)
-    	     .addProperty(RDFS.label, "bar")
-    	     .addProperty(RDF.value, "123");
-    	
-    }
-    
-    @Override
-    protected void tearDown() throws java.lang.Exception {
-    	model = null;
-    }
-    
-    /**
-        A plain SimpleSelector must be simple.
-    */
-    public void testSimpleIsSimple()
-        { assertTrue( new SimpleSelector( null, null, (RDFNode) null ).isSimple() ); }
-        
-    /**
-        A random sub-class of SimpleSelector must not be simple.
-    */
-    public void testSimpleSubclassIsntSimple()
-        { assertFalse( new SimpleSelector( null, null, (RDFNode) null ){}.isSimple() ); }
-        
-    public void testAll() {
-    	StmtIterator iter = model.listStatements(
-    	  new SimpleSelector(null, null, (RDFNode) null));
-    	int i =0;
-    	while (iter.hasNext()) {
-    		i++;
-    		iter.next();
-    	}
-    	assertEquals(6, i);
-    }
-    
-    public void testFindProperty() {
-    	StmtIterator iter = model.listStatements(
-    	  new SimpleSelector(null, RDFS.label, (RDFNode) null));
-    	int i =0;
-    	while (iter.hasNext()) {
-    		i++;
-    		Statement stmt = iter.nextStatement();
-    		assertEquals(RDFS.label, stmt.getPredicate());
-    	}
-    	assertEquals(2, i);
-    }
-    
-    public void testFindObject() {
-    	StmtIterator iter = model.listStatements(
-    	  new SimpleSelector(null, null, RDFS.Resource));
-    	int i =0;
-    	while (iter.hasNext()) {
-    		i++;
-    		Statement stmt = iter.nextStatement();
-    		assertEquals(RDFS.Resource, stmt.getObject());
-    	}
-    	assertEquals(2, i);
-    }
-    
-    public void testFindSubject() {
-    	StmtIterator iter = model.listStatements(
-    	  new SimpleSelector(null, null, RDFS.Resource));
-    	assertTrue(iter.hasNext());
-    	Resource subject = iter.nextStatement()
-    	                       .getSubject();
-    	iter = model.listStatements(
-    	  new SimpleSelector(subject, null, (RDFNode) null));
-    	int i =0;
-    	while (iter.hasNext()) {
-    		i++;
-    		Statement stmt = iter.nextStatement();
-    		assertEquals(subject, stmt.getSubject());
-    	}
-    	assertEquals(3, i);
-    }
-    
-    public void testFindPropertyAndObject() {
-    	StmtIterator iter = model.listStatements(
-    	  new SimpleSelector(null, RDF.value, 123));
-    	int i =0;
-    	while (iter.hasNext()) {
-    		i++;
-    		Statement stmt = iter.nextStatement();
-    		assertEquals(RDF.value, stmt.getPredicate());
-    		assertEquals(123, stmt.getInt()); 
-      	}
-    	assertEquals(2, i);
-    }
-    
+import com.hp.hpl.jena.rdf.model.RDFNode;
+import com.hp.hpl.jena.rdf.model.Resource;
+import com.hp.hpl.jena.rdf.model.SimpleSelector;
+import com.hp.hpl.jena.rdf.model.Statement;
+import com.hp.hpl.jena.rdf.model.StmtIterator;
+import com.hp.hpl.jena.rdf.model.test.helpers.TestingModelFactory;
+import com.hp.hpl.jena.vocabulary.RDF;
+import com.hp.hpl.jena.vocabulary.RDFS;
+
+import junit.framework.Assert;
+
+public class TestSimpleSelector extends AbstractModelTestBase
+{
+
+	public TestSimpleSelector( final TestingModelFactory modelFactory,
+			final String name )
+	{
+		super(modelFactory, name);
+	}
+
+	@Override
+	public void setUp() throws Exception
+	{
+		super.setUp();
+		model.createResource().addProperty(RDF.type, RDFS.Resource)
+				.addProperty(RDFS.label, "foo").addProperty(RDF.value, "123");
+		model.createResource().addProperty(RDF.type, RDFS.Resource)
+				.addProperty(RDFS.label, "bar").addProperty(RDF.value, "123");
+
+	}
+
+	public void testAll()
+	{
+		final StmtIterator iter = model.listStatements(new SimpleSelector(null,
+				null, (RDFNode) null));
+		int i = 0;
+		while (iter.hasNext())
+		{
+			i++;
+			iter.next();
+		}
+		Assert.assertEquals(6, i);
+	}
+
+	public void testFindObject()
+	{
+		final StmtIterator iter = model.listStatements(new SimpleSelector(null,
+				null, RDFS.Resource));
+		int i = 0;
+		while (iter.hasNext())
+		{
+			i++;
+			final Statement stmt = iter.nextStatement();
+			Assert.assertEquals(RDFS.Resource, stmt.getObject());
+		}
+		Assert.assertEquals(2, i);
+	}
+
+	public void testFindProperty()
+	{
+		final StmtIterator iter = model.listStatements(new SimpleSelector(null,
+				RDFS.label, (RDFNode) null));
+		int i = 0;
+		while (iter.hasNext())
+		{
+			i++;
+			final Statement stmt = iter.nextStatement();
+			Assert.assertEquals(RDFS.label, stmt.getPredicate());
+		}
+		Assert.assertEquals(2, i);
+	}
+
+	public void testFindPropertyAndObject()
+	{
+		final StmtIterator iter = model.listStatements(new SimpleSelector(null,
+				RDF.value, 123));
+		int i = 0;
+		while (iter.hasNext())
+		{
+			i++;
+			final Statement stmt = iter.nextStatement();
+			Assert.assertEquals(RDF.value, stmt.getPredicate());
+			Assert.assertEquals(123, stmt.getInt());
+		}
+		Assert.assertEquals(2, i);
+	}
+
+	public void testFindSubject()
+	{
+		StmtIterator iter = model.listStatements(new SimpleSelector(null, null,
+				RDFS.Resource));
+		Assert.assertTrue(iter.hasNext());
+		final Resource subject = iter.nextStatement().getSubject();
+		iter = model.listStatements(new SimpleSelector(subject, null,
+				(RDFNode) null));
+		int i = 0;
+		while (iter.hasNext())
+		{
+			i++;
+			final Statement stmt = iter.nextStatement();
+			Assert.assertEquals(subject, stmt.getSubject());
+		}
+		Assert.assertEquals(3, i);
+	}
+
+	/**
+	 * A plain SimpleSelector must be simple.
+	 */
+	public void testSimpleIsSimple()
+	{
+		Assert.assertTrue(new SimpleSelector(null, null, (RDFNode) null)
+				.isSimple());
+	}
+
+	/**
+	 * A random sub-class of SimpleSelector must not be simple.
+	 */
+	public void testSimpleSubclassIsntSimple()
+	{
+		Assert.assertFalse(new SimpleSelector(null, null, (RDFNode) null) {
+		}.isSimple());
+	}
+
 }

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestStandardModels.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestStandardModels.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestStandardModels.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestStandardModels.java Tue Jan 29 20:27:24 2013
@@ -22,9 +22,6 @@ import com.hp.hpl.jena.rdf.model.*;
 
 import junit.framework.*;
 
-/**
- 	@author kers
-*/
 public class TestStandardModels extends AbstractTestModel
     {
 

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestStatements.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestStatements.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestStatements.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/rdf/model/test/TestStatements.java Tue Jan 29 20:27:24 2013
@@ -1,14 +1,14 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * regarding copyright ownership. The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,125 +19,137 @@
 package com.hp.hpl.jena.rdf.model.test;
 
 import com.hp.hpl.jena.graph.FrontsTriple;
-import com.hp.hpl.jena.rdf.model.*;
-import junit.framework.*;
-
+import com.hp.hpl.jena.rdf.model.Model;
+import com.hp.hpl.jena.rdf.model.Property;
+import com.hp.hpl.jena.rdf.model.RDFNode;
+import com.hp.hpl.jena.rdf.model.Resource;
+import com.hp.hpl.jena.rdf.model.Statement;
+import com.hp.hpl.jena.rdf.model.test.helpers.ModelHelper;
+import com.hp.hpl.jena.rdf.model.test.helpers.TestingModelFactory;
+import com.hp.hpl.jena.test.JenaTestBase;
 import com.hp.hpl.jena.vocabulary.RDF;
 
-public class TestStatements extends ModelTestBase
-    {
-    public TestStatements( String name )
-        { super( name ); }
-    
-    public static TestSuite suite()
-        { return new TestSuite( TestStatements.class ); }   
-    
-    public void testStatmentMap1Selectors()
-        {
-        Statement s = statement( "sub pred obj" );
-        assertEquals( resource( "sub" ), Statement.Util.getSubject.map1( s ) );
-        assertEquals( resource( "pred" ), Statement.Util.getPredicate.map1( s ) );
-        assertEquals( resource( "obj" ), Statement.Util.getObject.map1( s ) );
-        }
-    
-    /**
-        this case came up when Chris was sorting out ReifedStatement and
-        had mishacked Model.createStatement. A resource created in one
-        model and incorporated into a statement asserted constructed by a
-        different model should test equal to the resource extracted from that
-        statement, even if it's a bnode.
-    */
-    public void testStuff()
-        {
-        Model red = ModelFactory.createDefaultModel();
-        Model blue = ModelFactory.createDefaultModel();
-        Resource r = red.createResource();
-        Property p = red.createProperty( "" );
-        Statement s = blue.createStatement( r, p, r );
-        assertEquals( "subject preserved", r, s.getSubject() );
-        assertEquals( "object preserved", r, s.getObject() );
-        }
-        
-    public void testOtherStuff()
-        {
-        Model A = ModelFactory.createDefaultModel();
-        Model B = ModelFactory.createDefaultModel();
-        Resource S = A.createResource( "jena:S" );
-        Resource R = A.createResource( "jena:R" );
-        Property P = A.createProperty( "jena:P" );
-        RDFNode O = A.createResource( "jena:O" );
-        A.add( S, P, O );
-        B.add( S, P, O );
-        assertTrue( "X1", A.isIsomorphicWith( B ) );
-    /* */
-        A.add( R, RDF.subject, S );
-        B.add( R, RDF.predicate, P );
-        assertFalse( "X2", A.isIsomorphicWith( B ) );
-    /* */
-        A.add( R, RDF.predicate, P );
-        B.add( R, RDF.subject, S );
-        assertTrue( "X3", A.isIsomorphicWith( B ) );
-    /* */
-        A.add( R, RDF.object, O );
-        B.add( R, RDF.type, RDF.Statement );
-        assertFalse( "X4", A.isIsomorphicWith( B ) );
-    /* */
-        A.add( R, RDF.type, RDF.Statement );
-        B.add( R, RDF.object, O );
-        assertTrue( "X5", A.isIsomorphicWith( B ) );
-        }
-        
-    public void testSet()
-        {
-        Model A = ModelFactory.createDefaultModel();
-        Model B = ModelFactory.createDefaultModel();
-        Resource S = A.createResource( "jena:S" );
-        Resource R = A.createResource( "jena:R" );
-        Property P = A.createProperty( "jena:P" );
-        RDFNode O = A.createResource( "jena:O" );
-        Statement spo = A.createStatement( S, P, O );
-        A.add( spo );
-        Statement sps = A.createStatement( S, P, S );
-        assertEquals( sps, spo.changeObject( S ) );
-        assertFalse( A.contains( spo ) );
-        assertTrue( A.contains( sps ) );
-        }
-        
-    public void testPortingBlankNodes()
-        {
-        Model A = ModelFactory.createDefaultModel();
-        Model B = ModelFactory.createDefaultModel();
-        Resource anon = A.createResource();
-        Resource bAnon = anon.inModel( B );
-        assertTrue( "moved resource should still be blank", bAnon.isAnon() );
-        assertEquals( "move resource should equal original", anon, bAnon );
-        }
-        
-    public void testTripleWrapper()
-    	{
-    	Model A = ModelFactory.createDefaultModel();
-    	assertInstanceOf( FrontsTriple.class, statement( A, "s p o" ) );
-    	}
-    
-    /**
-        Feeble test that toString'ing a Statement[Impl] will display the data-type
-        of its object if it has one.
-    */
-    public void testStatementPrintsType()
-        {            
-        Model m = ModelFactory.createDefaultModel();
-        String fakeURI = "fake:URI";
-        Resource S = m.createResource( ) ; 
-        Property P = property( m, "PP" );
-        RDFNode O = m.createTypedLiteral( "42",  fakeURI);
-        Statement st = m.createStatement( S, P, O );
-        assertTrue( st.toString().indexOf( fakeURI ) > 0 );  
-        }
-    
-    public void testHasWellFormedXML()
-        {
-        assertFalse( statement( "s P 1" ).hasWellFormedXML() );
-        assertFalse( statement( "S P '<x>/x>'rdf:XMLLiteral" ).hasWellFormedXML() );
-        assertTrue( statement( "S P '<x></x>'rdf:XMLLiteral" ).hasWellFormedXML() );
-        }
-    }
+import junit.framework.Assert;
+
+public class TestStatements extends AbstractModelTestBase
+{
+	public TestStatements( final TestingModelFactory modelFactory,
+			final String name )
+	{
+		super(modelFactory, name);
+	}
+
+	public void testHasWellFormedXML()
+	{
+		Assert.assertFalse(ModelHelper.statement("s P 1").hasWellFormedXML());
+		Assert.assertFalse(ModelHelper.statement("S P '<x>/x>'rdf:XMLLiteral")
+				.hasWellFormedXML());
+		Assert.assertTrue(ModelHelper.statement("S P '<x></x>'rdf:XMLLiteral")
+				.hasWellFormedXML());
+	}
+
+	public void testOtherStuff()
+	{
+		final Model A = createModel();
+		final Model B = createModel();
+		final Resource S = A.createResource("jena:S");
+		final Resource R = A.createResource("jena:R");
+		final Property P = A.createProperty("jena:P");
+		final RDFNode O = A.createResource("jena:O");
+		A.add(S, P, O);
+		B.add(S, P, O);
+		Assert.assertTrue("X1", A.isIsomorphicWith(B));
+		/* */
+		A.add(R, RDF.subject, S);
+		B.add(R, RDF.predicate, P);
+		Assert.assertFalse("X2", A.isIsomorphicWith(B));
+		/* */
+		A.add(R, RDF.predicate, P);
+		B.add(R, RDF.subject, S);
+		Assert.assertTrue("X3", A.isIsomorphicWith(B));
+		/* */
+		A.add(R, RDF.object, O);
+		B.add(R, RDF.type, RDF.Statement);
+		Assert.assertFalse("X4", A.isIsomorphicWith(B));
+		/* */
+		A.add(R, RDF.type, RDF.Statement);
+		B.add(R, RDF.object, O);
+		Assert.assertTrue("X5", A.isIsomorphicWith(B));
+	}
+
+	public void testPortingBlankNodes()
+	{
+		final Model B = createModel();
+		final Resource anon = model.createResource();
+		final Resource bAnon = anon.inModel(B);
+		Assert.assertTrue("moved resource should still be blank",
+				bAnon.isAnon());
+		Assert.assertEquals("move resource should equal original", anon, bAnon);
+	}
+
+	public void testSet()
+	{
+		final Model A = createModel();
+		createModel();
+		final Resource S = A.createResource("jena:S");
+		A.createResource("jena:R");
+		final Property P = A.createProperty("jena:P");
+		final RDFNode O = A.createResource("jena:O");
+		final Statement spo = A.createStatement(S, P, O);
+		A.add(spo);
+		final Statement sps = A.createStatement(S, P, S);
+		Assert.assertEquals(sps, spo.changeObject(S));
+		Assert.assertFalse(A.contains(spo));
+		Assert.assertTrue(A.contains(sps));
+	}
+
+	/**
+	 * Feeble test that toString'ing a Statement[Impl] will display the
+	 * data-type
+	 * of its object if it has one.
+	 */
+	public void testStatementPrintsType()
+	{
+		final String fakeURI = "fake:URI";
+		final Resource S = model.createResource();
+		final Property P = ModelHelper.property(model, "PP");
+		final RDFNode O = model.createTypedLiteral("42", fakeURI);
+		final Statement st = model.createStatement(S, P, O);
+		Assert.assertTrue(st.toString().indexOf(fakeURI) > 0);
+	}
+
+	public void testStatmentMap1Selectors()
+	{
+		final Statement s = ModelHelper.statement("sub pred obj");
+		Assert.assertEquals(ModelHelper.resource("sub"),
+				Statement.Util.getSubject.map1(s));
+		Assert.assertEquals(ModelHelper.resource("pred"),
+				Statement.Util.getPredicate.map1(s));
+		Assert.assertEquals(ModelHelper.resource("obj"),
+				Statement.Util.getObject.map1(s));
+	}
+
+	/**
+	 * this case came up when Chris was sorting out ReifedStatement and
+	 * had mishacked Model.createStatement. A resource created in one
+	 * model and incorporated into a statement asserted constructed by a
+	 * different model should test equal to the resource extracted from that
+	 * statement, even if it's a bnode.
+	 */
+	public void testStuff()
+	{
+		final Model red = createModel();
+		final Model blue = createModel();
+		final Resource r = red.createResource();
+		final Property p = red.createProperty("");
+		final Statement s = blue.createStatement(r, p, r);
+		Assert.assertEquals("subject preserved", r, s.getSubject());
+		Assert.assertEquals("object preserved", r, s.getObject());
+	}
+
+	public void testTripleWrapper()
+	{
+		JenaTestBase.assertInstanceOf(FrontsTriple.class,
+				ModelHelper.statement(model, "s p o"));
+	}
+}

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/ConcurrencyTest.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/ConcurrencyTest.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/ConcurrencyTest.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/ConcurrencyTest.java Tue Jan 29 20:27:24 2013
@@ -43,9 +43,6 @@ import com.hp.hpl.jena.util.iterator.Ext
  * Test for deadlock and concurrency problems in rule engines.
  * 
  * <p>Test inspired by suggestions from Timm Linder</p>
- * 
- * @author <a href="mailto:der@hplb.hpl.hp.com">Dave Reynolds</a>
- * @version $Revision: 1.4 $
  */
 public class ConcurrencyTest  extends TestCase {
 

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/DebugOWL.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/DebugOWL.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/DebugOWL.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/DebugOWL.java Tue Jan 29 20:27:24 2013
@@ -39,9 +39,6 @@ import java.util.*;
  * Test harnness for investigating OWL reasoner correctness and performance
  * on specific local test files. Unit testing is done using OWLWGTester or simplar,
  * this code is a debugging tools rather than a tester.
- * 
- * @author <a href="mailto:der@hplb.hpl.hp.com">Dave Reynolds</a>
- * @version $Revision: 1.1 $ on $Date: 2009-06-29 08:55:42 $
  */
 public class DebugOWL {
 

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/DebugRules.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/DebugRules.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/DebugRules.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/DebugRules.java Tue Jan 29 20:27:24 2013
@@ -29,7 +29,7 @@ import java.io.*;
 /** * Using during debuging of the rule systems.
  * Runs a named set of rules (can contain axioms and rules) and
  * lists all the resulting entailments.
- *  * @author <a href="mailto:der@hplb.hpl.hp.com">Dave Reynolds</a> * @version $Revision: 1.1 $ on $Date: 2009-06-29 08:55:42 $ */
+ */
 public class DebugRules {
 
     /** The name of the rule set to load */

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/OWLConsistencyTest.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/OWLConsistencyTest.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/OWLConsistencyTest.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/OWLConsistencyTest.java Tue Jan 29 20:27:24 2013
@@ -34,9 +34,6 @@ import com.hp.hpl.jena.util.FileManager;
 
 /**
  * Utility for checking OWL validation results.
- * 
- * @author <a href="mailto:der@hplb.hpl.hp.com">Dave Reynolds </a>
- * @version $Revision: 1.1 $
  */
 
 public class OWLConsistencyTest extends TestCase {

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/OWLUnitTest.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/OWLUnitTest.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/OWLUnitTest.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/OWLUnitTest.java Tue Jan 29 20:27:24 2013
@@ -30,9 +30,6 @@ import java.io.IOException;
 
 /**
  * Version of the OWL unit tests used during development of the mini ruleset.
- * 
- * @author <a href="mailto:der@hplb.hpl.hp.com">Dave Reynolds</a>
- * @version $Revision: 1.1 $ on $Date: 2009-06-29 08:55:42 $
  */
 public class OWLUnitTest extends TestCase {
     

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/OWLWGTester.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/OWLWGTester.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/OWLWGTester.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/OWLWGTester.java Tue Jan 29 20:27:24 2013
@@ -48,9 +48,6 @@ import com.hp.hpl.jena.vocabulary.Reason
  * This version is used for running the core entailment tests as part of unit testing.
  * A separate test harness for use in reporting OWL conformance is being developed and
  * some code rationalization might be once once that stabilizes. </p>
- * 
- * @author <a href="mailto:der@hplb.hpl.hp.com">Dave Reynolds</a>
- * @version $Revision: 1.1 $ on $Date: 2009-06-29 08:55:42 $
  */
 public class OWLWGTester {
     /** The base URI in which the files are purported to reside */

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestBackchainer.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestBackchainer.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestBackchainer.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestBackchainer.java Tue Jan 29 20:27:24 2013
@@ -40,9 +40,6 @@ import junit.framework.TestSuite;
  * The original version was developed for the original backchaining interpeter. 
  * That has now been obsoleted at this is now used to double check the
  * LP engine, though the bulk of such tests are really done by TestBasicLP.
- * 
- * @author <a href="mailto:der@hplb.hpl.hp.com">Dave Reynolds</a>
- * @version $Revision: 1.1 $ on $Date: 2009-06-29 08:55:42 $
  */
 public class TestBackchainer extends TestCase {
     

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestBasicLP.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestBasicLP.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestBasicLP.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestBasicLP.java Tue Jan 29 20:27:24 2013
@@ -37,8 +37,6 @@ import junit.framework.TestSuite;
  * <p>
  * To be moved to a test directory once the code is working.
  * </p>
- * @author <a href="mailto:der@hplb.hpl.hp.com">Dave Reynolds</a>
- * @version $Revision: 1.1 $ on $Date: 2009-06-29 08:55:42 $
  */
 public class TestBasicLP  extends TestCase {
     

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestBasics.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestBasics.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestBasics.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestBasics.java Tue Jan 29 20:27:24 2013
@@ -34,9 +34,6 @@ import java.io.*;
 
 /**
  * Unit tests for simple infrastructure pieces of the rule systems.
- * 
- * @author <a href="mailto:der@hplb.hpl.hp.com">Dave Reynolds</a>
- * @version $Revision: 1.1 $ on $Date: 2009-06-29 08:55:42 $
  */
 public class TestBasics extends TestCase  {
     

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestBugs.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestBugs.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestBugs.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestBugs.java Tue Jan 29 20:27:24 2013
@@ -46,9 +46,6 @@ import com.hp.hpl.jena.vocabulary.Reason
 
 /**
  * Unit tests for reported bugs in the rule system.
- *
- * @author <a href="mailto:der@hplb.hpl.hp.com">Dave Reynolds</a>
- * @version $Revision: 1.4 $ on $Date: 2010-05-09 11:02:30 $
  */
 public class TestBugs extends TestCase {
 

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestCapabilities.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestCapabilities.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestCapabilities.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestCapabilities.java Tue Jan 29 20:27:24 2013
@@ -30,9 +30,6 @@ import com.hp.hpl.jena.reasoner.Reasoner
 /**
  * Test harness for checking that graphs generated by the main
  * reasoners report the correct capabilities to things like the RDF writer.
- *
- * @author <a href="mailto:der@hplb.hpl.hp.com">Dave Reynolds</a>
- * @version $Revision: 1.1 $
  */
 
 public class TestCapabilities extends TestCase {

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestComparatorBuiltins.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestComparatorBuiltins.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestComparatorBuiltins.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestComparatorBuiltins.java Tue Jan 29 20:27:24 2013
@@ -42,8 +42,6 @@ import junit.framework.TestSuite;
 
 /**
  * Test cases for comparison operators, especially as applies to time values
- * 
- * @author <a href="mailto:dave@epimorphics.com">Dave Reynolds</a>
  */
 public class TestComparatorBuiltins extends TestCase {
     

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestConfigVocabulary.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestConfigVocabulary.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestConfigVocabulary.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestConfigVocabulary.java Tue Jan 29 20:27:24 2013
@@ -25,8 +25,6 @@ import com.hp.hpl.jena.vocabulary.*;
 
 /**
     Tests for configuration vocabulary added as part of ModelSpec removal
-
- 	@author kers
 */
 public class TestConfigVocabulary extends ModelTestBase
     {

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestFBRules.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestFBRules.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestFBRules.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestFBRules.java Tue Jan 29 20:27:24 2013
@@ -42,9 +42,6 @@ import org.slf4j.LoggerFactory;
 
 /**
  * Test suite for the hybrid forward/backward rule system.
- * 
- * @author <a href="mailto:der@hplb.hpl.hp.com">Dave Reynolds</a>
- * @version $Revision: 1.3 $ on $Date: 2010-03-28 11:59:36 $
  */
 public class TestFBRules extends TestCase {
     

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestGenericRuleReasonerConfig.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestGenericRuleReasonerConfig.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestGenericRuleReasonerConfig.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestGenericRuleReasonerConfig.java Tue Jan 29 20:27:24 2013
@@ -28,8 +28,6 @@ import com.hp.hpl.jena.vocabulary.Reason
 /**
     Your eyes will bleed with the number of backslashes required in the substitute
     strings.
-    
- 	@author kers
 */
 public class TestGenericRuleReasonerConfig extends AssemblerTestBase
     {

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestGenericRules.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestGenericRules.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestGenericRules.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestGenericRules.java Tue Jan 29 20:27:24 2013
@@ -44,9 +44,6 @@ import org.slf4j.LoggerFactory;
  * Test the packaging of all the reasoners into the GenericRuleReasoner.
  * The other tests check out this engine. These tests just need to touch 
  * enough to validate the packaging.
- * 
- * @author <a href="mailto:der@hplb.hpl.hp.com">Dave Reynolds</a>
- * @version $Revision: 1.3 $ on $Date: 2009-08-04 12:47:40 $
  */
 public class TestGenericRules extends TestCase {
     

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestLPDerivation.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestLPDerivation.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestLPDerivation.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestLPDerivation.java Tue Jan 29 20:27:24 2013
@@ -40,9 +40,6 @@ import junit.framework.TestSuite;
 
 /**
  * Test the derivation tracing of the LP system.
- * 
- * @author <a href="mailto:der@hplb.hpl.hp.com">Dave Reynolds</a>
- * @version $Revision: 1.1 $
  */
 
 public class TestLPDerivation extends TestCase {

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestLPRDFS.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestLPRDFS.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestLPRDFS.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestLPRDFS.java Tue Jan 29 20:27:24 2013
@@ -32,9 +32,6 @@ import java.util.*;
 
 /**
  *  Test an FB hyrid using the emerging LP engine on the basic RDFS tests.
- * 
- * @author <a href="mailto:der@hplb.hpl.hp.com">Dave Reynolds</a>
- * @version $Revision: 1.1 $ on $Date: 2009-06-29 08:55:42 $
  */
 public class TestLPRDFS extends TestCase {
     

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestOWLConsistency.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestOWLConsistency.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestOWLConsistency.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestOWLConsistency.java Tue Jan 29 20:27:24 2013
@@ -29,9 +29,6 @@ import junit.framework.TestSuite;
 
 /**
  * Test the preliminary OWL validation rules.
- * 
- * @author <a href="mailto:der@hplb.hpl.hp.com">Dave Reynolds</a>
- * @version $Revision: 1.1 $ on $Date: 2009-06-29 08:55:42 $
  */
 public class TestOWLConsistency extends TestCase {
      

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestOWLMisc.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestOWLMisc.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestOWLMisc.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestOWLMisc.java Tue Jan 29 20:27:24 2013
@@ -44,9 +44,6 @@ import com.hp.hpl.jena.vocabulary.RDFS ;
 /**
  * Misc. tests of the OWL rule engine configurations which 
  * have arisen from bug reports or user questions.
- * 
- * @author <a href="mailto:der@hplb.hpl.hp.com">Dave Reynolds</a>
- * @version $Revision: 1.2 $
  */
 public class TestOWLMisc extends TestCase  {
 

Modified: jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestPackage.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestPackage.java?rev=1440101&r1=1440100&r2=1440101&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestPackage.java (original)
+++ jena/branches/streaming-update/jena-core/src/test/java/com/hp/hpl/jena/reasoner/rulesys/test/TestPackage.java Tue Jan 29 20:27:24 2013
@@ -25,9 +25,6 @@ import org.slf4j.LoggerFactory ;
 
 /**
  * Aggregate tester that runs all the test associated with the rulesys package.
- * 
- * @author <a href="mailto:der@hplb.hpl.hp.com">Dave Reynolds</a>
- * @version $Revision: 1.6 $ on $Date: 2010-05-15 20:12:17 $
  */
 
 public class TestPackage extends TestSuite {