Package com.hazelcast.core

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


//    ========================= IndexOf =============================

    @Test
    public void testIndexOf() {
        IList list = newList_withInitialData(10);
        assertEquals(0, list.indexOf("item0"));
        assertEquals(6, list.indexOf("item6"));
        assertEquals(9, list.indexOf("item9"));
        assertEquals(-1, list.indexOf("item15"));
        assertEquals(-1, list.indexOf("item67"));
    }
View Full Code Here


    @Test
    public void testIndexOf() {
        IList list = newList_withInitialData(10);
        assertEquals(0, list.indexOf("item0"));
        assertEquals(6, list.indexOf("item6"));
        assertEquals(9, list.indexOf("item9"));
        assertEquals(-1, list.indexOf("item15"));
        assertEquals(-1, list.indexOf("item67"));
    }
View Full Code Here

    @Test
    public void testIndexOf() {
        IList list = newList_withInitialData(10);
        assertEquals(0, list.indexOf("item0"));
        assertEquals(6, list.indexOf("item6"));
        assertEquals(9, list.indexOf("item9"));
        assertEquals(-1, list.indexOf("item15"));
        assertEquals(-1, list.indexOf("item67"));
    }

    @Test
View Full Code Here

    public void testIndexOf() {
        IList list = newList_withInitialData(10);
        assertEquals(0, list.indexOf("item0"));
        assertEquals(6, list.indexOf("item6"));
        assertEquals(9, list.indexOf("item9"));
        assertEquals(-1, list.indexOf("item15"));
        assertEquals(-1, list.indexOf("item67"));
    }

    @Test
    public void testIndexOf_whenDuplicateItems() {
View Full Code Here

        IList list = newList_withInitialData(10);
        assertEquals(0, list.indexOf("item0"));
        assertEquals(6, list.indexOf("item6"));
        assertEquals(9, list.indexOf("item9"));
        assertEquals(-1, list.indexOf("item15"));
        assertEquals(-1, list.indexOf("item67"));
    }

    @Test
    public void testIndexOf_whenDuplicateItems() {
        IList list = newList();
View Full Code Here

        list.add("item1");
        list.add("item2");
        list.add("item3");
        list.add("item1");

        assertEquals(0, list.indexOf("item1"));
        assertNotEquals(3, list.indexOf("item1"));
    }

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

        list.add("item2");
        list.add("item3");
        list.add("item1");

        assertEquals(0, list.indexOf("item1"));
        assertNotEquals(3, list.indexOf("item1"));
    }

    @Test(expected = NullPointerException.class)
    public void testIndexOf_whenObjectNull() {
        IList list = newList_withInitialData(10);
View Full Code Here

    }

    @Test(expected = NullPointerException.class)
    public void testIndexOf_whenObjectNull() {
        IList list = newList_withInitialData(10);
        list.indexOf(null);
    }


//    ====================== LastIndexOf ===================
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.