예제 #1
0
 @Test
 public void testGetNextTaskInRank_iteration() {
   iter.setId(1);
   executeClassSql();
   Task actual = taskDAO.getNextTaskInRank(0, iter, null);
   assertEquals(1, actual.getRank());
 }
예제 #2
0
 @Test
 public void testGetTasksWithRankBetween_storyEmptyCollection() {
   story.setId(1);
   executeClassSql();
   Collection<Task> actual = taskDAO.getTasksWithRankBetween(2, 1, null, story);
   assertEquals(0, actual.size());
 }
예제 #3
0
 @Test
 public void testGetTasksWithRankBetween_storyBottom() {
   story.setId(3);
   executeClassSql();
   Collection<Task> actual = taskDAO.getTasksWithRankBetween(1, 5, null, story);
   assertEquals(1, actual.size());
 }
예제 #4
0
 @Test
 public void testGetTasksWithRankBetween_iterationEmptyCollection() {
   iter.setId(1);
   executeClassSql();
   Collection<Task> actual = taskDAO.getTasksWithRankBetween(2, 0, iter, null);
   assertEquals(0, actual.size());
 }
예제 #5
0
 @Test
 public void testGetLastTaskInRank_story() {
   story.setId(55);
   executeClassSql();
   Task actual = taskDAO.getLastTaskInRank(story, null);
   assertEquals(22, actual.getId());
   assertEquals(666, actual.getRank());
 }
예제 #6
0
 @Test
 public void testGetLastTaskInRank_iteration() {
   iter.setId(3);
   executeClassSql();
   Task actual = taskDAO.getLastTaskInRank(null, iter);
   assertEquals(17, actual.getId());
   assertEquals(1500, actual.getRank());
 }
예제 #7
0
 @Test
 public void testGetNextTaskInRank_story() {
   story.setId(55);
   executeClassSql();
   Task actual = taskDAO.getNextTaskInRank(0, null, story);
   assertEquals(1, actual.getRank());
   assertEquals(21, actual.getId());
 }
예제 #8
0
 @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());
 }
예제 #9
0
  @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());
  }
예제 #10
0
 @Test
 public void testGetNextTaskInRank_story_notFound() {
   story.setId(55);
   executeClassSql();
   assertNull(taskDAO.getNextTaskInRank(999, null, story));
 }
예제 #11
0
 @Test
 public void testGetNextTaskInRank_iteration_notFound() {
   iter.setId(1);
   executeClassSql();
   assertNull(taskDAO.getNextTaskInRank(999, iter, null));
 }