forked from nus-cs2103-AY2021S1/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
48 changed files
with
145 additions
and
35 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+1.89 KB
output/production/ip/main/java/Ui.class → output/production/ip/main/java/duke/Ui.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+424 Bytes
output/production/ip/main/java/duke/exceptions/InvalidFileException.class
Binary file not shown.
Binary file added
BIN
+427 Bytes
output/production/ip/main/java/duke/exceptions/InvalidInputException.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+1.27 KB
.../production/ip/main/java/tasks/Task.class → ...uction/ip/main/java/duke/tasks/Task.class
Binary file not shown.
Binary file renamed
BIN
+2.23 KB
...duction/ip/main/java/tasks/TaskList.class → ...on/ip/main/java/duke/tasks/TaskList.class
Binary file not shown.
Binary file renamed
BIN
+1.15 KB
.../production/ip/main/java/tasks/Todo.class → ...uction/ip/main/java/duke/tasks/Todo.class
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-409 Bytes
output/production/ip/main/java/exceptions/InvalidFileException.class
Binary file not shown.
Binary file removed
BIN
-412 Bytes
output/production/ip/main/java/exceptions/InvalidInputException.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,32 @@ | ||
package test.java.duke; | ||
|
||
import main.java.duke.Parser; | ||
import main.java.duke.command.Command; | ||
import main.java.duke.exceptions.DukeException; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
class ParserTest { | ||
|
||
@Test | ||
public void testParseCommand() { | ||
try { | ||
Parser.parseCommand("event read book /at 2020-10-10 20:00"); | ||
assertTrue(true); | ||
} catch (DukeException e) { | ||
fail(); | ||
} | ||
} | ||
|
||
@Test | ||
public void testParseError() { | ||
try { | ||
Parser.parseCommand("even read book 2020-10-10 20:00"); | ||
fail(); | ||
} catch (DukeException e) { | ||
assertTrue(true); | ||
} | ||
} | ||
|
||
} |
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,28 @@ | ||
package test.java.duke.tasks; | ||
|
||
import main.java.duke.tasks.Deadline; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import java.time.LocalDateTime; | ||
import java.time.format.DateTimeFormatter; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
class DeadlineTest { | ||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"); | ||
|
||
@Test | ||
public void constructorTest() { | ||
Deadline deadlineTask = new Deadline("read book ", | ||
LocalDateTime.parse("2020-10-10 10:10", formatter)); | ||
assertEquals("[D][✘] read book (by:10/10/2020 10:10 AM)", deadlineTask.toString()); | ||
} | ||
|
||
@Test | ||
void getState() { | ||
Deadline deadlineTask = new Deadline("read book ", | ||
LocalDateTime.parse("2020-10-10 10:10", formatter)); | ||
assertEquals("D|0|read book |2020-10-10 10:10", deadlineTask.getState()); | ||
} | ||
|
||
} |
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,29 @@ | ||
package test.java.duke.tasks; | ||
|
||
import main.java.duke.tasks.Todo; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
|
||
class TodoTest { | ||
|
||
@Test | ||
public void constructorTest() { | ||
Todo todoTask = new Todo("read book"); | ||
assertEquals("[T][✘] read book", todoTask.toString()); | ||
} | ||
|
||
@Test | ||
void getState() { | ||
Todo todoTask = new Todo("read book"); | ||
assertEquals("T|0|read book", todoTask.getState()); | ||
} | ||
|
||
@Test | ||
void doneTask() { | ||
Todo todoTask = new Todo("read book"); | ||
todoTask.markAsDone(); | ||
assertEquals("[T][✓] read book", todoTask.toString()); | ||
} | ||
} |