Package tests.support

Examples of tests.support.Support_UnmodifiableCollectionTest


    ListIterator listIterator = myList.listIterator();
    for (int counter = 0; listIterator.hasNext(); counter++) {
      assertTrue("List has wrong elements", ((Integer) listIterator
          .next()).intValue() == counter);
    }
    new Support_UnmodifiableCollectionTest("", smallList).runTest();
  }
View Full Code Here


    mySet = new TreeSet();
    for (int counter = 0; counter < 100; counter++) {
      mySet.add(objArray[counter]);
    }
    new Support_UnmodifiableCollectionTest("", Collections
        .unmodifiableSet(mySet)).runTest();
  }
View Full Code Here

    HashMap myHashMap = new HashMap();
    for (int i = 0; i < 100; i++)
      myHashMap.put(objArray2[i], objArray[i]);
    Collection values = myHashMap.values();
    new Support_UnmodifiableCollectionTest(
        "Test Returned Collection From HashMap.values()", values)
        .runTest();
    values.remove(new Integer(0));
    assertTrue(
        "Removing from the values collection should remove from the original map",
View Full Code Here

    }
    convertedList.set(50, new Integer(1000));
    assertTrue("set/get did not work on coverted list", convertedList.get(
        50).equals(new Integer(1000)));
    convertedList.set(50, new Integer(50));
    new Support_UnmodifiableCollectionTest("", convertedList).runTest();

    Object[] myArray = (Object[]) (objectArray.clone());
    myArray[30] = null;
    myArray[60] = null;
    convertedList = Arrays.asList(myArray);
View Full Code Here

    LinkedHashMap myLinkedHashMap = new LinkedHashMap();
    for (int i = 0; i < 100; i++)
      myLinkedHashMap.put(objArray2[i], objArray[i]);
    Collection values = myLinkedHashMap.values();
    new Support_UnmodifiableCollectionTest(
        "Test Returned Collection From LinkedHashMap.values()", values)
        .runTest();
    values.remove(new Integer(0));
    assertTrue(
        "Removing from the values collection should remove from the original map",
View Full Code Here

        TreeMap myTreeMap = new TreeMap();
        for (int i = 0; i < 100; i++) {
            myTreeMap.put(objArray[i], objArray[i]);
        }
        Collection values = myTreeMap.values();
        new Support_UnmodifiableCollectionTest(
                "Test Returned Collection From TreeMap.values()", values)
                .runTest();
        values.remove(new Integer(0));
        assertTrue(
                "Removing from the values collection should remove from the original map",
View Full Code Here

    Hashtable myHashtable = new Hashtable();
    for (int i = 0; i < 100; i++)
      myHashtable.put(new Integer(i), new Integer(i));
    Collection values = myHashtable.values();
    new Support_UnmodifiableCollectionTest(
        "Test Returned Collection From Hashtable.values()", values)
        .runTest();
    values.remove(new Integer(0));
    assertTrue(
        "Removing from the values collection should remove from the original map",
View Full Code Here

    HashMap myHashMap = new HashMap();
    for (int i = 0; i < 100; i++)
      myHashMap.put(objArray2[i], objArray[i]);
    Collection values = myHashMap.values();
    new Support_UnmodifiableCollectionTest(
        "Test Returned Collection From HashMap.values()", values)
        .runTest();
    values.remove(new Integer(0));
    assertTrue(
        "Removing from the values collection should remove from the original map",
View Full Code Here

    myCollection = new ArrayList();
    for (int counter = 0; counter < 100; counter++) {
      myCollection.add(objArray[counter]);
    }
    new Support_UnmodifiableCollectionTest("", Collections
        .unmodifiableCollection(myCollection)).runTest();
  }
View Full Code Here

    ListIterator listIterator = myList.listIterator();
    for (int counter = 0; listIterator.hasNext(); counter++) {
      assertTrue("List has wrong elements", ((Integer) listIterator
          .next()).intValue() == counter);
    }
    new Support_UnmodifiableCollectionTest("", smallList).runTest();
  }
View Full Code Here

TOP

Related Classes of tests.support.Support_UnmodifiableCollectionTest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.