Esempio n. 1
0
 @Test
 public void testGetNextTaskInRank_iteration() {
   iter.setId(1);
   executeClassSql();
   Task actual = taskDAO.getNextTaskInRank(0, iter, null);
   assertEquals(1, actual.getRank());
 }
Esempio n. 2
0
 @Test
 public void testGetTasksWithRankBetween_storyEmptyCollection() {
   story.setId(1);
   executeClassSql();
   Collection<Task> actual = taskDAO.getTasksWithRankBetween(2, 1, null, story);
   assertEquals(0, actual.size());
 }
Esempio n. 3
0
 @Test
 public void testGetTasksWithRankBetween_storyBottom() {
   story.setId(3);
   executeClassSql();
   Collection<Task> actual = taskDAO.getTasksWithRankBetween(1, 5, null, story);
   assertEquals(1, actual.size());
 }
Esempio n. 4
0
 @Test
 public void testGetTasksWithRankBetween_iterationEmptyCollection() {
   iter.setId(1);
   executeClassSql();
   Collection<Task> actual = taskDAO.getTasksWithRankBetween(2, 0, iter, null);
   assertEquals(0, actual.size());
 }
Esempio n. 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());
 }
Esempio n. 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());
 }
Esempio n. 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());
 }
Esempio n. 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());
 }
Esempio n. 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());
  }
Esempio n. 10
0
 @Test
 public void testGetNextTaskInRank_story_notFound() {
   story.setId(55);
   executeClassSql();
   assertNull(taskDAO.getNextTaskInRank(999, null, story));
 }
Esempio n. 11
0
 @Test
 public void testGetNextTaskInRank_iteration_notFound() {
   iter.setId(1);
   executeClassSql();
   assertNull(taskDAO.getNextTaskInRank(999, iter, null));
 }