Esempio n. 1
0
  @Test
  public void addNewTasks() {
    for (int i = 0; i < MAX_TASKS; i++) {
      TodoTask task = new TodoTask();

      task.setDescription("Unit Test - Sample #".concat(String.valueOf(i)));
      todoService.addTask(task);

      task = null;
    }

    List<TodoTask> tasks = todoService.getAllOpenTasks();

    Assert.assertEquals(tasks.size(), MAX_TASKS, "Incorrect # of tasks");
  }
Esempio n. 2
0
 @Test(dependsOnMethods = "addNewTasks")
 public void findAllTasks() {
   List<TodoTask> tasks = todoService.getAllTasks();
   Assert.assertFalse(tasks.isEmpty());
 }