1 16 package org.apache.commons.collections.bidimap; 17 18 import java.util.HashMap ; 19 import java.util.Map ; 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 27 34 public class TestUnmodifiableBidiMap extends AbstractTestBidiMap { 35 36 public static void main(String [] args) { 37 TestRunner.run(suite()); 38 } 39 40 public static Test suite() { 41 return BulkTest.makeSuite(TestUnmodifiableBidiMap.class); 42 } 43 44 public TestUnmodifiableBidiMap(String testName) { 45 super(testName); 46 } 47 48 public BidiMap makeEmptyBidiMap() { 49 return UnmodifiableBidiMap.decorate(new DualHashBidiMap()); 50 } 51 public BidiMap makeFullBidiMap() { 52 BidiMap bidi = new DualHashBidiMap(); 53 for (int i = 0; i < entries.length; i++) { 54 bidi.put(entries[i][0], entries[i][1]); 55 } 56 return UnmodifiableBidiMap.decorate(bidi); 57 } 58 public Map makeFullMap() { 59 BidiMap bidi = new DualHashBidiMap(); 60 addSampleMappings(bidi); 61 return UnmodifiableBidiMap.decorate(bidi); 62 } 63 64 public Map makeConfirmedMap() { 65 return new HashMap (); 66 } 67 68 71 public String [] ignoredTests() { 72 return new String [] {"TestUnmodifiableBidiMap.bulkTestInverseMap.bulkTestInverseMap"}; 73 } 74 75 public boolean isPutAddSupported() { 76 return false; 77 } 78 public boolean isPutChangeSupported() { 79 return false; 80 } 81 public boolean isRemoveSupported() { 82 return false; 83 } 84 85 } 86 | Popular Tags |