Skip to content

Commit

Permalink
Fix wrong exception messages in logEdit
Browse files Browse the repository at this point in the history
  • Loading branch information
CJerrong committed Apr 15, 2024
1 parent c43efe3 commit 41539d4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class LogEditCommand extends Command {

public static final String MESSAGE_EDIT_LOG_SUCCESS = "Edited Log successfully: %1$s";
public static final String MESSAGE_NOT_EDITED = "At least one field to edit must be provided.";
public static final String MESSAGE_NEGATIVE_DURATION = "Duration cannot be negative.";
public static final String MESSAGE_NEGATIVE_DURATION = "Duration must be positive.";

private final Index index;
private final EditLogDescriptor editLogDescriptor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void parse_invalidDateFormat_throwsParseException() {
@Test
public void parse_invalidDurationFormat_throwsParseException() {
assertParseFailure(parser, "1 2 t/Movies s/2024-03-07 d/Two r/Good",
"Invalid number format. Expected a number.");
"Invalid number format. Expected an integer.");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public void parse_invalidDateFormat_throwsParseException() {
@Test
public void parse_invalidDurationFormat_throwsParseException() {
assertParseFailure(parser, "1 t/Icebreaker s/2024-04-08 d/Two r/Was okay.",
"Invalid number format. Expected a number.");
"Invalid number format. Expected an integer.");
}
@Test
public void parse_invalidArgs_throwsParseException() {
Expand Down

0 comments on commit 41539d4

Please sign in to comment.