forked from nus-cs2103-AY2223S2/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.
Duke A-JUnit: Testing behaviour of Code + Updated Printing Methods fo…
…r Tasks
- Loading branch information
Showing
8 changed files
with
72 additions
and
12 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
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,21 @@ | ||
package seedu.duke; | ||
|
||
import duke.tasks.Deadline; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class DeadlineTest { | ||
@Test | ||
public void testFetchingDescription() { | ||
Deadline deadline = new Deadline("return book", "2022-12-12 2330"); | ||
assertEquals("[D][ ] return book (by: Dec 12 2022 2330)", deadline.toString()); | ||
} | ||
|
||
@Test | ||
public void testMarking(){ | ||
Deadline deadline = new Deadline("return book", "2022-12-12 2330"); | ||
deadline.mark(); | ||
assertEquals("[D][X] return book (by: Dec 12 2022 2330)", 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,22 @@ | ||
package seedu.duke; | ||
|
||
import duke.tasks.ToDos; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class ToDoTest { | ||
@Test | ||
public void testFetchingDescription() { | ||
ToDos toDoTask = new ToDos("return book"); | ||
assertEquals("[T][ ] return book", toDoTask.toString()); | ||
} | ||
|
||
@Test | ||
public void testMarking(){ | ||
ToDos toDoTask = new ToDos("return book"); | ||
toDoTask.mark(); | ||
assertEquals("[T][X] return book", toDoTask.toString()); | ||
} | ||
|
||
} |