Package com.hazelcast.core

Examples of com.hazelcast.core.IList.retainAll()


        listTest.add("item0");
        listTest.add("item1");
        listTest.add("item2");


        assertTrue(list.retainAll(listTest));
        assertEquals(3, list.size());
        assertIterableEquals(list, "item0", "item1", "item2");
    }

    @Test(expected = NullPointerException.class)
View Full Code Here


    }

    @Test(expected = NullPointerException.class)
    public void testRetainAll_whenCollectionNull() {
        IList list = newList();
        list.retainAll(null);
    }

    @Test
    public void testRetainAll_whenCollectionEmpty() {
        IList list = newList_withInitialData(10);
View Full Code Here

    @Test
    public void testRetainAll_whenCollectionEmpty() {
        IList list = newList_withInitialData(10);
        List listTest = new ArrayList<String>();
        assertTrue(list.retainAll(listTest));
        assertEquals(0, list.size());
    }

    @Test(expected = NullPointerException.class)
    public void testRetainAll_whenCollectionContainsNull() {
View Full Code Here

    @Test(expected = NullPointerException.class)
    public void testRetainAll_whenCollectionContainsNull() {
        IList list = newList();
        List listTest = new ArrayList<String>();
        listTest.add(null);
        list.retainAll(listTest);
    }

//  ===================== SubList ========================

    @Test
View Full Code Here

        List listTest2 = new ArrayList();
        for (int i = 30; i < 40; i++) {
            listTest2.add("item" + i);
        }
        assertTrue(list2.containsAll(listTest2));
        assertTrue(list2.retainAll(listTest2));
        assertSizeEventually(10,list1);
        assertTrue(list1.removeAll(listTest2));
        assertSizeEventually(0, list1);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.