1 package org.bsf.smartValueObject.container; 2 3 import org.bsf.smartValueObject.container.SmartContainer; 4 import org.bsf.smartValueObject.container.SmartList; 5 import org.bsf.smartValueObject.container.AbstractTestSmartContainer; 6 import org.bsf.smartValueObject.TestVO; 7 8 import java.util.ArrayList ; 9 10 14 public class TestSmartList extends AbstractTestSmartContainer { 15 16 private SmartList sl; 17 18 22 protected SmartContainer createContainer() { 23 sl = new SmartList(new ArrayList (), getVersionable()); 24 return sl; 25 } 26 27 32 protected Object addToContainer(TestVO t) { 33 return sl.add(t) ? t : null; 34 } 35 36 41 protected Object removeFromContainer(TestVO t) { 42 return sl.remove(t) ? t : null; 43 } 44 45 49 protected TestVO getOne() { 50 assertTrue("Container is empty", sl.size() > 0); 51 return (TestVO) sl.iterator().next(); 52 } 53 54 public void testSomething() { 55 56 } 57 } 58 | Popular Tags |