Skip to content

Commit

Permalink
Update JUnit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ibnu2651 committed Feb 20, 2024
1 parent 109f9e2 commit aea1fec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/main/java/adam/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
import adam.command.MarkCommand;
import adam.command.UnmarkCommand;

import java.lang.management.ThreadMXBean;

/**
* Parses the user input and creates the commands requested by the user.
*/
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/adam/task/DeadlineTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ public void testDeadlineInvalidDate() {
Deadline d = new Deadline("description", "not a date");
fail();
} catch (Exception e) {
assertEquals("ERROR: Invalid date or date format", e.getMessage());
assertEquals("ERROR: Invalid date or date format, date format is yyyy-mm-dd", e.getMessage());
}
try {
Deadline d = new Deadline("description", "10 Jan 2001");
fail();
} catch (Exception e) {
assertEquals("ERROR: Invalid date or date format", e.getMessage());
assertEquals("ERROR: Invalid date or date format, date format is yyyy-mm-dd", e.getMessage());
}
try {
Deadline d = new Deadline("description", "2001/01/10");
fail();
} catch (Exception e) {
assertEquals("ERROR: Invalid date or date format", e.getMessage());
assertEquals("ERROR: Invalid date or date format, date format is yyyy-mm-dd", e.getMessage());
}
}

Expand Down

0 comments on commit aea1fec

Please sign in to comment.