1 17 package org.apache.commons.collections.primitives.adapters; 18 19 import java.io.Serializable ; 20 import java.util.AbstractList ; 21 import java.util.ArrayList ; 22 23 import junit.framework.Test; 24 import junit.framework.TestSuite; 25 26 import org.apache.commons.collections.BulkTest; 27 import org.apache.commons.collections.primitives.DoubleList; 28 import org.apache.commons.collections.primitives.TestDoubleList; 29 30 34 public class TestListDoubleList extends TestDoubleList { 35 36 39 public TestListDoubleList(String testName) { 40 super(testName); 41 } 42 43 public static Test suite() { 44 TestSuite suite = BulkTest.makeSuite(TestListDoubleList.class); 45 return suite; 46 } 47 48 51 54 protected DoubleList makeEmptyDoubleList() { 55 return new ListDoubleList(new ArrayList ()); 56 } 57 58 public String [] ignoredTests() { 59 return new String [] { 61 "TestListDoubleList.bulkTestSubList.testFullListSerialization", 62 "TestListDoubleList.bulkTestSubList.testEmptyListSerialization", 63 "TestListDoubleList.bulkTestSubList.testCanonicalEmptyCollectionExists", 64 "TestListDoubleList.bulkTestSubList.testCanonicalFullCollectionExists", 65 "TestListDoubleList.bulkTestSubList.testEmptyListCompatibility", 66 "TestListDoubleList.bulkTestSubList.testFullListCompatibility", 67 "TestListDoubleList.bulkTestSubList.testSerializeDeserializeThenCompare", 68 "TestListDoubleList.bulkTestSubList.testSimpleSerialization" 69 }; 70 } 71 72 75 76 public void testCanonicalEmptyCollectionExists() { 77 } 80 81 public void testCanonicalFullCollectionExists() { 82 } 85 86 public void testEmptyListCompatibility() { 87 } 90 91 public void testFullListCompatibility() { 92 } 95 public void testWrapNull() { 96 assertNull(ListDoubleList.wrap(null)); 97 } 98 99 public void testWrapSerializable() { 100 DoubleList list = ListDoubleList.wrap(new ArrayList ()); 101 assertNotNull(list); 102 assertTrue(list instanceof Serializable ); 103 } 104 105 public void testWrapNonSerializable() { 106 DoubleList list = ListDoubleList.wrap(new AbstractList () { 107 public Object get(int i) { throw new IndexOutOfBoundsException (); } 108 public int size() { return 0; } 109 }); 110 assertNotNull(list); 111 assertTrue(!(list instanceof Serializable )); 112 } 113 114 } 115 | Popular Tags |