1 6 7 package com.hp.hpl.jena.rdf.model.test; 8 9 import com.hp.hpl.jena.graph.test.*; 10 import com.hp.hpl.jena.rdf.model.*; 11 12 import junit.framework.TestSuite; 13 14 17 public class TestIterators extends GraphTestBase 18 { 19 public static TestSuite suite() 20 { return new TestSuite( TestIterators.class ); } 21 22 public TestIterators(String name) 23 { super(name); } 24 25 30 public void testIterators() 31 { 32 Model m = ModelFactory.createDefaultModel(); 33 Resource S = m.createResource( "S" ); 34 Property P = m.createProperty( "P" ); 35 RDFNode O = m.createResource( "O " ); 36 m.add( S, P, O ); 37 StmtIterator it = m.listStatements(); 38 it.next(); 39 it.remove(); 40 assertEquals( "", 0, m.size() ); 41 } 42 } 43 44 45 | Popular Tags |