Skip to content

Commit

Permalink
Add additional Junit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
howardwhw2 committed Mar 15, 2022
1 parent 36fef02 commit cd35832
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/test/java/van/ParserTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,6 @@ public void toDoTester() {
assertEquals("[T][ ] study", toDoTest.toString());
}



}
29 changes: 29 additions & 0 deletions src/test/java/van/TaskTest.java
Original file line number Diff line number Diff line change
@@ -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());
}
}

0 comments on commit cd35832

Please sign in to comment.