diff --git a/src/test/java/van/ParserTest.java b/src/test/java/van/ParserTest.java index 74d9f39b18..49ba1666c8 100644 --- a/src/test/java/van/ParserTest.java +++ b/src/test/java/van/ParserTest.java @@ -26,4 +26,6 @@ public void toDoTester() { assertEquals("[T][ ] study", toDoTest.toString()); } + + } diff --git a/src/test/java/van/TaskTest.java b/src/test/java/van/TaskTest.java new file mode 100644 index 0000000000..9142d3f5c1 --- /dev/null +++ b/src/test/java/van/TaskTest.java @@ -0,0 +1,29 @@ +package van; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class TaskTest { + @Test + public void taskTester() { + ToDo test = new ToDo("test"); + assertEquals("[T][ ] test ", test.getStatus()); + } + + @Test + public void markTester() { + ToDo test = new ToDo("test"); + test.setDone(); + assertEquals("[T][X] test ", test.getStatus()); + test.setUnDone(); + assertEquals("[T][ ] test ", test.getStatus()); + } + + @Test + public void saveTester() { + ToDo test = new ToDo("test"); + test.setDone(); + assertEquals("T|1|test| ", test.saveStatus()); + } +}