Skip to content

Instantly share code, notes, and snippets.

@angiejones
Last active September 6, 2021 14:29
Show Gist options
  • Save angiejones/84e119e76d2656ec8f9458e8db5e36bd to your computer and use it in GitHub Desktop.
Save angiejones/84e119e76d2656ec8f9458e8db5e36bd to your computer and use it in GitHub Desktop.
Functional verification of adding 4 tasks
@Test
public void testAddTasksInDifferentCategories(){
String task1 = "fix bug";
String task2 = "wash car";
String task3 = "grocery shopping";
String task4 = "get nails done";
screen.addItem(task1, TasksScreen.TaskColor.PURPLE);
screen.addItem(task2, TasksScreen.TaskColor.YELLOW);
screen.addItem(task3, TasksScreen.TaskColor.BLUE);
screen.addItem(task4, TasksScreen.TaskColor.PINK);
List tasks = screen.getTasks();
assertTrue(tasks.contains(task1), task1 + " not on the list");
assertTrue(tasks.contains(task2), task2 + " not on the list");
assertTrue(tasks.contains(task3), task3 + " not on the list");
assertTrue(tasks.contains(task4), task4 + " not on the list");
assertEquals(tasks.size(), 4, "Number of todo items");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment