Examples of lastPage()


Examples of de.arago.portlet.util.Paginator.lastPage()

        List<Object> items = Arrays.asList(new Object[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13});

        Paginator pager = new Paginator(items.size(), 3);

        assertEquals(1, pager.firstPage());
        assertEquals(5, pager.lastPage());

        pager.go(1);
        assertEquals(1, pager.getCurrentPage());
        assertEquals(page1, pager.slice(items));
View Full Code Here

Examples of de.arago.portlet.util.Paginator.lastPage()

        List<Object> items = Arrays.asList(new Object[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13});

        Paginator pager = new Paginator(items.size(), 20);

        assertEquals(1, pager.firstPage());
        assertEquals(1, pager.lastPage());

        assertEquals(items, pager.slice(items));

    }
View Full Code Here

Examples of de.arago.portlet.util.Paginator.lastPage()

        List<Object> items = Arrays.asList(new Object[] {1, 2, 3, 4});

        Paginator pager = new Paginator(items.size(), 2);

        assertEquals(1, pager.firstPage());
        assertEquals(2, pager.lastPage());
    }

    public void testUnEven() {
        List<Object> items = Arrays.asList(new Object[] {1, 2, 3});
View Full Code Here

Examples of de.arago.portlet.util.Paginator.lastPage()

        List<Object> items = Arrays.asList(new Object[] {1, 2, 3});

        Paginator pager = new Paginator(items.size(), 2);

        assertEquals(1, pager.firstPage());
        assertEquals(2, pager.lastPage());
    }

    public void testSmallerThanItemsPerPageBug() {
        List<Object> items = Arrays.asList(new Object[] {1, 2, 3, 4});
View Full Code Here

Examples of de.arago.portlet.util.Paginator.lastPage()

        Paginator pager = new Paginator(items.size(), 20);

        pager.go(2);
        assertEquals(1, pager.firstPage());
        assertEquals(1, pager.lastPage());

        assertEquals(items, pager.slice(items));

    }
View Full Code Here

Examples of de.arago.portlet.util.Paginator.lastPage()

    public void testNullList() {
        Paginator pager = new Paginator(4, 4);

        pager.go(2);
        assertEquals(1, pager.firstPage());
        assertEquals(1, pager.lastPage());

        assertEquals(Collections.EMPTY_LIST, pager.slice(null));

    }
View Full Code Here

Examples of de.arago.portlet.util.Paginator.lastPage()

        List<Object> items = Arrays.asList(new Object[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14});

        Paginator pager = new Paginator(items.size(), 5);

        assertEquals(1, pager.firstPage());
        assertEquals(3, pager.lastPage());
    }

    public void testBug() {
        // 20 and 34
        List<Object> items = new ArrayList<Object>();
View Full Code Here

Examples of de.arago.portlet.util.Paginator.lastPage()

        for (int i = 0; i < 34; ++i ) items.add(i);

        Paginator pager = new Paginator(items.size(), 20);

        assertEquals(1, pager.firstPage());
        assertEquals(2, pager.lastPage());
    }

}
View Full Code Here

Examples of org.seleniuminspector.openfaces.DataTablePaginatorInspector.lastPage()

            selenium.getEval("var el = O$('formID:paginableDataTable'); var evObj = document.createEvent('KeyEvents'); evObj.initKeyEvent('keypress', true, true, window, false, false, false, false, 33, 0); el.dispatchEvent(evObj);");

            loadingMode.waitForLoad();
        }

        clientPaginator.lastPage().clickAndWait(loadingMode);
        checkDataTableContents(selenium, referenceDataTableValues, 3);
        clientPaginator.firstPage().clickAndWait(loadingMode);
        checkDataTableContents(selenium, referenceDataTableValues, 1);
        if (loadingMode instanceof ServerLoadingMode) {
            // reset tab index for possible further tests
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.