From aea1fec2b42f4d6fdd808d87d801b080263e4dd1 Mon Sep 17 00:00:00 2001 From: Ibnu Taimiyyah Date: Tue, 20 Feb 2024 20:50:27 +0800 Subject: [PATCH] Update JUnit tests --- src/main/java/adam/Parser.java | 2 -- src/test/java/adam/task/DeadlineTest.java | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/adam/Parser.java b/src/main/java/adam/Parser.java index caaa3d76a6..7dd707a312 100644 --- a/src/main/java/adam/Parser.java +++ b/src/main/java/adam/Parser.java @@ -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. */ diff --git a/src/test/java/adam/task/DeadlineTest.java b/src/test/java/adam/task/DeadlineTest.java index 81eea3f15f..3879400273 100644 --- a/src/test/java/adam/task/DeadlineTest.java +++ b/src/test/java/adam/task/DeadlineTest.java @@ -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()); } }