From 19ab96701076362426dcb31b63208d1a2f75ff44 Mon Sep 17 00:00:00 2001 From: hmanhduc2k Date: Thu, 21 Oct 2021 21:21:02 +0800 Subject: [PATCH 1/3] Minor fixes with JavaFX components --- .../academydirectory/logic/commands/HelpCommand.java | 2 +- src/main/java/seedu/academydirectory/ui/HelpWindow.java | 1 + src/main/resources/view/MainWindow.fxml | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/seedu/academydirectory/logic/commands/HelpCommand.java b/src/main/java/seedu/academydirectory/logic/commands/HelpCommand.java index 3835a8f31a0..9024ed3ba5b 100644 --- a/src/main/java/seedu/academydirectory/logic/commands/HelpCommand.java +++ b/src/main/java/seedu/academydirectory/logic/commands/HelpCommand.java @@ -38,7 +38,7 @@ public HelpCommand() { * @param helpMessage of the command needed to be clarified by the users */ public HelpCommand(String commandWord, String helpMessage) { - requireAllNonNull(helpMessage); + requireAllNonNull(helpMessage, commandWord); this.commandWord = commandWord; this.helpMessage = helpMessage; this.isGeneralHelp = false; diff --git a/src/main/java/seedu/academydirectory/ui/HelpWindow.java b/src/main/java/seedu/academydirectory/ui/HelpWindow.java index faf2c7e3986..d51db5f4a28 100644 --- a/src/main/java/seedu/academydirectory/ui/HelpWindow.java +++ b/src/main/java/seedu/academydirectory/ui/HelpWindow.java @@ -141,6 +141,7 @@ public void focus() { */ @FXML private void copyUrl() { + logger.info("Link copied"); final Clipboard clipboard = Clipboard.getSystemClipboard(); final ClipboardContent url = new ClipboardContent(); url.putString(USERGUIDE_URL); diff --git a/src/main/resources/view/MainWindow.fxml b/src/main/resources/view/MainWindow.fxml index 2fb3ab3f008..6a5fc85131a 100644 --- a/src/main/resources/view/MainWindow.fxml +++ b/src/main/resources/view/MainWindow.fxml @@ -13,7 +13,7 @@ + title="Academy Directory" minWidth="800" minHeight="600" onCloseRequest="#handleExit"> @@ -35,12 +35,12 @@ - + - - + + From 10e015dd793564e58f8fb685c8690231536c6dbb Mon Sep 17 00:00:00 2001 From: hmanhduc2k Date: Thu, 21 Oct 2021 21:37:20 +0800 Subject: [PATCH 2/3] Minor fixes with test cases. --- .../seedu/academydirectory/logic/commands/HelpCommandTest.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/test/java/seedu/academydirectory/logic/commands/HelpCommandTest.java b/src/test/java/seedu/academydirectory/logic/commands/HelpCommandTest.java index ec7cadbbaee..d9eb5013c1b 100644 --- a/src/test/java/seedu/academydirectory/logic/commands/HelpCommandTest.java +++ b/src/test/java/seedu/academydirectory/logic/commands/HelpCommandTest.java @@ -44,8 +44,5 @@ public void execute_valid_help() { CommandResult commandResult3 = new CommandResult(String.format(HelpCommand.MESSAGE_HELP_SUCCESS_SPECIFIC, "exit"), ExitCommand.HELP_MESSAGE); assertCommandSuccess(helpCommand3, model, commandResult3, model); - - HelpCommand helpCommand4 = new HelpCommand(null, DeleteCommand.HELP_MESSAGE); - assertThrows(CommandException.class, () -> helpCommand4.execute(model)); } } From b07731fc24a5642af581f71352cac2dbfefed938 Mon Sep 17 00:00:00 2001 From: hmanhduc2k Date: Thu, 21 Oct 2021 21:37:31 +0800 Subject: [PATCH 3/3] Minor fixes with test cases. --- .../seedu/academydirectory/logic/commands/HelpCommandTest.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/test/java/seedu/academydirectory/logic/commands/HelpCommandTest.java b/src/test/java/seedu/academydirectory/logic/commands/HelpCommandTest.java index d9eb5013c1b..af379c4d68f 100644 --- a/src/test/java/seedu/academydirectory/logic/commands/HelpCommandTest.java +++ b/src/test/java/seedu/academydirectory/logic/commands/HelpCommandTest.java @@ -2,12 +2,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; -import static org.junit.jupiter.api.Assertions.assertThrows; import static seedu.academydirectory.logic.commands.CommandTestUtil.assertCommandSuccess; import org.junit.jupiter.api.Test; -import seedu.academydirectory.logic.commands.exceptions.CommandException; import seedu.academydirectory.model.Model; import seedu.academydirectory.model.ModelManager;