1 16 package org.apache.commons.collections.bidimap; 17 18 import java.util.Map ; 19 import java.util.TreeMap ; 20 21 import junit.framework.Test; 22 import junit.textui.TestRunner; 23 24 import org.apache.commons.collections.BidiMap; 25 import org.apache.commons.collections.BulkTest; 26 import org.apache.commons.collections.SortedBidiMap; 27 28 35 public class TestUnmodifiableSortedBidiMap extends AbstractTestSortedBidiMap { 36 37 public static void main(String [] args) { 38 TestRunner.run(suite()); 39 } 40 41 public static Test suite() { 42 return BulkTest.makeSuite(TestUnmodifiableSortedBidiMap.class); 43 } 44 45 public TestUnmodifiableSortedBidiMap(String testName) { 46 super(testName); 47 } 48 49 public BidiMap makeEmptyBidiMap() { 51 return UnmodifiableSortedBidiMap.decorate(new DualTreeBidiMap()); 52 } 53 public BidiMap makeFullBidiMap() { 54 SortedBidiMap bidi = new DualTreeBidiMap(); 55 for (int i = 0; i < entries.length; i++) { 56 bidi.put(entries[i][0], entries[i][1]); 57 } 58 return UnmodifiableSortedBidiMap.decorate(bidi); 59 } 60 public Map makeFullMap() { 61 SortedBidiMap bidi = new DualTreeBidiMap(); 62 addSampleMappings(bidi); 63 return UnmodifiableSortedBidiMap.decorate(bidi); 64 } 65 66 public Map makeConfirmedMap() { 67 return new TreeMap (); 68 } 69 70 public boolean isSubMapViewsSerializable() { 71 return false; 73 } 74 public String [] ignoredTests() { 75 return new String [] {"TestUnmodifiableSortedBidiMap.bulkTestInverseMap.bulkTestInverseMap"}; 77 } 78 79 public boolean isAllowNullKey() { 81 return false; 82 } 83 public boolean isAllowNullValue() { 84 return false; 85 } 86 public boolean isPutAddSupported() { 87 return false; 88 } 89 public boolean isPutChangeSupported() { 90 return false; 91 } 92 public boolean isRemoveSupported() { 93 return false; 94 } 95 96 } 97 | Popular Tags |