Skip to content

Commit

Permalink
Junit fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
lizekai-richard committed Aug 27, 2022
1 parent 6fff085 commit 143ea9d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/test/java/duke/TasksControllerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,26 @@
package duke;

import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import duke.task.*;
import java.util.*;
public class TasksControllerTest {

@Test
public void getTasksTest() {
ToDo task1 = new ToDo("CS2103T");
ArrayList<Task> tasks = new ArrayList<>();
tasks.add(task1);
TasksController controller = new TasksController(tasks);
assertEquals(controller.getTasks(), tasks);
}

@Test
public void toStringTest() {
ToDo task1 = new ToDo("CS2103T");
ArrayList<Task> tasks = new ArrayList<>();
tasks.add(task1);
TasksController controller = new TasksController(tasks);
assertEquals(controller.toString(), "1. [T][] CS2103T\n");
}
}

0 comments on commit 143ea9d

Please sign in to comment.