Skip to content

Commit

Permalink
Programming exercises: Fix failing example test in Java blackbox exer…
Browse files Browse the repository at this point in the history
…cise template (#7365)
  • Loading branch information
b-fein authored Oct 14, 2023
1 parent 6ad82e0 commit dd9c923
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,17 @@ public static void main(String[] args) throws IOException {

private static CommandRunResult runCommand(final Command command) {
switch (command) {
case Command.AddCommand addCommand -> CONTEXT.addDates(addCommand.dates());
case Command.AddCommand addCommand -> {
CONTEXT.addDates(addCommand.dates());
}
case Command.SortCommand ignored -> CONTEXT.sort();
case Command.ClearCommand ignored -> CONTEXT.clearDates();
case Command.HelpCommand helpCommand -> System.out.println(helpCommand.helpMessage());
case Command.PrintCommand ignored -> System.out.println(CONTEXT.getDates());
case Command.HelpCommand helpCommand -> {
System.out.println(helpCommand.helpMessage());
}
case Command.PrintCommand ignored -> {
System.out.println(CONTEXT.getDates());
}
case Command.QuitCommand ignored -> {
return CommandRunResult.QUIT;
}
Expand Down

0 comments on commit dd9c923

Please sign in to comment.