1 6 package com.hp.hpl.jena.rdf.model.test; 7 8 import com.hp.hpl.jena.rdf.model.*; 9 10 import junit.framework.TestSuite; 11 12 20 public class TestListSubjectsEtc extends ModelTestBase 21 { 22 public TestListSubjectsEtc( String name ) 23 { super( name ); } 24 25 public static TestSuite suite() 26 { return new TestSuite( TestListSubjectsEtc.class ); } 27 28 public void testListSubjectsNoRemove() 29 { 30 Model m = modelWithStatements( "a P b; b Q c; c R a" ); 31 ResIterator it = m.listSubjects(); 32 it.next(); 33 try { it.remove(); fail( "listSubjects should not support .remove()" ); } 34 catch (UnsupportedOperationException e) { pass(); } 35 } 36 37 public void testListObjectsNoRemove() 38 { 39 Model m = modelWithStatements( "a P b; b Q c; c R a" ); 40 NodeIterator it = m.listObjects(); 41 it.next(); 42 try { it.remove(); fail( "listObjects should not support .remove()" ); } 43 catch (UnsupportedOperationException e) { pass(); } 44 } 45 } 46 47 | Popular Tags |