Skip to content

Commit

Permalink
Add JUnit Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
koonweee committed Aug 25, 2020
1 parent 62a8424 commit d000fe9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Empty file added src/test/data/tasks.txt
Empty file.
17 changes: 16 additions & 1 deletion src/test/java/TodoTest.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
package PACKAGE_NAME;
import org.junit.Test;

import java.io.IOException;

import static org.junit.jupiter.api.Assertions.assertEquals;

public class TodoTest {
@Test
public void testTodo() {
Todo testTodo = new Todo("Todo 1");
assertEquals("[T][✗] Todo 1",testTodo.toString());
}
@Test
public void testTodoDone() {
Todo testTodo = new Todo("Todo 1");
testTodo.setDone();
assertEquals("[T][✓] Todo 1",testTodo.toString());
}
}

0 comments on commit d000fe9

Please sign in to comment.