Skip to content

Commit

Permalink
Fix tests to test the correct lines of code
Browse files Browse the repository at this point in the history
  • Loading branch information
Chua Zi Long committed Apr 6, 2024
1 parent 666029f commit 2d20eca
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public void isFirstDateTimeBeforeSecond_validDateTimes_firstIsAfterThrows() {
String dateTimeStr1 = "2023-03-21 17:00";
String dateTimeStr2 = "2023-03-21 16:00";

assertThrows(ParseException.class, () -> parser.parse("add_schedule title/title d/description"
assertThrows(ParseException.class, () -> parser.parse(" add_schedule title/title d/description"
+ " start/" + dateTimeStr1 + " end/" + dateTimeStr2));
}

Expand All @@ -174,7 +174,7 @@ public void invalidDateTimes_outOfRangeStart() {
String dateTimeStr1 = "2023-03-41 15:00";
String dateTimeStr2 = "2023-03-21 16:00";

assertThrows(ParseException.class, () -> parser.parse("add_schedule title/title d/description"
assertThrows(ParseException.class, () -> parser.parse(" add_schedule title/title d/description"
+ " start/" + dateTimeStr1 + " end/" + dateTimeStr2));
}

Expand All @@ -184,7 +184,7 @@ public void invalidDateTimes_outOfRangeEnd() {
String dateTimeStr1 = "2023-03-21 15:00";
String dateTimeStr2 = "2023-03-41 16:00";

assertThrows(ParseException.class, () -> parser.parse("add_schedule title/title d/description"
assertThrows(ParseException.class, () -> parser.parse(" add_schedule title/title d/description"
+ " start/" + dateTimeStr1 + " end/" + dateTimeStr2));
}
}

0 comments on commit 2d20eca

Please sign in to comment.