forked from nus-cs2103-AY2223S1/ip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package duke.task; | ||
|
||
import duke.DukeException; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class DeadlineTest { | ||
@Test | ||
public void toString_undone() throws DukeException { | ||
Deadline deadline = new Deadline("description", "31/8/2022"); | ||
deadline.markAsUndone(); | ||
assertEquals("[D][ ] description (by: Aug 31 2022)", deadline.toString()); | ||
} | ||
|
||
@Test | ||
public void toString_done() throws DukeException { | ||
Deadline deadline = new Deadline("description", "31/8/2022"); | ||
deadline.markAsDone(); | ||
assertEquals("[D][X] description (by: Aug 31 2022)", deadline.toString()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package duke.task; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class ToDoTest { | ||
@Test | ||
public void toString_undone() { | ||
ToDo todo = new ToDo("description"); | ||
todo.markAsUndone(); | ||
assertEquals("[T][ ] description", todo.toString()); | ||
} | ||
|
||
@Test | ||
public void toString_done() { | ||
ToDo todo = new ToDo("description"); | ||
todo.markAsDone(); | ||
assertEquals("[T][X] description", todo.toString()); | ||
} | ||
} |