Code example for AbstractTransactionalTestNGSpringContextTests

Methods: assertEquals

0
        PageRequest pageRequest = new PageRequest("1", size); 
        DateTime lastLogin = new DateTime().minusDays(1); 
 
        Page<Topic> page = dao.getTopicsUpdatedSince(lastLogin, pageRequest, ObjectsFactory.getDefaultUser()); 
 
        assertEquals(page.getContent().size(), 0); 
    } 
 
    @Test 
    public void testGetUpdateTopicsUpdatedSinceWithPagingAndRegisteredUser() { 
        int listSize = 5; 
        int pageSize = 2; 
        int lastPage = listSize / pageSize; 
        List<Topic> createdTopicList = createAndSaveTopicList(listSize); 
        PageRequest pageRequest = new PageRequest( 
                String.valueOf(lastPage), pageSize); 
        DateTime lastLogin = new DateTime().minusDays(1); 
 
        JCUser user = new JCUser("Current", null, null); 
        user.setGroups(ObjectsFactory.getDefaultGroupList());