@Test public void testGetNextTaskInRank_iteration() { iter.setId(1); executeClassSql(); Task actual = taskDAO.getNextTaskInRank(0, iter, null); assertEquals(1, actual.getRank()); }
@Test public void testGetTasksWithRankBetween_storyEmptyCollection() { story.setId(1); executeClassSql(); Collection<Task> actual = taskDAO.getTasksWithRankBetween(2, 1, null, story); assertEquals(0, actual.size()); }
@Test public void testGetTasksWithRankBetween_storyBottom() { story.setId(3); executeClassSql(); Collection<Task> actual = taskDAO.getTasksWithRankBetween(1, 5, null, story); assertEquals(1, actual.size()); }
@Test public void testGetTasksWithRankBetween_iterationEmptyCollection() { iter.setId(1); executeClassSql(); Collection<Task> actual = taskDAO.getTasksWithRankBetween(2, 0, iter, null); assertEquals(0, actual.size()); }
@Test public void testGetLastTaskInRank_story() { story.setId(55); executeClassSql(); Task actual = taskDAO.getLastTaskInRank(story, null); assertEquals(22, actual.getId()); assertEquals(666, actual.getRank()); }
@Test public void testGetLastTaskInRank_iteration() { iter.setId(3); executeClassSql(); Task actual = taskDAO.getLastTaskInRank(null, iter); assertEquals(17, actual.getId()); assertEquals(1500, actual.getRank()); }
@Test public void testGetNextTaskInRank_story() { story.setId(55); executeClassSql(); Task actual = taskDAO.getNextTaskInRank(0, null, story); assertEquals(1, actual.getRank()); assertEquals(21, actual.getId()); }
@Test public void testGetNextTaskInRank_iteration_largeCap() { iter.setId(3); executeClassSql(); Task actual = taskDAO.getNextTaskInRank(25, iter, null); assertEquals(17, actual.getId()); assertEquals(1500, actual.getRank()); }
@Test public void testGetNextTaskInRank_story_largeCap() { story.setId(55); executeClassSql(); Task actual = taskDAO.getNextTaskInRank(25, null, story); assertEquals(22, actual.getId()); assertEquals(666, actual.getRank()); }
@Test public void testGetNextTaskInRank_story_notFound() { story.setId(55); executeClassSql(); assertNull(taskDAO.getNextTaskInRank(999, null, story)); }
@Test public void testGetNextTaskInRank_iteration_notFound() { iter.setId(1); executeClassSql(); assertNull(taskDAO.getNextTaskInRank(999, iter, null)); }