1 16 package org.apache.commons.collections.set; 17 18 import java.util.Arrays ; 19 import java.util.HashSet ; 20 import java.util.Set ; 21 22 import junit.framework.Test; 23 24 import org.apache.commons.collections.BulkTest; 25 26 35 public class TestUnmodifiableSet extends AbstractTestSet{ 36 37 public TestUnmodifiableSet(String testName) { 38 super(testName); 39 } 40 41 public static Test suite() { 42 return BulkTest.makeSuite(TestUnmodifiableSet.class); 43 } 44 45 public static void main(String args[]) { 46 String [] testCaseName = { TestUnmodifiableSet.class.getName()}; 47 junit.textui.TestRunner.main(testCaseName); 48 } 49 50 public Set makeEmptySet() { 52 return UnmodifiableSet.decorate(new HashSet ()); 53 } 54 55 public Set makeFullSet() { 56 HashSet set = new HashSet (); 57 set.addAll(Arrays.asList(getFullElements())); 58 return UnmodifiableSet.decorate(set); 59 } 60 61 public boolean isAddSupported() { 62 return false; 63 } 64 65 public boolean isRemoveSupported() { 66 return false; 67 } 68 69 public String getCompatibilityVersion() { 70 return "3.1"; 71 } 72 73 80 } 81 | Popular Tags |