Code example for AbstractTransactionalTestNGSpringContextTests

Methods: assertEquals, assertThat, hasPages

0
        List<Topic> topicList = PersistedObjectsFactory.createAndSaveTopicList(totalSize); 
        Branch branch = topicList.get(0).getBranch(); 
 
        Page<Topic> topicsPage = dao.getTopics(branch, pageRequest); 
 
        assertThat("Incorrect pagination", topicsPage, hasPages()); 
        assertEquals(topicsPage.getNumber(), 1); 
    } 
 
    @Test 
    public void testGetTopicsWithEnabledPagingTooBigg() { 
        int totalSize = 50; 
        int pageCount = 2; 
        int pageSize = totalSize / pageCount; 
        PageRequest pageRequest = new PageRequest("1000", 
                pageSize); 
        List<Topic> topicList = PersistedObjectsFactory.createAndSaveTopicList(totalSize); 
        Branch branch = topicList.get(0).getBranch(); 
 
        Page<Topic> topicsPage = dao.getTopics(branch, pageRequest); 
Connect your IDE to all the code out there  Get Codota for Java