IndexListTestpublic 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 void | setUp()
for (int i = 0; i<TESTDATA.length; i++) {
victim.add(TESTDATA[i]);
}
| public void | testIterator()
Iterator it = victim.iterator();
int i = 0;
while (it.hasNext()) {
assertEquals(TESTDATA[i++], it.next());
}
| public void | testSetAndGet()
victim.set(1, "deux");
assertEquals( "deux", victim.get(1));
| public void | testSize()
assertEquals( TESTDATA.length, victim.size());
|
|