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.OrderedBidiMap; 27 28 35 public class TestUnmodifiableOrderedBidiMap extends AbstractTestOrderedBidiMap { 36 37 public static void main(String [] args) { 38 TestRunner.run(suite()); 39 } 40 41 public static Test suite() { 42 return BulkTest.makeSuite(TestUnmodifiableOrderedBidiMap.class); 43 } 44 45 public TestUnmodifiableOrderedBidiMap(String testName) { 46 super(testName); 47 } 48 49 public BidiMap makeEmptyBidiMap() { 50 return UnmodifiableOrderedBidiMap.decorate(new TreeBidiMap()); 51 } 52 public BidiMap makeFullBidiMap() { 53 OrderedBidiMap bidi = new TreeBidiMap(); 54 for (int i = 0; i < entries.length; i++) { 55 bidi.put(entries[i][0], entries[i][1]); 56 } 57 return UnmodifiableOrderedBidiMap.decorate(bidi); 58 } 59 public Map makeFullMap() { 60 OrderedBidiMap bidi = new TreeBidiMap(); 61 addSampleMappings(bidi); 62 return UnmodifiableOrderedBidiMap.decorate(bidi); 63 } 64 65 public Map makeConfirmedMap() { 66 return new TreeMap (); 67 } 68 69 72 public String [] ignoredTests() { 73 return new String [] {"TestUnmodifiableOrderedBidiMap.bulkTestInverseMap.bulkTestInverseMap"}; 74 } 75 76 public boolean isAllowNullKey() { 77 return false; 78 } 79 public boolean isAllowNullValue() { 80 return false; 81 } 82 public boolean isPutAddSupported() { 83 return false; 84 } 85 public boolean isPutChangeSupported() { 86 return false; 87 } 88 public boolean isRemoveSupported() { 89 return false; 90 } 91 92 } 93 | Popular Tags |