forked from nus-cs2103-AY2324S2/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
5 changed files
with
55 additions
and
5 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
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
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
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,25 @@ | ||
package tasks; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class DeadlineTest { | ||
@Test | ||
public void testStringify_(){ | ||
Deadline deadline = new Deadline("read book", "2024-02-03"); | ||
assertEquals("[D][ ] read book (by: Feb 3 2024)", deadline.stringify()); | ||
|
||
Deadline markedDeadline = new Deadline("play", "2024-02-03", true); | ||
assertEquals("[D][X] play (by: Feb 3 2024)", markedDeadline.stringify()); | ||
} | ||
|
||
@Test | ||
public void testToString(){ | ||
Deadline deadline = new Deadline("read book", "2024-02-03"); | ||
assertEquals("D | O | read book | 2024-02-03", deadline.toString()); | ||
|
||
Deadline markedDeadline = new Deadline("play", "2024-02-03", true); | ||
assertEquals("D | X | play | 2024-02-03", markedDeadline.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,25 @@ | ||
package tasks; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class TodoTest { | ||
@Test | ||
public void testStringify_(){ | ||
ToDo todo = new ToDo("read book"); | ||
assertEquals("[T][ ] read book", todo.stringify()); | ||
|
||
ToDo markedTodo = new ToDo("play", true); | ||
assertEquals("[T][X] play", markedTodo.stringify()); | ||
} | ||
|
||
@Test | ||
public void testToString(){ | ||
ToDo todo = new ToDo("read book"); | ||
assertEquals("T | O | read book", todo.toString()); | ||
|
||
ToDo markedTodo = new ToDo("play", true); | ||
assertEquals("T | X | play", markedTodo.toString()); | ||
} | ||
} |