1 package org.apache.torque.util; 2 3 21 22 import junit.framework.TestCase; 23 24 30 public class UniqueListTest extends TestCase 31 { 32 public UniqueListTest(String name) 33 { 34 super(name); 35 } 36 37 40 public void testNull() 41 { 42 UniqueList uniqueList = new UniqueList(); 43 Object o = null; 44 boolean actualReturn = uniqueList.add(o); 45 assertEquals("return value", false, actualReturn); 46 } 47 48 51 public void testUnique() 52 { 53 UniqueList uniqueList = new UniqueList(); 54 uniqueList.add("Table"); 55 uniqueList.add("TableA"); 56 uniqueList.add("Table"); 57 uniqueList.add("TableB"); 58 assertEquals(3, uniqueList.size()); 59 } 60 } 61 | Popular Tags |