FileDocCategorySizeDatePackage
IndexListTest.javaAPI DocExample788Tue Sep 09 21:12:54 BST 2003regress

IndexListTest

public class IndexListTest extends TestCase

Fields Summary
String[]
TESTDATA
com.darwinsys.util.IndexList
victim
Constructors Summary
public IndexListTest(String name)
JUnit test classes require this constructor


	       
	   
		super(name);
	
Methods Summary
public voidsetUp()

		for (int i = 0; i<TESTDATA.length; i++) {
			victim.add(TESTDATA[i]);
		}
	
public voidtestIterator()

		Iterator it = victim.iterator();
		int i = 0;
		while (it.hasNext()) {
			assertEquals(TESTDATA[i++], it.next());
		}
	
public voidtestSetAndGet()

		victim.set(1, "deux");
		assertEquals( "deux", victim.get(1));
	
public voidtestSize()

		assertEquals( TESTDATA.length, victim.size());