Code example for AbstractTransactionalTestNGSpringContextTests

Methods: assertEquals, assertThat, hasPages

0
 
        PersistedObjectsFactory.createAndSaveViewTopicsBranchesEntity( 
                createdTopicList.get(0).getBranch().getId(), "anonymousUser", true); 
        Page<Topic> page = dao.getTopicsUpdatedSince(lastLogin, pageRequest, new AnonymousUser()); 
 
        assertThat("Topics should be paginated for anonymous group", page, hasPages()); 
        assertEquals(page.getNumber(), 1); 
    } 
 
    @Test 
    public void testGetUpdateTopicsUpdatedSinceWithPagingAndAnonymousUserPageTooBig() { 
        int listSize = 5; 
        int pageSize = 2; 
        int lastPage = 3; 
        List<Topic> createdTopicList = createAndSaveTopicList(listSize); 
        PageRequest pageRequest = new PageRequest("1000", 
                pageSize); 
        DateTime lastLogin = new DateTime().minusDays(1); 
 
        PersistedObjectsFactory.createAndSaveViewTopicsBranchesEntity(