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
4 changed files
with
63 additions
and
1 deletion.
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,24 @@ | ||
package duke.task; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
import java.time.LocalDateTime; | ||
import java.time.format.DateTimeFormatter; | ||
|
||
public class DeadlineTest { | ||
@Test | ||
public void deadlineTestToString() { | ||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd/MM/yyyy HHmm"); | ||
Deadline test = new Deadline("test", LocalDateTime.parse("01/01/2025 1600",formatter)); | ||
assertEquals("[D][ ] test (by: Jan 1 2025 1600)", test.toString()); | ||
} | ||
|
||
@Test | ||
public void deadlineTestTextFormat() { | ||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd/MM/yyyy HHmm"); | ||
Deadline test = new Deadline("test", LocalDateTime.parse("01/01/2025 1600",formatter)); | ||
assertEquals("D|0|test|2025-01-01T16:00", test.textFormat()); | ||
} | ||
} |
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,19 @@ | ||
package duke.task; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class EventsTest { | ||
@Test | ||
public void EventsTestToString() { | ||
Events test = new Events("test", "test"); | ||
assertEquals("[E][ ] test (by: test)", test.toString()); | ||
} | ||
|
||
@Test | ||
public void EventsTestTextFormat() { | ||
Events test = new Events("test", "test"); | ||
assertEquals("E|0|test|test", test.textFormat()); | ||
} | ||
} |
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,19 @@ | ||
package duke.task; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class ToDosTest { | ||
@Test | ||
public void ToDosTestToString() { | ||
ToDos test = new ToDos("test"); | ||
assertEquals("[T][ ] test", test.toString()); | ||
} | ||
|
||
@Test | ||
public void ToDosTextFormat() { | ||
ToDos test = new ToDos("test"); | ||
assertEquals("T|0|test", test.textFormat()); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
todo borrow book | ||
list | ||
deadline return book /by Sunday | ||
deadline return book /by | ||
event project meeting /at Mon 2-4pm |