Package name.pehl.taoki.paging.parser

Examples of name.pehl.taoki.paging.parser.PageInfoParser



    @Test
    public void getPageInfoWithNullInput() throws PageInfoParseException
    {
        PageInfoParser pip = mock(PageInfoParser.class);
        when(pip.parse(null)).thenReturn(null);

        AbstractPagingResource underTest = new NullPagingResource(pip);
        PageInfo pageInfo = underTest.getPageInfo();
        assertNull(pageInfo);
        verify(pip).parse(null);
View Full Code Here



    @Test
    public void getPageInfoWithInvalidInput() throws PageInfoParseException
    {
        PageInfoParser pip = mock(PageInfoParser.class);
        when(pip.parse(FooPagingResource.FOO)).thenThrow(
                new PageInfoParseException("Expected exception from junit test method"));

        AbstractPagingResource underTest = new FooPagingResource(pip);
        PageInfo pageInfo = underTest.getPageInfo();
        assertNull(pageInfo);
View Full Code Here

    @Test
    public void getPageInfo() throws PageInfoParseException
    {
        PageInfo pageInfoFixture = new PageInfo(1, 2);
        PageInfoParser pip = mock(PageInfoParser.class);
        when(pip.parse(FooPagingResource.FOO)).thenReturn(pageInfoFixture);

        AbstractPagingResource underTest = new FooPagingResource(pip);
        PageInfo pageInfo = underTest.getPageInfo();
        assertEquals(pageInfoFixture, pageInfo);
        verify(pip).parse(FooPagingResource.FOO);
View Full Code Here

TOP

Related Classes of name.pehl.taoki.paging.parser.PageInfoParser

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.