From 60e45ccb2dbb45497fd45b6efc4602b11a7bfc1d Mon Sep 17 00:00:00 2001 From: Wilfred Bradley Tan Date: Fri, 18 Oct 2019 02:05:04 +0800 Subject: [PATCH] refactor address into revision. Update Khiang Leon's delete command --- build.gradle | 2 +- docs/tutorials/AddRemark.adoc | 10 +-- .../address/logic/commands/DeleteCommand.java | 53 --------------- .../{address => revision}/AppParameters.java | 6 +- .../seedu/{address => revision}/Main.java | 2 +- .../seedu/{address => revision}/MainApp.java | 54 +++++++-------- .../commons/core/Config.java | 2 +- .../commons/core/GuiSettings.java | 2 +- .../commons/core/LogsCenter.java | 2 +- .../commons/core/Messages.java | 2 +- .../commons/core/Version.java | 2 +- .../commons/core/index/Index.java | 2 +- .../exceptions/DataConversionException.java | 2 +- .../exceptions/IllegalValueException.java | 2 +- .../commons/util/AppUtil.java | 4 +- .../commons/util/CollectionUtil.java | 2 +- .../commons/util/ConfigUtil.java | 6 +- .../commons/util/FileUtil.java | 2 +- .../commons/util/JsonUtil.java | 6 +- .../commons/util/StringUtil.java | 4 +- .../{address => revision}/logic/Logic.java | 18 ++--- .../logic/LogicManager.java | 24 +++---- .../logic/commands/AddCommand.java | 16 ++--- .../logic/commands/ClearCommand.java | 8 +-- .../logic/commands/Command.java | 6 +- .../logic/commands/CommandResult.java | 2 +- .../logic/commands/DeleteCommand.java | 65 ++++++++++++++++++ .../logic/commands/EditCommand.java | 32 ++++----- .../logic/commands/ExitCommand.java | 4 +- .../logic/commands/FindCommand.java | 8 +-- .../logic/commands/HelpCommand.java | 4 +- .../logic/commands/ListCommand.java | 20 +++--- .../commands/exceptions/CommandException.java | 2 +- .../logic/parser/AddCommandParser.java | 32 ++++----- .../logic/parser/AddressBookParser.java | 26 ++++---- .../logic/parser/ArgumentMultimap.java | 2 +- .../logic/parser/ArgumentTokenizer.java | 2 +- .../logic/parser/CliSyntax.java | 2 +- .../logic/parser/DeleteCommandParser.java | 10 +-- .../logic/parser/EditCommandParser.java | 25 ++++--- .../logic/parser/FindCommandParser.java | 10 +-- .../logic/parser/ListCommandParser.java | 24 +++---- .../logic/parser/Parser.java | 6 +- .../logic/parser/ParserUtil.java | 16 ++--- .../logic/parser/Prefix.java | 2 +- .../logic/parser/QuestionType.java | 4 +- .../parser/exceptions/ParseException.java | 4 +- .../model/AddressBook.java | 20 +++--- .../{address => revision}/model/Model.java | 22 +++---- .../model/ModelManager.java | 14 ++-- .../model/ReadOnlyAddressBook.java | 6 +- .../model/ReadOnlyUserPrefs.java | 4 +- .../model/UserPrefs.java | 4 +- .../model/answerable/Answer.java | 6 +- .../model/answerable/Answerable.java | 7 +- .../model/answerable/Difficulty.java | 4 +- .../model/answerable/Mcq.java | 6 +- .../model/answerable/Question.java | 6 +- .../model/answerable/Saq.java | 4 +- .../answerable/UniqueAnswerableList.java | 8 +-- .../AnswerableNotFoundException.java | 2 +- .../DuplicateAnswerableException.java | 2 +- .../predicates/CategoryPredicate.java | 6 +- .../predicates/DifficultyPredicate.java | 6 +- .../QuestionContainsKeywordsPredicate.java | 6 +- .../model/category/Category.java | 6 +- .../model/util/SampleDataUtil.java | 18 ++--- .../storage/AddressBookStorage.java | 8 +-- .../storage/JsonAdaptedAnswer.java | 6 +- .../storage/JsonAdaptedAnswerable.java | 16 ++--- .../storage/JsonAdaptedCategory.java | 6 +- .../storage/JsonAddressBookStorage.java | 14 ++-- .../storage/JsonSerializableAddressBook.java | 12 ++-- .../storage/JsonUserPrefsStorage.java | 10 +-- .../storage/Storage.java | 10 +-- .../storage/StorageManager.java | 12 ++-- .../storage/UserPrefsStorage.java | 12 ++-- .../ui/AnswerableCard.java | 4 +- .../ui/AnswerableListPanel.java | 6 +- .../{address => revision}/ui/CommandBox.java | 10 +-- .../{address => revision}/ui/HelpWindow.java | 4 +- .../{address => revision}/ui/MainWindow.java | 16 ++--- .../ui/ResultDisplay.java | 2 +- .../ui/StatusBarFooter.java | 2 +- .../seedu/{address => revision}/ui/Ui.java | 2 +- .../{address => revision}/ui/UiManager.java | 10 +-- .../{address => revision}/ui/UiPart.java | 4 +- .../resources/view/AnswerableListCard 2.fxml | 34 ++++++++++ .../invalidAnswerableTestBank 2.json | 13 ++++ .../duplicateAnswerableTestBank 2.json | 15 +++++ .../invalidAnswerableTestBank 2.json | 7 ++ .../AppParametersTest.java | 2 +- .../commons/core/ConfigTest.java | 2 +- .../commons/core/VersionTest.java | 4 +- .../commons/core/index/IndexTest.java | 4 +- .../commons/util/AppUtilTest.java | 4 +- .../commons/util/CollectionUtilTest.java | 6 +- .../commons/util/ConfigUtilTest.java | 8 +-- .../commons/util/FileUtilTest.java | 4 +- .../commons/util/JsonUtilTest.java | 6 +- .../commons/util/StringUtilTest.java | 4 +- .../logic/LogicManagerTest.java | 50 +++++++------- .../commands/AddCommandIntegrationTest.java | 18 ++--- .../logic/commands/AddCommandTest.java | 20 +++--- .../logic/commands/ClearCommandTest.java | 14 ++-- .../logic/commands/CommandResultTest.java | 2 +- .../logic/commands/CommandTestUtil.java | 36 +++++----- .../logic/commands/DeleteCommandTest.java | 28 ++++---- .../EditAnswerableDescriptorTest.java | 16 ++--- .../logic/commands/EditCommandTest.java | 50 +++++++------- .../logic/commands/ExitCommandTest.java | 10 +-- .../logic/commands/FindCommandTest.java | 22 +++---- .../logic/commands/HelpCommandTest.java | 10 +-- .../logic/commands/ListCommandTest.java | 24 +++---- .../logic/parser/AddCommandParserTest.java | 62 ++++++++--------- .../logic/parser/AddressBookParserTest.java | 38 +++++------ .../logic/parser/ArgumentTokenizerTest.java | 2 +- .../logic/parser/CommandParserTestUtil.java | 6 +- .../logic/parser/DeleteCommandParserTest.java | 12 ++-- .../logic/parser/EditCommandParserTest.java | 66 +++++++++---------- .../logic/parser/FindCommandParserTest.java | 12 ++-- .../logic/parser/ParserUtilTest.java | 16 ++--- .../model/AddressBookTest.java | 16 ++--- .../model/ModelManagerTest.java | 22 +++---- .../model/UserPrefsTest.java | 4 +- .../model/answerable/AnswerableTest.java | 16 ++--- .../model/answerable/DifficultyTest.java | 4 +- ...QuestionContainsKeywordsPredicateTest.java | 8 +-- .../model/answerable/QuestionTest.java | 4 +- .../answerable/UniqueAnswerableListTest.java | 16 ++--- .../model/category/CategoryTest.java | 4 +- .../storage/JsonAdaptedAnswerableTest.java | 14 ++-- .../storage/JsonAddressBookStorageTest.java | 18 ++--- .../JsonSerializableAddressBookTest.java | 12 ++-- .../storage/JsonUserPrefsStorageTest.java | 10 +-- .../storage/StorageManagerTest.java | 12 ++-- .../testutil/AddressBookBuilder.java | 6 +- .../testutil/AnswerableBuilder.java | 16 ++--- .../testutil/AnswerableUtil.java | 24 +++---- .../testutil/Assert.java | 2 +- .../EditAnswerableDescriptorBuilder.java | 16 ++--- .../testutil/SerializableTestClass.java | 2 +- .../testutil/TestUtil.java | 8 +-- .../testutil/TypicalAnswerables.java | 20 +++--- .../testutil/TypicalIndexes.java | 4 +- .../ui/TestFxmlObject.java | 2 +- .../{address => revision}/ui/UiPartTest.java | 6 +- .../resources/view/UiPartTest/validFile.fxml | 2 +- .../view/UiPartTest/validFileWithFxRoot.fxml | 4 +- 149 files changed, 919 insertions(+), 844 deletions(-) delete mode 100644 src/main/java/seedu/address/logic/commands/DeleteCommand.java rename src/main/java/seedu/{address => revision}/AppParameters.java (93%) rename src/main/java/seedu/{address => revision}/Main.java (97%) rename src/main/java/seedu/{address => revision}/MainApp.java (81%) rename src/main/java/seedu/{address => revision}/commons/core/Config.java (97%) rename src/main/java/seedu/{address => revision}/commons/core/GuiSettings.java (98%) rename src/main/java/seedu/{address => revision}/commons/core/LogsCenter.java (99%) rename src/main/java/seedu/{address => revision}/commons/core/Messages.java (92%) rename src/main/java/seedu/{address => revision}/commons/core/Version.java (98%) rename src/main/java/seedu/{address => revision}/commons/core/index/Index.java (97%) rename src/main/java/seedu/{address => revision}/commons/exceptions/DataConversionException.java (84%) rename src/main/java/seedu/{address => revision}/commons/exceptions/IllegalValueException.java (92%) rename src/main/java/seedu/{address => revision}/commons/util/AppUtil.java (93%) rename src/main/java/seedu/{address => revision}/commons/util/CollectionUtil.java (96%) rename src/main/java/seedu/{address => revision}/commons/util/ConfigUtil.java (77%) rename src/main/java/seedu/{address => revision}/commons/util/FileUtil.java (98%) rename src/main/java/seedu/{address => revision}/commons/util/JsonUtil.java (97%) rename src/main/java/seedu/{address => revision}/commons/util/StringUtil.java (95%) rename src/main/java/seedu/{address => revision}/logic/Logic.java (68%) rename src/main/java/seedu/{address => revision}/logic/LogicManager.java (78%) rename src/main/java/seedu/{address => revision}/logic/commands/AddCommand.java (79%) rename src/main/java/seedu/{address => revision}/logic/commands/ClearCommand.java (75%) rename src/main/java/seedu/{address => revision}/logic/commands/Command.java (78%) rename src/main/java/seedu/{address => revision}/logic/commands/CommandResult.java (97%) create mode 100644 src/main/java/seedu/revision/logic/commands/DeleteCommand.java rename src/main/java/seedu/{address => revision}/logic/commands/EditCommand.java (90%) rename src/main/java/seedu/{address => revision}/logic/commands/ExitCommand.java (83%) rename src/main/java/seedu/{address => revision}/logic/commands/FindCommand.java (87%) rename src/main/java/seedu/{address => revision}/logic/commands/HelpCommand.java (87%) rename src/main/java/seedu/{address => revision}/logic/commands/ListCommand.java (79%) rename src/main/java/seedu/{address => revision}/logic/commands/exceptions/CommandException.java (89%) rename src/main/java/seedu/{address => revision}/logic/parser/AddCommandParser.java (73%) rename src/main/java/seedu/{address => revision}/logic/parser/AddressBookParser.java (72%) rename src/main/java/seedu/{address => revision}/logic/parser/ArgumentMultimap.java (98%) rename src/main/java/seedu/{address => revision}/logic/parser/ArgumentTokenizer.java (99%) rename src/main/java/seedu/{address => revision}/logic/parser/CliSyntax.java (93%) rename src/main/java/seedu/{address => revision}/logic/parser/DeleteCommandParser.java (73%) rename src/main/java/seedu/{address => revision}/logic/parser/EditCommandParser.java (79%) rename src/main/java/seedu/{address => revision}/logic/parser/FindCommandParser.java (73%) rename src/main/java/seedu/{address => revision}/logic/parser/ListCommandParser.java (63%) rename src/main/java/seedu/{address => revision}/logic/parser/Parser.java (72%) rename src/main/java/seedu/{address => revision}/logic/parser/ParserUtil.java (92%) rename src/main/java/seedu/{address => revision}/logic/parser/Prefix.java (95%) rename src/main/java/seedu/{address => revision}/logic/parser/QuestionType.java (94%) rename src/main/java/seedu/{address => revision}/logic/parser/exceptions/ParseException.java (72%) rename src/main/java/seedu/{address => revision}/model/AddressBook.java (85%) rename src/main/java/seedu/{address => revision}/model/Model.java (76%) rename src/main/java/seedu/{address => revision}/model/ModelManager.java (90%) rename src/main/java/seedu/{address => revision}/model/ReadOnlyAddressBook.java (69%) rename src/main/java/seedu/{address => revision}/model/ReadOnlyUserPrefs.java (70%) rename src/main/java/seedu/{address => revision}/model/UserPrefs.java (96%) rename src/main/java/seedu/{address => revision}/model/answerable/Answer.java (90%) rename src/main/java/seedu/{address => revision}/model/answerable/Answerable.java (95%) rename src/main/java/seedu/{address => revision}/model/answerable/Difficulty.java (93%) rename src/main/java/seedu/{address => revision}/model/answerable/Mcq.java (76%) rename src/main/java/seedu/{address => revision}/model/answerable/Question.java (90%) rename src/main/java/seedu/{address => revision}/model/answerable/Saq.java (85%) rename src/main/java/seedu/{address => revision}/model/answerable/UniqueAnswerableList.java (94%) rename src/main/java/seedu/{address => revision}/model/answerable/exceptions/AnswerableNotFoundException.java (74%) rename src/main/java/seedu/{address => revision}/model/answerable/exceptions/DuplicateAnswerableException.java (86%) rename src/main/java/seedu/{address => revision}/model/answerable/predicates/CategoryPredicate.java (86%) rename src/main/java/seedu/{address => revision}/model/answerable/predicates/DifficultyPredicate.java (81%) rename src/main/java/seedu/{address => revision}/model/answerable/predicates/QuestionContainsKeywordsPredicate.java (86%) rename src/main/java/seedu/{address => revision}/model/category/Category.java (90%) rename src/main/java/seedu/{address => revision}/model/util/SampleDataUtil.java (84%) rename src/main/java/seedu/{address => revision}/storage/AddressBookStorage.java (85%) rename src/main/java/seedu/{address => revision}/storage/JsonAdaptedAnswer.java (88%) rename src/main/java/seedu/{address => revision}/storage/JsonAdaptedAnswerable.java (91%) rename src/main/java/seedu/{address => revision}/storage/JsonAdaptedCategory.java (89%) rename src/main/java/seedu/{address => revision}/storage/JsonAddressBookStorage.java (86%) rename src/main/java/seedu/{address => revision}/storage/JsonSerializableAddressBook.java (85%) rename src/main/java/seedu/{address => revision}/storage/JsonUserPrefsStorage.java (82%) rename src/main/java/seedu/{address => revision}/storage/Storage.java (73%) rename src/main/java/seedu/{address => revision}/storage/StorageManager.java (89%) rename src/main/java/seedu/{address => revision}/storage/UserPrefsStorage.java (71%) rename src/main/java/seedu/{address => revision}/ui/AnswerableCard.java (96%) rename src/main/java/seedu/{address => revision}/ui/AnswerableListPanel.java (91%) rename src/main/java/seedu/{address => revision}/ui/CommandBox.java (88%) rename src/main/java/seedu/{address => revision}/ui/HelpWindow.java (97%) rename src/main/java/seedu/{address => revision}/ui/MainWindow.java (93%) rename src/main/java/seedu/{address => revision}/ui/ResultDisplay.java (95%) rename src/main/java/seedu/{address => revision}/ui/StatusBarFooter.java (95%) rename src/main/java/seedu/{address => revision}/ui/Ui.java (85%) rename src/main/java/seedu/{address => revision}/ui/UiManager.java (93%) rename src/main/java/seedu/{address => revision}/ui/UiPart.java (97%) create mode 100644 src/main/resources/view/AnswerableListCard 2.fxml create mode 100644 src/test/data/JsonAddressBookStorageTest/invalidAnswerableTestBank 2.json create mode 100644 src/test/data/JsonSerializableAddressBookTest/duplicateAnswerableTestBank 2.json create mode 100644 src/test/data/JsonSerializableAddressBookTest/invalidAnswerableTestBank 2.json rename src/test/java/seedu/{address => revision}/AppParametersTest.java (98%) rename src/test/java/seedu/{address => revision}/commons/core/ConfigTest.java (95%) rename src/test/java/seedu/{address => revision}/commons/core/VersionTest.java (98%) rename src/test/java/seedu/{address => revision}/commons/core/index/IndexTest.java (95%) rename src/test/java/seedu/{address => revision}/commons/util/AppUtilTest.java (91%) rename src/test/java/seedu/{address => revision}/commons/util/CollectionUtilTest.java (96%) rename src/test/java/seedu/{address => revision}/commons/util/ConfigUtilTest.java (94%) rename src/test/java/seedu/{address => revision}/commons/util/FileUtilTest.java (84%) rename src/test/java/seedu/{address => revision}/commons/util/JsonUtilTest.java (92%) rename src/test/java/seedu/{address => revision}/commons/util/StringUtilTest.java (98%) rename src/test/java/seedu/{address => revision}/logic/LogicManagerTest.java (80%) rename src/test/java/seedu/{address => revision}/logic/commands/AddCommandIntegrationTest.java (68%) rename src/test/java/seedu/{address => revision}/logic/commands/AddCommandTest.java (92%) rename src/test/java/seedu/{address => revision}/logic/commands/ClearCommandTest.java (67%) rename src/test/java/seedu/{address => revision}/logic/commands/CommandResultTest.java (98%) rename src/test/java/seedu/{address => revision}/logic/commands/CommandTestUtil.java (85%) rename src/test/java/seedu/{address => revision}/logic/commands/DeleteCommandTest.java (81%) rename src/test/java/seedu/{address => revision}/logic/commands/EditAnswerableDescriptorTest.java (72%) rename src/test/java/seedu/{address => revision}/logic/commands/EditCommandTest.java (82%) rename src/test/java/seedu/{address => revision}/logic/commands/ExitCommandTest.java (60%) rename src/test/java/seedu/{address => revision}/logic/commands/FindCommandTest.java (81%) rename src/test/java/seedu/{address => revision}/logic/commands/HelpCommandTest.java (60%) rename src/test/java/seedu/{address => revision}/logic/commands/ListCommandTest.java (63%) rename src/test/java/seedu/{address => revision}/logic/parser/AddCommandParserTest.java (59%) rename src/test/java/seedu/{address => revision}/logic/parser/AddressBookParserTest.java (75%) rename src/test/java/seedu/{address => revision}/logic/parser/ArgumentTokenizerTest.java (99%) rename src/test/java/seedu/{address => revision}/logic/parser/CommandParserTestUtil.java (89%) rename src/test/java/seedu/{address => revision}/logic/parser/DeleteCommandParserTest.java (68%) rename src/test/java/seedu/{address => revision}/logic/parser/EditCommandParserTest.java (74%) rename src/test/java/seedu/{address => revision}/logic/parser/FindCommandParserTest.java (66%) rename src/test/java/seedu/{address => revision}/logic/parser/ParserUtilTest.java (92%) rename src/test/java/seedu/{address => revision}/model/AddressBookTest.java (84%) rename src/test/java/seedu/{address => revision}/model/ModelManagerTest.java (86%) rename src/test/java/seedu/{address => revision}/model/UserPrefsTest.java (85%) rename src/test/java/seedu/{address => revision}/model/answerable/AnswerableTest.java (83%) rename src/test/java/seedu/{address => revision}/model/answerable/DifficultyTest.java (93%) rename src/test/java/seedu/{address => revision}/model/answerable/QuestionContainsKeywordsPredicateTest.java (92%) rename src/test/java/seedu/{address => revision}/model/answerable/QuestionTest.java (92%) rename src/test/java/seedu/{address => revision}/model/answerable/UniqueAnswerableListTest.java (92%) rename src/test/java/seedu/{address => revision}/model/category/CategoryTest.java (86%) rename src/test/java/seedu/{address => revision}/storage/JsonAdaptedAnswerableTest.java (89%) rename src/test/java/seedu/{address => revision}/storage/JsonAddressBookStorageTest.java (88%) rename src/test/java/seedu/{address => revision}/storage/JsonSerializableAddressBookTest.java (86%) rename src/test/java/seedu/{address => revision}/storage/JsonUserPrefsStorageTest.java (94%) rename src/test/java/seedu/{address => revision}/storage/StorageManagerTest.java (88%) rename src/test/java/seedu/{address => revision}/testutil/AddressBookBuilder.java (85%) rename src/test/java/seedu/{address => revision}/testutil/AnswerableBuilder.java (89%) rename src/test/java/seedu/{address => revision}/testutil/AnswerableUtil.java (80%) rename src/test/java/seedu/{address => revision}/testutil/Assert.java (97%) rename src/test/java/seedu/{address => revision}/testutil/EditAnswerableDescriptorBuilder.java (87%) rename src/test/java/seedu/{address => revision}/testutil/SerializableTestClass.java (98%) rename src/test/java/seedu/{address => revision}/testutil/TestUtil.java (90%) rename src/test/java/seedu/{address => revision}/testutil/TypicalAnswerables.java (85%) rename src/test/java/seedu/{address => revision}/testutil/TypicalIndexes.java (81%) rename src/test/java/seedu/{address => revision}/ui/TestFxmlObject.java (96%) rename src/test/java/seedu/{address => revision}/ui/UiPartTest.java (97%) diff --git a/build.gradle b/build.gradle index cb91b5ed284..b95eba5e130 100644 --- a/build.gradle +++ b/build.gradle @@ -15,7 +15,7 @@ plugins { } // Specifies the entry point of the application -mainClassName = 'seedu.address.Main' +mainClassName = 'seedu.revision.Main' sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 diff --git a/docs/tutorials/AddRemark.adoc b/docs/tutorials/AddRemark.adoc index 51044c36494..0dc23e170ea 100644 --- a/docs/tutorials/AddRemark.adoc +++ b/docs/tutorials/AddRemark.adoc @@ -34,11 +34,11 @@ For now, let's keep `RemarkCommand` as simple as possible and print some output. We accomplish that by returning a `CommandResult` with an accompanying message. .RemarkCommand.java -[source, java] +[source,java] ---- -package seedu.address.logic.commands; +package seedu.revision.logic.commands; -import seedu.address.model.Model; +import seedu.revision.model.Model; /** * Changes the remark of an existing person in the address book. @@ -108,9 +108,9 @@ We start by modifying the constructor of `RemarkCommand` to accept an `Index` an While we are at it, let's change the error message to echo the values. While this is not a replacement for tests, it is an obvious way to tell if our code is functioning as intended. -[source, java] +[source,java] ---- -import static seedu.address.commons.util.CollectionUtil.requireAllNonNull; +import static seedu.revision.commons.util.CollectionUtil.requireAllNonNull; //... public class RemarkCommand extends Command { //... diff --git a/src/main/java/seedu/address/logic/commands/DeleteCommand.java b/src/main/java/seedu/address/logic/commands/DeleteCommand.java deleted file mode 100644 index b664946ae53..00000000000 --- a/src/main/java/seedu/address/logic/commands/DeleteCommand.java +++ /dev/null @@ -1,53 +0,0 @@ -package seedu.address.logic.commands; - -import static java.util.Objects.requireNonNull; - -import java.util.List; - -import seedu.address.commons.core.Messages; -import seedu.address.commons.core.index.Index; -import seedu.address.logic.commands.exceptions.CommandException; -import seedu.address.model.Model; -import seedu.address.model.answerable.Answerable; - -/** - * Deletes a answerable identified using it's displayed index from the address book. - */ -public class DeleteCommand extends Command { - - public static final String COMMAND_WORD = "delete"; - - public static final String MESSAGE_USAGE = COMMAND_WORD - + ": Deletes the answerable identified by the index number used in the displayed answerable list.\n" - + "Parameters: INDEX (must be a positive integer)\n" - + "Example: " + COMMAND_WORD + " 1"; - - public static final String MESSAGE_DELETE_ANSWERABLE_SUCCESS = "Deleted Answerable: %1$s"; - - private final Index targetIndex; - - public DeleteCommand(Index targetIndex) { - this.targetIndex = targetIndex; - } - - @Override - public CommandResult execute(Model model) throws CommandException { - requireNonNull(model); - List lastShownList = model.getFilteredAnswerableList(); - - if (targetIndex.getZeroBased() >= lastShownList.size()) { - throw new CommandException(Messages.MESSAGE_INVALID_ANSWERABLE_DISPLAYED_INDEX); - } - - Answerable answerableToDelete = lastShownList.get(targetIndex.getZeroBased()); - model.deleteAnswerable(answerableToDelete); - return new CommandResult(String.format(MESSAGE_DELETE_ANSWERABLE_SUCCESS, answerableToDelete)); - } - - @Override - public boolean equals(Object other) { - return other == this // short circuit if same object - || (other instanceof DeleteCommand // instanceof handles nulls - && targetIndex.equals(((DeleteCommand) other).targetIndex)); // state check - } -} diff --git a/src/main/java/seedu/address/AppParameters.java b/src/main/java/seedu/revision/AppParameters.java similarity index 93% rename from src/main/java/seedu/address/AppParameters.java rename to src/main/java/seedu/revision/AppParameters.java index ab552c398f3..32386a34281 100644 --- a/src/main/java/seedu/address/AppParameters.java +++ b/src/main/java/seedu/revision/AppParameters.java @@ -1,4 +1,4 @@ -package seedu.address; +package seedu.revision; import java.nio.file.Path; import java.nio.file.Paths; @@ -7,8 +7,8 @@ import java.util.logging.Logger; import javafx.application.Application; -import seedu.address.commons.core.LogsCenter; -import seedu.address.commons.util.FileUtil; +import seedu.revision.commons.core.LogsCenter; +import seedu.revision.commons.util.FileUtil; /** * Represents the parsed command-line parameters given to the application. diff --git a/src/main/java/seedu/address/Main.java b/src/main/java/seedu/revision/Main.java similarity index 97% rename from src/main/java/seedu/address/Main.java rename to src/main/java/seedu/revision/Main.java index 052a5068631..ea710ead61d 100644 --- a/src/main/java/seedu/address/Main.java +++ b/src/main/java/seedu/revision/Main.java @@ -1,4 +1,4 @@ -package seedu.address; +package seedu.revision; import javafx.application.Application; diff --git a/src/main/java/seedu/address/MainApp.java b/src/main/java/seedu/revision/MainApp.java similarity index 81% rename from src/main/java/seedu/address/MainApp.java rename to src/main/java/seedu/revision/MainApp.java index 167dddd08b8..2bb9964f3e3 100644 --- a/src/main/java/seedu/address/MainApp.java +++ b/src/main/java/seedu/revision/MainApp.java @@ -1,4 +1,4 @@ -package seedu.address; +package seedu.revision; import java.io.IOException; import java.nio.file.Path; @@ -7,29 +7,29 @@ import javafx.application.Application; import javafx.stage.Stage; -import seedu.address.commons.core.Config; -import seedu.address.commons.core.LogsCenter; -import seedu.address.commons.core.Version; -import seedu.address.commons.exceptions.DataConversionException; -import seedu.address.commons.util.ConfigUtil; -import seedu.address.commons.util.StringUtil; -import seedu.address.logic.Logic; -import seedu.address.logic.LogicManager; -import seedu.address.model.AddressBook; -import seedu.address.model.Model; -import seedu.address.model.ModelManager; -import seedu.address.model.ReadOnlyAddressBook; -import seedu.address.model.ReadOnlyUserPrefs; -import seedu.address.model.UserPrefs; -import seedu.address.model.util.SampleDataUtil; -import seedu.address.storage.AddressBookStorage; -import seedu.address.storage.JsonAddressBookStorage; -import seedu.address.storage.JsonUserPrefsStorage; -import seedu.address.storage.Storage; -import seedu.address.storage.StorageManager; -import seedu.address.storage.UserPrefsStorage; -import seedu.address.ui.Ui; -import seedu.address.ui.UiManager; +import seedu.revision.commons.core.Config; +import seedu.revision.commons.core.LogsCenter; +import seedu.revision.commons.core.Version; +import seedu.revision.commons.exceptions.DataConversionException; +import seedu.revision.commons.util.ConfigUtil; +import seedu.revision.commons.util.StringUtil; +import seedu.revision.logic.Logic; +import seedu.revision.logic.LogicManager; +import seedu.revision.model.AddressBook; +import seedu.revision.model.Model; +import seedu.revision.model.ModelManager; +import seedu.revision.model.ReadOnlyAddressBook; +import seedu.revision.model.ReadOnlyUserPrefs; +import seedu.revision.model.UserPrefs; +import seedu.revision.model.util.SampleDataUtil; +import seedu.revision.storage.AddressBookStorage; +import seedu.revision.storage.JsonAddressBookStorage; +import seedu.revision.storage.JsonUserPrefsStorage; +import seedu.revision.storage.Storage; +import seedu.revision.storage.StorageManager; +import seedu.revision.storage.UserPrefsStorage; +import seedu.revision.ui.Ui; +import seedu.revision.ui.UiManager; /** * Runs the application. @@ -69,9 +69,9 @@ public void init() throws Exception { } /** - * Returns a {@code ModelManager} with the data from {@code storage}'s address book and {@code userPrefs}.
- * The data from the sample address book will be used instead if {@code storage}'s address book is not found, - * or an empty address book will be used instead if errors occur when reading {@code storage}'s address book. + * Returns a {@code ModelManager} with the data from {@code storage}'s revision tool and {@code userPrefs}.
+ * The data from the sample revision tool will be used instead if {@code storage}'s revision tool is not found, + * or an empty revision tool will be used instead if errors occur when reading {@code storage}'s revision tool. */ private Model initModelManager(Storage storage, ReadOnlyUserPrefs userPrefs) { Optional addressBookOptional; diff --git a/src/main/java/seedu/address/commons/core/Config.java b/src/main/java/seedu/revision/commons/core/Config.java similarity index 97% rename from src/main/java/seedu/address/commons/core/Config.java rename to src/main/java/seedu/revision/commons/core/Config.java index 91145745521..79c124b58b7 100644 --- a/src/main/java/seedu/address/commons/core/Config.java +++ b/src/main/java/seedu/revision/commons/core/Config.java @@ -1,4 +1,4 @@ -package seedu.address.commons.core; +package seedu.revision.commons.core; import java.nio.file.Path; import java.nio.file.Paths; diff --git a/src/main/java/seedu/address/commons/core/GuiSettings.java b/src/main/java/seedu/revision/commons/core/GuiSettings.java similarity index 98% rename from src/main/java/seedu/address/commons/core/GuiSettings.java rename to src/main/java/seedu/revision/commons/core/GuiSettings.java index 5ace559ad15..c623d4888bf 100644 --- a/src/main/java/seedu/address/commons/core/GuiSettings.java +++ b/src/main/java/seedu/revision/commons/core/GuiSettings.java @@ -1,4 +1,4 @@ -package seedu.address.commons.core; +package seedu.revision.commons.core; import java.awt.Point; import java.io.Serializable; diff --git a/src/main/java/seedu/address/commons/core/LogsCenter.java b/src/main/java/seedu/revision/commons/core/LogsCenter.java similarity index 99% rename from src/main/java/seedu/address/commons/core/LogsCenter.java rename to src/main/java/seedu/revision/commons/core/LogsCenter.java index 431e7185e76..3cbc62cd984 100644 --- a/src/main/java/seedu/address/commons/core/LogsCenter.java +++ b/src/main/java/seedu/revision/commons/core/LogsCenter.java @@ -1,4 +1,4 @@ -package seedu.address.commons.core; +package seedu.revision.commons.core; import java.io.IOException; import java.util.Arrays; diff --git a/src/main/java/seedu/address/commons/core/Messages.java b/src/main/java/seedu/revision/commons/core/Messages.java similarity index 92% rename from src/main/java/seedu/address/commons/core/Messages.java rename to src/main/java/seedu/revision/commons/core/Messages.java index 579c1012244..f547bce83fe 100644 --- a/src/main/java/seedu/address/commons/core/Messages.java +++ b/src/main/java/seedu/revision/commons/core/Messages.java @@ -1,4 +1,4 @@ -package seedu.address.commons.core; +package seedu.revision.commons.core; /** * Container for user visible messages. diff --git a/src/main/java/seedu/address/commons/core/Version.java b/src/main/java/seedu/revision/commons/core/Version.java similarity index 98% rename from src/main/java/seedu/address/commons/core/Version.java rename to src/main/java/seedu/revision/commons/core/Version.java index e117f91b3b2..fc8ab88d13a 100644 --- a/src/main/java/seedu/address/commons/core/Version.java +++ b/src/main/java/seedu/revision/commons/core/Version.java @@ -1,4 +1,4 @@ -package seedu.address.commons.core; +package seedu.revision.commons.core; import java.util.regex.Matcher; import java.util.regex.Pattern; diff --git a/src/main/java/seedu/address/commons/core/index/Index.java b/src/main/java/seedu/revision/commons/core/index/Index.java similarity index 97% rename from src/main/java/seedu/address/commons/core/index/Index.java rename to src/main/java/seedu/revision/commons/core/index/Index.java index 19536439c09..061a2525bae 100644 --- a/src/main/java/seedu/address/commons/core/index/Index.java +++ b/src/main/java/seedu/revision/commons/core/index/Index.java @@ -1,4 +1,4 @@ -package seedu.address.commons.core.index; +package seedu.revision.commons.core.index; /** * Represents a zero-based or one-based index. diff --git a/src/main/java/seedu/address/commons/exceptions/DataConversionException.java b/src/main/java/seedu/revision/commons/exceptions/DataConversionException.java similarity index 84% rename from src/main/java/seedu/address/commons/exceptions/DataConversionException.java rename to src/main/java/seedu/revision/commons/exceptions/DataConversionException.java index 1f689bd8e3f..4512bff69b6 100644 --- a/src/main/java/seedu/address/commons/exceptions/DataConversionException.java +++ b/src/main/java/seedu/revision/commons/exceptions/DataConversionException.java @@ -1,4 +1,4 @@ -package seedu.address.commons.exceptions; +package seedu.revision.commons.exceptions; /** * Represents an error during conversion of data from one format to another diff --git a/src/main/java/seedu/address/commons/exceptions/IllegalValueException.java b/src/main/java/seedu/revision/commons/exceptions/IllegalValueException.java similarity index 92% rename from src/main/java/seedu/address/commons/exceptions/IllegalValueException.java rename to src/main/java/seedu/revision/commons/exceptions/IllegalValueException.java index 19124db485c..a4a96438c55 100644 --- a/src/main/java/seedu/address/commons/exceptions/IllegalValueException.java +++ b/src/main/java/seedu/revision/commons/exceptions/IllegalValueException.java @@ -1,4 +1,4 @@ -package seedu.address.commons.exceptions; +package seedu.revision.commons.exceptions; /** * Signals that some given data does not fulfill some constraints. diff --git a/src/main/java/seedu/address/commons/util/AppUtil.java b/src/main/java/seedu/revision/commons/util/AppUtil.java similarity index 93% rename from src/main/java/seedu/address/commons/util/AppUtil.java rename to src/main/java/seedu/revision/commons/util/AppUtil.java index da90201dfd6..acad09ce6d1 100644 --- a/src/main/java/seedu/address/commons/util/AppUtil.java +++ b/src/main/java/seedu/revision/commons/util/AppUtil.java @@ -1,9 +1,9 @@ -package seedu.address.commons.util; +package seedu.revision.commons.util; import static java.util.Objects.requireNonNull; import javafx.scene.image.Image; -import seedu.address.MainApp; +import seedu.revision.MainApp; /** * A container for App specific utility functions diff --git a/src/main/java/seedu/address/commons/util/CollectionUtil.java b/src/main/java/seedu/revision/commons/util/CollectionUtil.java similarity index 96% rename from src/main/java/seedu/address/commons/util/CollectionUtil.java rename to src/main/java/seedu/revision/commons/util/CollectionUtil.java index eafe4dfd681..2f2afed9fe5 100644 --- a/src/main/java/seedu/address/commons/util/CollectionUtil.java +++ b/src/main/java/seedu/revision/commons/util/CollectionUtil.java @@ -1,4 +1,4 @@ -package seedu.address.commons.util; +package seedu.revision.commons.util; import static java.util.Objects.requireNonNull; diff --git a/src/main/java/seedu/address/commons/util/ConfigUtil.java b/src/main/java/seedu/revision/commons/util/ConfigUtil.java similarity index 77% rename from src/main/java/seedu/address/commons/util/ConfigUtil.java rename to src/main/java/seedu/revision/commons/util/ConfigUtil.java index f7f8a2bd44c..05b073ed2d5 100644 --- a/src/main/java/seedu/address/commons/util/ConfigUtil.java +++ b/src/main/java/seedu/revision/commons/util/ConfigUtil.java @@ -1,11 +1,11 @@ -package seedu.address.commons.util; +package seedu.revision.commons.util; import java.io.IOException; import java.nio.file.Path; import java.util.Optional; -import seedu.address.commons.core.Config; -import seedu.address.commons.exceptions.DataConversionException; +import seedu.revision.commons.core.Config; +import seedu.revision.commons.exceptions.DataConversionException; /** * A class for accessing the Config File. diff --git a/src/main/java/seedu/address/commons/util/FileUtil.java b/src/main/java/seedu/revision/commons/util/FileUtil.java similarity index 98% rename from src/main/java/seedu/address/commons/util/FileUtil.java rename to src/main/java/seedu/revision/commons/util/FileUtil.java index b1e2767cdd9..58d20eb8279 100644 --- a/src/main/java/seedu/address/commons/util/FileUtil.java +++ b/src/main/java/seedu/revision/commons/util/FileUtil.java @@ -1,4 +1,4 @@ -package seedu.address.commons.util; +package seedu.revision.commons.util; import java.io.IOException; import java.nio.file.Files; diff --git a/src/main/java/seedu/address/commons/util/JsonUtil.java b/src/main/java/seedu/revision/commons/util/JsonUtil.java similarity index 97% rename from src/main/java/seedu/address/commons/util/JsonUtil.java rename to src/main/java/seedu/revision/commons/util/JsonUtil.java index 8ef609f055d..05e52cf0925 100644 --- a/src/main/java/seedu/address/commons/util/JsonUtil.java +++ b/src/main/java/seedu/revision/commons/util/JsonUtil.java @@ -1,4 +1,4 @@ -package seedu.address.commons.util; +package seedu.revision.commons.util; import static java.util.Objects.requireNonNull; @@ -20,8 +20,8 @@ import com.fasterxml.jackson.databind.module.SimpleModule; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; -import seedu.address.commons.core.LogsCenter; -import seedu.address.commons.exceptions.DataConversionException; +import seedu.revision.commons.core.LogsCenter; +import seedu.revision.commons.exceptions.DataConversionException; /** * Converts a Java object instance to JSON and vice versa diff --git a/src/main/java/seedu/address/commons/util/StringUtil.java b/src/main/java/seedu/revision/commons/util/StringUtil.java similarity index 95% rename from src/main/java/seedu/address/commons/util/StringUtil.java rename to src/main/java/seedu/revision/commons/util/StringUtil.java index 61cc8c9a1cb..2c093edb28a 100644 --- a/src/main/java/seedu/address/commons/util/StringUtil.java +++ b/src/main/java/seedu/revision/commons/util/StringUtil.java @@ -1,7 +1,7 @@ -package seedu.address.commons.util; +package seedu.revision.commons.util; import static java.util.Objects.requireNonNull; -import static seedu.address.commons.util.AppUtil.checkArgument; +import static seedu.revision.commons.util.AppUtil.checkArgument; import java.io.PrintWriter; import java.io.StringWriter; diff --git a/src/main/java/seedu/address/logic/Logic.java b/src/main/java/seedu/revision/logic/Logic.java similarity index 68% rename from src/main/java/seedu/address/logic/Logic.java rename to src/main/java/seedu/revision/logic/Logic.java index 72bc97a68bd..5c324770666 100644 --- a/src/main/java/seedu/address/logic/Logic.java +++ b/src/main/java/seedu/revision/logic/Logic.java @@ -1,14 +1,14 @@ -package seedu.address.logic; +package seedu.revision.logic; import java.nio.file.Path; import javafx.collections.ObservableList; -import seedu.address.commons.core.GuiSettings; -import seedu.address.logic.commands.CommandResult; -import seedu.address.logic.commands.exceptions.CommandException; -import seedu.address.logic.parser.exceptions.ParseException; -import seedu.address.model.ReadOnlyAddressBook; -import seedu.address.model.answerable.Answerable; +import seedu.revision.commons.core.GuiSettings; +import seedu.revision.logic.commands.CommandResult; +import seedu.revision.logic.commands.exceptions.CommandException; +import seedu.revision.logic.parser.exceptions.ParseException; +import seedu.revision.model.ReadOnlyAddressBook; +import seedu.revision.model.answerable.Answerable; /** * API of the Logic component @@ -26,7 +26,7 @@ public interface Logic { /** * Returns the AddressBook. * - * @see seedu.address.model.Model#getAddressBook() + * @see seedu.revision.model.Model#getAddressBook() */ ReadOnlyAddressBook getAddressBook(); @@ -34,7 +34,7 @@ public interface Logic { ObservableList getFilteredAnswerableList(); /** - * Returns the user prefs' address book file path. + * Returns the user prefs' revision tool file path. */ Path getAddressBookFilePath(); diff --git a/src/main/java/seedu/address/logic/LogicManager.java b/src/main/java/seedu/revision/logic/LogicManager.java similarity index 78% rename from src/main/java/seedu/address/logic/LogicManager.java rename to src/main/java/seedu/revision/logic/LogicManager.java index 085331ab253..bef2bddae6d 100644 --- a/src/main/java/seedu/address/logic/LogicManager.java +++ b/src/main/java/seedu/revision/logic/LogicManager.java @@ -1,21 +1,21 @@ -package seedu.address.logic; +package seedu.revision.logic; import java.io.IOException; import java.nio.file.Path; import java.util.logging.Logger; import javafx.collections.ObservableList; -import seedu.address.commons.core.GuiSettings; -import seedu.address.commons.core.LogsCenter; -import seedu.address.logic.commands.Command; -import seedu.address.logic.commands.CommandResult; -import seedu.address.logic.commands.exceptions.CommandException; -import seedu.address.logic.parser.AddressBookParser; -import seedu.address.logic.parser.exceptions.ParseException; -import seedu.address.model.Model; -import seedu.address.model.ReadOnlyAddressBook; -import seedu.address.model.answerable.Answerable; -import seedu.address.storage.Storage; +import seedu.revision.commons.core.GuiSettings; +import seedu.revision.commons.core.LogsCenter; +import seedu.revision.logic.commands.Command; +import seedu.revision.logic.commands.CommandResult; +import seedu.revision.logic.commands.exceptions.CommandException; +import seedu.revision.logic.parser.AddressBookParser; +import seedu.revision.logic.parser.exceptions.ParseException; +import seedu.revision.model.Model; +import seedu.revision.model.ReadOnlyAddressBook; +import seedu.revision.model.answerable.Answerable; +import seedu.revision.storage.Storage; /** * The main LogicManager of the app. diff --git a/src/main/java/seedu/address/logic/commands/AddCommand.java b/src/main/java/seedu/revision/logic/commands/AddCommand.java similarity index 79% rename from src/main/java/seedu/address/logic/commands/AddCommand.java rename to src/main/java/seedu/revision/logic/commands/AddCommand.java index b4c4ee15a39..9612a15355d 100644 --- a/src/main/java/seedu/address/logic/commands/AddCommand.java +++ b/src/main/java/seedu/revision/logic/commands/AddCommand.java @@ -1,16 +1,16 @@ -package seedu.address.logic.commands; +package seedu.revision.logic.commands; import static java.util.Objects.requireNonNull; -import static seedu.address.logic.parser.CliSyntax.PREFIX_CATEGORY; -import static seedu.address.logic.parser.CliSyntax.PREFIX_QUESTION; -import static seedu.address.logic.parser.CliSyntax.PREFIX_DIFFICULTY; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_CATEGORY; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_QUESTION; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_DIFFICULTY; -import seedu.address.logic.commands.exceptions.CommandException; -import seedu.address.model.Model; -import seedu.address.model.answerable.Answerable; +import seedu.revision.logic.commands.exceptions.CommandException; +import seedu.revision.model.Model; +import seedu.revision.model.answerable.Answerable; /** - * Adds a answerable to the address book. + * Adds a answerable to the revision tool. */ public class AddCommand extends Command { diff --git a/src/main/java/seedu/address/logic/commands/ClearCommand.java b/src/main/java/seedu/revision/logic/commands/ClearCommand.java similarity index 75% rename from src/main/java/seedu/address/logic/commands/ClearCommand.java rename to src/main/java/seedu/revision/logic/commands/ClearCommand.java index 8d9091f93fa..a3ebd5bc813 100644 --- a/src/main/java/seedu/address/logic/commands/ClearCommand.java +++ b/src/main/java/seedu/revision/logic/commands/ClearCommand.java @@ -1,12 +1,12 @@ -package seedu.address.logic.commands; +package seedu.revision.logic.commands; import static java.util.Objects.requireNonNull; -import seedu.address.model.AddressBook; -import seedu.address.model.Model; +import seedu.revision.model.AddressBook; +import seedu.revision.model.Model; /** - * Clears the address book. + * Clears the revision tool. */ public class ClearCommand extends Command { diff --git a/src/main/java/seedu/address/logic/commands/Command.java b/src/main/java/seedu/revision/logic/commands/Command.java similarity index 78% rename from src/main/java/seedu/address/logic/commands/Command.java rename to src/main/java/seedu/revision/logic/commands/Command.java index 64f18992160..c1e729f280a 100644 --- a/src/main/java/seedu/address/logic/commands/Command.java +++ b/src/main/java/seedu/revision/logic/commands/Command.java @@ -1,7 +1,7 @@ -package seedu.address.logic.commands; +package seedu.revision.logic.commands; -import seedu.address.logic.commands.exceptions.CommandException; -import seedu.address.model.Model; +import seedu.revision.logic.commands.exceptions.CommandException; +import seedu.revision.model.Model; /** * Represents a command with hidden internal logic and the ability to be executed. diff --git a/src/main/java/seedu/address/logic/commands/CommandResult.java b/src/main/java/seedu/revision/logic/commands/CommandResult.java similarity index 97% rename from src/main/java/seedu/address/logic/commands/CommandResult.java rename to src/main/java/seedu/revision/logic/commands/CommandResult.java index 92f900b7916..3aeed7cc489 100644 --- a/src/main/java/seedu/address/logic/commands/CommandResult.java +++ b/src/main/java/seedu/revision/logic/commands/CommandResult.java @@ -1,4 +1,4 @@ -package seedu.address.logic.commands; +package seedu.revision.logic.commands; import static java.util.Objects.requireNonNull; diff --git a/src/main/java/seedu/revision/logic/commands/DeleteCommand.java b/src/main/java/seedu/revision/logic/commands/DeleteCommand.java new file mode 100644 index 00000000000..96697a09d6a --- /dev/null +++ b/src/main/java/seedu/revision/logic/commands/DeleteCommand.java @@ -0,0 +1,65 @@ +package seedu.revision.logic.commands; + +import static java.util.Objects.requireNonNull; + +import java.util.ArrayList; +import java.util.List; + +import seedu.revision.commons.core.Messages; +import seedu.revision.commons.core.index.Index; +import seedu.revision.logic.commands.exceptions.CommandException; +import seedu.revision.model.Model; +import seedu.revision.model.answerable.Answerable; + +/** + * Deletes one or more answerables identified using it's displayed index from the revision tool. + */ +public class DeleteCommand extends Command { + + public static final String COMMAND_WORD = "delete"; + + public static final String MESSAGE_USAGE = COMMAND_WORD + + ": Deletes one or more questions identified by the index number used in the displayed question list.\n" + + "Parameters: INDEX (must be a positive integer)\n" + + "Example: " + COMMAND_WORD + " 1 2 3"; + + public static final String MESSAGE_DELETE_ANSWERABLE_SUCCESS = "Deleted Questions: %s"; + + private ArrayList targetIndexList = new ArrayList<>(); + + public DeleteCommand(ArrayList targetIndexList) { + for (Index targetIndex : targetIndexList) { + this.targetIndexList.add(targetIndex); + } + } + + @Override + public CommandResult execute(Model model) throws CommandException { + requireNonNull(model); + List lastShownList = model.getFilteredAnswerableList(); + ArrayList toBeDeleted = new ArrayList<>(); + + for (Index targetIndex : targetIndexList) { + if (targetIndex.getZeroBased() >= lastShownList.size()) { + throw new CommandException(Messages.MESSAGE_INVALID_ANSWERABLE_DISPLAYED_INDEX); + } + } + + for (Index targetIndex : targetIndexList) { + Answerable answerableToDelete = lastShownList.get(targetIndex.getZeroBased()); + toBeDeleted.add(answerableToDelete); + } + + for (Answerable answerableToDelete : toBeDeleted) { + model.deleteAnswerable(answerableToDelete); + } + return new CommandResult(String.format(MESSAGE_DELETE_ANSWERABLE_SUCCESS, toBeDeleted.toString())); + } + + @Override + public boolean equals(Object other) { + return other == this // short circuit if same object + || (other instanceof DeleteCommand); // instanceof handles nulls + // && targetIndex.equals(((DeleteCommand) other).targetIndex)); // state check + } +} \ No newline at end of file diff --git a/src/main/java/seedu/address/logic/commands/EditCommand.java b/src/main/java/seedu/revision/logic/commands/EditCommand.java similarity index 90% rename from src/main/java/seedu/address/logic/commands/EditCommand.java rename to src/main/java/seedu/revision/logic/commands/EditCommand.java index cff1c376ca5..ef356368ccb 100644 --- a/src/main/java/seedu/address/logic/commands/EditCommand.java +++ b/src/main/java/seedu/revision/logic/commands/EditCommand.java @@ -1,10 +1,10 @@ -package seedu.address.logic.commands; +package seedu.revision.logic.commands; import static java.util.Objects.requireNonNull; -import static seedu.address.logic.parser.CliSyntax.PREFIX_CATEGORY; -import static seedu.address.logic.parser.CliSyntax.PREFIX_QUESTION; -import static seedu.address.logic.parser.CliSyntax.PREFIX_DIFFICULTY; -import static seedu.address.model.Model.PREDICATE_SHOW_ALL_ANSWERABLE; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_CATEGORY; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_QUESTION; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_DIFFICULTY; +import static seedu.revision.model.Model.PREDICATE_SHOW_ALL_ANSWERABLE; import java.util.Collections; import java.util.HashSet; @@ -12,17 +12,17 @@ import java.util.Optional; import java.util.Set; -import seedu.address.commons.core.Messages; -import seedu.address.commons.core.index.Index; -import seedu.address.commons.util.CollectionUtil; -import seedu.address.logic.commands.exceptions.CommandException; -import seedu.address.model.Model; -import seedu.address.model.answerable.Answer; -import seedu.address.model.answerable.Answerable; -import seedu.address.model.answerable.Difficulty; -import seedu.address.model.answerable.Mcq; -import seedu.address.model.answerable.Question; -import seedu.address.model.category.Category; +import seedu.revision.commons.core.Messages; +import seedu.revision.commons.core.index.Index; +import seedu.revision.commons.util.CollectionUtil; +import seedu.revision.logic.commands.exceptions.CommandException; +import seedu.revision.model.Model; +import seedu.revision.model.answerable.Answer; +import seedu.revision.model.answerable.Answerable; +import seedu.revision.model.answerable.Difficulty; +import seedu.revision.model.answerable.Mcq; +import seedu.revision.model.answerable.Question; +import seedu.revision.model.category.Category; /** * Edits the details of an existing answerable in the test bank. diff --git a/src/main/java/seedu/address/logic/commands/ExitCommand.java b/src/main/java/seedu/revision/logic/commands/ExitCommand.java similarity index 83% rename from src/main/java/seedu/address/logic/commands/ExitCommand.java rename to src/main/java/seedu/revision/logic/commands/ExitCommand.java index 03b914916da..9338ed68d2c 100644 --- a/src/main/java/seedu/address/logic/commands/ExitCommand.java +++ b/src/main/java/seedu/revision/logic/commands/ExitCommand.java @@ -1,6 +1,6 @@ -package seedu.address.logic.commands; +package seedu.revision.logic.commands; -import seedu.address.model.Model; +import seedu.revision.model.Model; /** * Terminates the program. diff --git a/src/main/java/seedu/address/logic/commands/FindCommand.java b/src/main/java/seedu/revision/logic/commands/FindCommand.java similarity index 87% rename from src/main/java/seedu/address/logic/commands/FindCommand.java rename to src/main/java/seedu/revision/logic/commands/FindCommand.java index d737bb60151..259da3cd1fb 100644 --- a/src/main/java/seedu/address/logic/commands/FindCommand.java +++ b/src/main/java/seedu/revision/logic/commands/FindCommand.java @@ -1,10 +1,10 @@ -package seedu.address.logic.commands; +package seedu.revision.logic.commands; import static java.util.Objects.requireNonNull; -import seedu.address.commons.core.Messages; -import seedu.address.model.Model; -import seedu.address.model.answerable.predicates.QuestionContainsKeywordsPredicate; +import seedu.revision.commons.core.Messages; +import seedu.revision.model.Model; +import seedu.revision.model.answerable.predicates.QuestionContainsKeywordsPredicate; /** * Finds and lists all answerables in test bank whose name contains any of the argument keywords. diff --git a/src/main/java/seedu/address/logic/commands/HelpCommand.java b/src/main/java/seedu/revision/logic/commands/HelpCommand.java similarity index 87% rename from src/main/java/seedu/address/logic/commands/HelpCommand.java rename to src/main/java/seedu/revision/logic/commands/HelpCommand.java index bf824f91bd0..23de3b7970e 100644 --- a/src/main/java/seedu/address/logic/commands/HelpCommand.java +++ b/src/main/java/seedu/revision/logic/commands/HelpCommand.java @@ -1,6 +1,6 @@ -package seedu.address.logic.commands; +package seedu.revision.logic.commands; -import seedu.address.model.Model; +import seedu.revision.model.Model; /** * Format full help instructions for every command for display. diff --git a/src/main/java/seedu/address/logic/commands/ListCommand.java b/src/main/java/seedu/revision/logic/commands/ListCommand.java similarity index 79% rename from src/main/java/seedu/address/logic/commands/ListCommand.java rename to src/main/java/seedu/revision/logic/commands/ListCommand.java index e3a3b75553e..e3b770a0320 100644 --- a/src/main/java/seedu/address/logic/commands/ListCommand.java +++ b/src/main/java/seedu/revision/logic/commands/ListCommand.java @@ -1,23 +1,23 @@ -package seedu.address.logic.commands; +package seedu.revision.logic.commands; import static java.util.Objects.requireNonNull; -import static seedu.address.model.Model.PREDICATE_SHOW_ALL_ANSWERABLE; +import static seedu.revision.model.Model.PREDICATE_SHOW_ALL_ANSWERABLE; -import static seedu.address.logic.parser.CliSyntax.PREFIX_CATEGORY; -import static seedu.address.logic.parser.CliSyntax.PREFIX_DIFFICULTY; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_CATEGORY; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_DIFFICULTY; import java.util.ArrayList; import java.util.List; import java.util.function.Predicate; -import seedu.address.commons.core.Messages; -import seedu.address.model.Model; -import seedu.address.model.answerable.Answerable; -import seedu.address.model.answerable.predicates.CategoryPredicate; -import seedu.address.model.answerable.predicates.DifficultyPredicate; +import seedu.revision.commons.core.Messages; +import seedu.revision.model.Model; +import seedu.revision.model.answerable.Answerable; +import seedu.revision.model.answerable.predicates.CategoryPredicate; +import seedu.revision.model.answerable.predicates.DifficultyPredicate; /** - * Lists all answerables in the address book to the user. + * Lists all answerables in the revision tool to the user. */ public class ListCommand extends Command { diff --git a/src/main/java/seedu/address/logic/commands/exceptions/CommandException.java b/src/main/java/seedu/revision/logic/commands/exceptions/CommandException.java similarity index 89% rename from src/main/java/seedu/address/logic/commands/exceptions/CommandException.java rename to src/main/java/seedu/revision/logic/commands/exceptions/CommandException.java index a16bd14f2cd..f0839a69dae 100644 --- a/src/main/java/seedu/address/logic/commands/exceptions/CommandException.java +++ b/src/main/java/seedu/revision/logic/commands/exceptions/CommandException.java @@ -1,4 +1,4 @@ -package seedu.address.logic.commands.exceptions; +package seedu.revision.logic.commands.exceptions; /** * Represents an error which occurs during execution of a {@link Command}. diff --git a/src/main/java/seedu/address/logic/parser/AddCommandParser.java b/src/main/java/seedu/revision/logic/parser/AddCommandParser.java similarity index 73% rename from src/main/java/seedu/address/logic/parser/AddCommandParser.java rename to src/main/java/seedu/revision/logic/parser/AddCommandParser.java index 5d822a475b6..905e9a2c7e3 100644 --- a/src/main/java/seedu/address/logic/parser/AddCommandParser.java +++ b/src/main/java/seedu/revision/logic/parser/AddCommandParser.java @@ -1,24 +1,24 @@ -package seedu.address.logic.parser; +package seedu.revision.logic.parser; -import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; -import static seedu.address.logic.parser.CliSyntax.PREFIX_CATEGORY; -import static seedu.address.logic.parser.CliSyntax.PREFIX_CORRECT; -import static seedu.address.logic.parser.CliSyntax.PREFIX_QUESTION; -import static seedu.address.logic.parser.CliSyntax.PREFIX_QUESTION_TYPE; -import static seedu.address.logic.parser.CliSyntax.PREFIX_DIFFICULTY; -import static seedu.address.logic.parser.CliSyntax.PREFIX_WRONG; +import static seedu.revision.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_CATEGORY; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_CORRECT; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_QUESTION; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_QUESTION_TYPE; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_DIFFICULTY; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_WRONG; import java.util.Set; import java.util.stream.Stream; -import seedu.address.logic.commands.AddCommand; -import seedu.address.logic.parser.exceptions.ParseException; -import seedu.address.model.answerable.Answer; -import seedu.address.model.answerable.Answerable; -import seedu.address.model.answerable.Difficulty; -import seedu.address.model.answerable.Mcq; -import seedu.address.model.answerable.Question; -import seedu.address.model.category.Category; +import seedu.revision.logic.commands.AddCommand; +import seedu.revision.logic.parser.exceptions.ParseException; +import seedu.revision.model.answerable.Answer; +import seedu.revision.model.answerable.Answerable; +import seedu.revision.model.answerable.Difficulty; +import seedu.revision.model.answerable.Mcq; +import seedu.revision.model.answerable.Question; +import seedu.revision.model.category.Category; /** * Parses input arguments and creates a new AddCommand object diff --git a/src/main/java/seedu/address/logic/parser/AddressBookParser.java b/src/main/java/seedu/revision/logic/parser/AddressBookParser.java similarity index 72% rename from src/main/java/seedu/address/logic/parser/AddressBookParser.java rename to src/main/java/seedu/revision/logic/parser/AddressBookParser.java index 94da721d96c..d1265206ca9 100644 --- a/src/main/java/seedu/address/logic/parser/AddressBookParser.java +++ b/src/main/java/seedu/revision/logic/parser/AddressBookParser.java @@ -1,21 +1,21 @@ -package seedu.address.logic.parser; +package seedu.revision.logic.parser; -import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; -import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND; +import static seedu.revision.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.revision.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND; import java.util.regex.Matcher; import java.util.regex.Pattern; -import seedu.address.logic.commands.AddCommand; -import seedu.address.logic.commands.ClearCommand; -import seedu.address.logic.commands.Command; -import seedu.address.logic.commands.DeleteCommand; -import seedu.address.logic.commands.EditCommand; -import seedu.address.logic.commands.ExitCommand; -import seedu.address.logic.commands.FindCommand; -import seedu.address.logic.commands.HelpCommand; -import seedu.address.logic.commands.ListCommand; -import seedu.address.logic.parser.exceptions.ParseException; +import seedu.revision.logic.commands.AddCommand; +import seedu.revision.logic.commands.ClearCommand; +import seedu.revision.logic.commands.Command; +import seedu.revision.logic.commands.DeleteCommand; +import seedu.revision.logic.commands.EditCommand; +import seedu.revision.logic.commands.ExitCommand; +import seedu.revision.logic.commands.FindCommand; +import seedu.revision.logic.commands.HelpCommand; +import seedu.revision.logic.commands.ListCommand; +import seedu.revision.logic.parser.exceptions.ParseException; /** * Parses user input. diff --git a/src/main/java/seedu/address/logic/parser/ArgumentMultimap.java b/src/main/java/seedu/revision/logic/parser/ArgumentMultimap.java similarity index 98% rename from src/main/java/seedu/address/logic/parser/ArgumentMultimap.java rename to src/main/java/seedu/revision/logic/parser/ArgumentMultimap.java index 954c8e18f8e..1a4261a547d 100644 --- a/src/main/java/seedu/address/logic/parser/ArgumentMultimap.java +++ b/src/main/java/seedu/revision/logic/parser/ArgumentMultimap.java @@ -1,4 +1,4 @@ -package seedu.address.logic.parser; +package seedu.revision.logic.parser; import java.util.ArrayList; import java.util.HashMap; diff --git a/src/main/java/seedu/address/logic/parser/ArgumentTokenizer.java b/src/main/java/seedu/revision/logic/parser/ArgumentTokenizer.java similarity index 99% rename from src/main/java/seedu/address/logic/parser/ArgumentTokenizer.java rename to src/main/java/seedu/revision/logic/parser/ArgumentTokenizer.java index 5c9aebfa488..a2f08e0e846 100644 --- a/src/main/java/seedu/address/logic/parser/ArgumentTokenizer.java +++ b/src/main/java/seedu/revision/logic/parser/ArgumentTokenizer.java @@ -1,4 +1,4 @@ -package seedu.address.logic.parser; +package seedu.revision.logic.parser; import java.util.ArrayList; import java.util.Arrays; diff --git a/src/main/java/seedu/address/logic/parser/CliSyntax.java b/src/main/java/seedu/revision/logic/parser/CliSyntax.java similarity index 93% rename from src/main/java/seedu/address/logic/parser/CliSyntax.java rename to src/main/java/seedu/revision/logic/parser/CliSyntax.java index 23884535fcc..571b637f0c3 100644 --- a/src/main/java/seedu/address/logic/parser/CliSyntax.java +++ b/src/main/java/seedu/revision/logic/parser/CliSyntax.java @@ -1,4 +1,4 @@ -package seedu.address.logic.parser; +package seedu.revision.logic.parser; /** * Contains Command Line Interface (CLI) syntax definitions common to multiple commands diff --git a/src/main/java/seedu/address/logic/parser/DeleteCommandParser.java b/src/main/java/seedu/revision/logic/parser/DeleteCommandParser.java similarity index 73% rename from src/main/java/seedu/address/logic/parser/DeleteCommandParser.java rename to src/main/java/seedu/revision/logic/parser/DeleteCommandParser.java index 522b93081cc..d81f3e151de 100644 --- a/src/main/java/seedu/address/logic/parser/DeleteCommandParser.java +++ b/src/main/java/seedu/revision/logic/parser/DeleteCommandParser.java @@ -1,10 +1,10 @@ -package seedu.address.logic.parser; +package seedu.revision.logic.parser; -import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.revision.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; -import seedu.address.commons.core.index.Index; -import seedu.address.logic.commands.DeleteCommand; -import seedu.address.logic.parser.exceptions.ParseException; +import seedu.revision.commons.core.index.Index; +import seedu.revision.logic.commands.DeleteCommand; +import seedu.revision.logic.parser.exceptions.ParseException; /** * Parses input arguments and creates a new DeleteCommand object diff --git a/src/main/java/seedu/address/logic/parser/EditCommandParser.java b/src/main/java/seedu/revision/logic/parser/EditCommandParser.java similarity index 79% rename from src/main/java/seedu/address/logic/parser/EditCommandParser.java rename to src/main/java/seedu/revision/logic/parser/EditCommandParser.java index 517f1b5e671..a780e00f7ca 100644 --- a/src/main/java/seedu/address/logic/parser/EditCommandParser.java +++ b/src/main/java/seedu/revision/logic/parser/EditCommandParser.java @@ -1,23 +1,22 @@ -package seedu.address.logic.parser; +package seedu.revision.logic.parser; import static java.util.Objects.requireNonNull; -import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; -import static seedu.address.logic.parser.CliSyntax.PREFIX_CATEGORY; -import static seedu.address.logic.parser.CliSyntax.PREFIX_CORRECT; -import static seedu.address.logic.parser.CliSyntax.PREFIX_QUESTION; -import static seedu.address.logic.parser.CliSyntax.PREFIX_DIFFICULTY; -import static seedu.address.logic.parser.CliSyntax.PREFIX_QUESTION_TYPE; -import static seedu.address.logic.parser.CliSyntax.PREFIX_WRONG; +import static seedu.revision.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_CATEGORY; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_CORRECT; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_QUESTION; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_DIFFICULTY; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_QUESTION_TYPE; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_WRONG; import java.util.Collection; -import java.util.Collections; import java.util.Optional; import java.util.Set; -import seedu.address.commons.core.index.Index; -import seedu.address.logic.commands.EditCommand; -import seedu.address.logic.parser.exceptions.ParseException; -import seedu.address.model.category.Category; +import seedu.revision.commons.core.index.Index; +import seedu.revision.logic.commands.EditCommand; +import seedu.revision.logic.parser.exceptions.ParseException; +import seedu.revision.model.category.Category; /** * Parses input arguments and creates a new EditCommand object diff --git a/src/main/java/seedu/address/logic/parser/FindCommandParser.java b/src/main/java/seedu/revision/logic/parser/FindCommandParser.java similarity index 73% rename from src/main/java/seedu/address/logic/parser/FindCommandParser.java rename to src/main/java/seedu/revision/logic/parser/FindCommandParser.java index 2dc514ee56d..64692ba0f10 100644 --- a/src/main/java/seedu/address/logic/parser/FindCommandParser.java +++ b/src/main/java/seedu/revision/logic/parser/FindCommandParser.java @@ -1,12 +1,12 @@ -package seedu.address.logic.parser; +package seedu.revision.logic.parser; -import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.revision.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; import java.util.Arrays; -import seedu.address.logic.commands.FindCommand; -import seedu.address.logic.parser.exceptions.ParseException; -import seedu.address.model.answerable.predicates.QuestionContainsKeywordsPredicate; +import seedu.revision.logic.commands.FindCommand; +import seedu.revision.logic.parser.exceptions.ParseException; +import seedu.revision.model.answerable.predicates.QuestionContainsKeywordsPredicate; /** * Parses input arguments and creates a new FindCommand object diff --git a/src/main/java/seedu/address/logic/parser/ListCommandParser.java b/src/main/java/seedu/revision/logic/parser/ListCommandParser.java similarity index 63% rename from src/main/java/seedu/address/logic/parser/ListCommandParser.java rename to src/main/java/seedu/revision/logic/parser/ListCommandParser.java index 8d74915ad58..94556326c0b 100644 --- a/src/main/java/seedu/address/logic/parser/ListCommandParser.java +++ b/src/main/java/seedu/revision/logic/parser/ListCommandParser.java @@ -1,15 +1,15 @@ -package seedu.address.logic.parser; - -import static seedu.address.logic.parser.CliSyntax.PREFIX_CATEGORY; -import static seedu.address.logic.parser.CliSyntax.PREFIX_DIFFICULTY; - -import seedu.address.logic.commands.Command; -import seedu.address.logic.commands.ListCommand; -import seedu.address.logic.parser.exceptions.ParseException; -import seedu.address.model.category.Category; -import seedu.address.model.answerable.Difficulty; -import seedu.address.model.answerable.predicates.CategoryPredicate; -import seedu.address.model.answerable.predicates.DifficultyPredicate; +package seedu.revision.logic.parser; + +import static seedu.revision.logic.parser.CliSyntax.PREFIX_CATEGORY; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_DIFFICULTY; + +import seedu.revision.logic.commands.Command; +import seedu.revision.logic.commands.ListCommand; +import seedu.revision.logic.parser.exceptions.ParseException; +import seedu.revision.model.category.Category; +import seedu.revision.model.answerable.Difficulty; +import seedu.revision.model.answerable.predicates.CategoryPredicate; +import seedu.revision.model.answerable.predicates.DifficultyPredicate; public class ListCommandParser implements Parser { @Override diff --git a/src/main/java/seedu/address/logic/parser/Parser.java b/src/main/java/seedu/revision/logic/parser/Parser.java similarity index 72% rename from src/main/java/seedu/address/logic/parser/Parser.java rename to src/main/java/seedu/revision/logic/parser/Parser.java index d6551ad8e3f..2853e687d72 100644 --- a/src/main/java/seedu/address/logic/parser/Parser.java +++ b/src/main/java/seedu/revision/logic/parser/Parser.java @@ -1,7 +1,7 @@ -package seedu.address.logic.parser; +package seedu.revision.logic.parser; -import seedu.address.logic.commands.Command; -import seedu.address.logic.parser.exceptions.ParseException; +import seedu.revision.logic.commands.Command; +import seedu.revision.logic.parser.exceptions.ParseException; /** * Represents a Parser that is able to parse user input into a {@code Command} of type {@code T}. diff --git a/src/main/java/seedu/address/logic/parser/ParserUtil.java b/src/main/java/seedu/revision/logic/parser/ParserUtil.java similarity index 92% rename from src/main/java/seedu/address/logic/parser/ParserUtil.java rename to src/main/java/seedu/revision/logic/parser/ParserUtil.java index 98a023f942e..739a7ee883e 100644 --- a/src/main/java/seedu/address/logic/parser/ParserUtil.java +++ b/src/main/java/seedu/revision/logic/parser/ParserUtil.java @@ -1,4 +1,4 @@ -package seedu.address.logic.parser; +package seedu.revision.logic.parser; import static java.util.Objects.requireNonNull; @@ -6,13 +6,13 @@ import java.util.HashSet; import java.util.Set; -import seedu.address.commons.core.index.Index; -import seedu.address.commons.util.StringUtil; -import seedu.address.logic.parser.exceptions.ParseException; -import seedu.address.model.answerable.Answer; -import seedu.address.model.answerable.Difficulty; -import seedu.address.model.answerable.Question; -import seedu.address.model.category.Category; +import seedu.revision.commons.core.index.Index; +import seedu.revision.commons.util.StringUtil; +import seedu.revision.logic.parser.exceptions.ParseException; +import seedu.revision.model.answerable.Answer; +import seedu.revision.model.answerable.Difficulty; +import seedu.revision.model.answerable.Question; +import seedu.revision.model.category.Category; /** * Contains utility methods used for parsing strings in the various *Parser classes. diff --git a/src/main/java/seedu/address/logic/parser/Prefix.java b/src/main/java/seedu/revision/logic/parser/Prefix.java similarity index 95% rename from src/main/java/seedu/address/logic/parser/Prefix.java rename to src/main/java/seedu/revision/logic/parser/Prefix.java index c859d5fa5db..f87412fd72f 100644 --- a/src/main/java/seedu/address/logic/parser/Prefix.java +++ b/src/main/java/seedu/revision/logic/parser/Prefix.java @@ -1,4 +1,4 @@ -package seedu.address.logic.parser; +package seedu.revision.logic.parser; /** * A prefix that marks the beginning of an argument in an arguments string. diff --git a/src/main/java/seedu/address/logic/parser/QuestionType.java b/src/main/java/seedu/revision/logic/parser/QuestionType.java similarity index 94% rename from src/main/java/seedu/address/logic/parser/QuestionType.java rename to src/main/java/seedu/revision/logic/parser/QuestionType.java index ec44cf863c0..1568810b4d1 100644 --- a/src/main/java/seedu/address/logic/parser/QuestionType.java +++ b/src/main/java/seedu/revision/logic/parser/QuestionType.java @@ -1,7 +1,7 @@ -package seedu.address.logic.parser; +package seedu.revision.logic.parser; import static java.util.Objects.requireNonNull; -import static seedu.address.commons.util.AppUtil.checkArgument; +import static seedu.revision.commons.util.AppUtil.checkArgument; /** * Represents the type of Question diff --git a/src/main/java/seedu/address/logic/parser/exceptions/ParseException.java b/src/main/java/seedu/revision/logic/parser/exceptions/ParseException.java similarity index 72% rename from src/main/java/seedu/address/logic/parser/exceptions/ParseException.java rename to src/main/java/seedu/revision/logic/parser/exceptions/ParseException.java index 158a1a54c1c..7da460b40c3 100644 --- a/src/main/java/seedu/address/logic/parser/exceptions/ParseException.java +++ b/src/main/java/seedu/revision/logic/parser/exceptions/ParseException.java @@ -1,6 +1,6 @@ -package seedu.address.logic.parser.exceptions; +package seedu.revision.logic.parser.exceptions; -import seedu.address.commons.exceptions.IllegalValueException; +import seedu.revision.commons.exceptions.IllegalValueException; /** * Represents a parse error encountered by a parser. diff --git a/src/main/java/seedu/address/model/AddressBook.java b/src/main/java/seedu/revision/model/AddressBook.java similarity index 85% rename from src/main/java/seedu/address/model/AddressBook.java rename to src/main/java/seedu/revision/model/AddressBook.java index 9fac072addf..eeffcdb6372 100644 --- a/src/main/java/seedu/address/model/AddressBook.java +++ b/src/main/java/seedu/revision/model/AddressBook.java @@ -1,15 +1,15 @@ -package seedu.address.model; +package seedu.revision.model; import static java.util.Objects.requireNonNull; import java.util.List; import javafx.collections.ObservableList; -import seedu.address.model.answerable.Answerable; -import seedu.address.model.answerable.UniqueAnswerableList; +import seedu.revision.model.answerable.Answerable; +import seedu.revision.model.answerable.UniqueAnswerableList; /** - * Wraps all data at the address-book level + * Wraps all data at the revision tool level * Duplicates are not allowed (by .isSameAnswerable comparison) */ public class AddressBook implements ReadOnlyAddressBook { @@ -59,7 +59,7 @@ public void resetData(ReadOnlyAddressBook newData) { //// answerable-level operations /** - * Returns true if a answerable with the same identity as {@code answerable} exists in the address book. + * Returns true if a answerable with the same identity as {@code answerable} exists in the revision tool. */ public boolean hasAnswerable(Answerable answerable) { requireNonNull(answerable); @@ -67,8 +67,8 @@ public boolean hasAnswerable(Answerable answerable) { } /** - * Adds a answerable to the address book. - * The answerable must not already exist in the address book. + * Adds a answerable to the revision tool. + * The answerable must not already exist in the revision tool. */ public void addAnswerable(Answerable p) { answerables.add(p); @@ -76,8 +76,8 @@ public void addAnswerable(Answerable p) { /** * Replaces the given answerable {@code target} in the list with {@code editedAnswerable}. - * {@code target} must exist in the address book. - * The answerable identity of {@code editedAnswerable} must not be the same as another existing answerable in the address book. + * {@code target} must exist in the revision tool. + * The answerable identity of {@code editedAnswerable} must not be the same as another existing answerable in the revision tool. */ public void setAnswerable(Answerable target, Answerable editedAnswerable) { requireNonNull(editedAnswerable); @@ -87,7 +87,7 @@ public void setAnswerable(Answerable target, Answerable editedAnswerable) { /** * Removes {@code key} from this {@code AddressBook}. - * {@code key} must exist in the address book. + * {@code key} must exist in the revision tool. */ public void removeAnswerable(Answerable key) { answerables.remove(key); diff --git a/src/main/java/seedu/address/model/Model.java b/src/main/java/seedu/revision/model/Model.java similarity index 76% rename from src/main/java/seedu/address/model/Model.java rename to src/main/java/seedu/revision/model/Model.java index 5d09751b261..2dc8f0d4235 100644 --- a/src/main/java/seedu/address/model/Model.java +++ b/src/main/java/seedu/revision/model/Model.java @@ -1,11 +1,11 @@ -package seedu.address.model; +package seedu.revision.model; import java.nio.file.Path; import java.util.function.Predicate; import javafx.collections.ObservableList; -import seedu.address.commons.core.GuiSettings; -import seedu.address.model.answerable.Answerable; +import seedu.revision.commons.core.GuiSettings; +import seedu.revision.model.answerable.Answerable; /** * The API of the Model component. @@ -35,17 +35,17 @@ public interface Model { void setGuiSettings(GuiSettings guiSettings); /** - * Returns the user prefs' address book file path. + * Returns the user prefs' revision tool file path. */ Path getAddressBookFilePath(); /** - * Sets the user prefs' address book file path. + * Sets the user prefs' revision tool file path. */ void setAddressBookFilePath(Path addressBookFilePath); /** - * Replaces address book data with the data in {@code addressBook}. + * Replaces revision tool data with the data in {@code addressBook}. */ void setAddressBook(ReadOnlyAddressBook addressBook); @@ -53,26 +53,26 @@ public interface Model { ReadOnlyAddressBook getAddressBook(); /** - * Returns true if a answerable with the same identity as {@code answerable} exists in the address book. + * Returns true if a answerable with the same identity as {@code answerable} exists in the revision tool. */ boolean hasAnswerable(Answerable answerable); /** * Deletes the given answerable. - * The answerable must exist in the address book. + * The answerable must exist in the revision tool. */ void deleteAnswerable(Answerable target); /** * Adds the given answerable. - * {@code answerable} must not already exist in the address book. + * {@code answerable} must not already exist in the revision tool. */ void addAnswerable(Answerable answerable); /** * Replaces the given answerable {@code target} with {@code editedAnswerable}. - * {@code target} must exist in the address book. - * The answerable identity of {@code editedAnswerable} must not be the same as another existing answerable in the address book. + * {@code target} must exist in the revision tool. + * The answerable identity of {@code editedAnswerable} must not be the same as another existing answerable in the revision tool. */ void setAnswerable(Answerable target, Answerable editedAnswerable); diff --git a/src/main/java/seedu/address/model/ModelManager.java b/src/main/java/seedu/revision/model/ModelManager.java similarity index 90% rename from src/main/java/seedu/address/model/ModelManager.java rename to src/main/java/seedu/revision/model/ModelManager.java index d2fcb08be73..ce4404c6968 100644 --- a/src/main/java/seedu/address/model/ModelManager.java +++ b/src/main/java/seedu/revision/model/ModelManager.java @@ -1,7 +1,7 @@ -package seedu.address.model; +package seedu.revision.model; import static java.util.Objects.requireNonNull; -import static seedu.address.commons.util.CollectionUtil.requireAllNonNull; +import static seedu.revision.commons.util.CollectionUtil.requireAllNonNull; import java.nio.file.Path; import java.util.function.Predicate; @@ -9,12 +9,12 @@ import javafx.collections.ObservableList; import javafx.collections.transformation.FilteredList; -import seedu.address.commons.core.GuiSettings; -import seedu.address.commons.core.LogsCenter; -import seedu.address.model.answerable.Answerable; +import seedu.revision.commons.core.GuiSettings; +import seedu.revision.commons.core.LogsCenter; +import seedu.revision.model.answerable.Answerable; /** - * Represents the in-memory model of the address book data. + * Represents the in-memory model of the revision tool data. */ public class ModelManager implements Model { private static final Logger logger = LogsCenter.getLogger(ModelManager.class); @@ -30,7 +30,7 @@ public ModelManager(ReadOnlyAddressBook addressBook, ReadOnlyUserPrefs userPrefs super(); requireAllNonNull(addressBook, userPrefs); - logger.fine("Initializing with address book: " + addressBook + " and user prefs " + userPrefs); + logger.fine("Initializing with revision tool: " + addressBook + " and user prefs " + userPrefs); this.addressBook = new AddressBook(addressBook); this.userPrefs = new UserPrefs(userPrefs); diff --git a/src/main/java/seedu/address/model/ReadOnlyAddressBook.java b/src/main/java/seedu/revision/model/ReadOnlyAddressBook.java similarity index 69% rename from src/main/java/seedu/address/model/ReadOnlyAddressBook.java rename to src/main/java/seedu/revision/model/ReadOnlyAddressBook.java index e734fa9ef4b..7b9aefbaac0 100644 --- a/src/main/java/seedu/address/model/ReadOnlyAddressBook.java +++ b/src/main/java/seedu/revision/model/ReadOnlyAddressBook.java @@ -1,10 +1,10 @@ -package seedu.address.model; +package seedu.revision.model; import javafx.collections.ObservableList; -import seedu.address.model.answerable.Answerable; +import seedu.revision.model.answerable.Answerable; /** - * Unmodifiable view of an address book + * Unmodifiable view of an revision tool. */ public interface ReadOnlyAddressBook { diff --git a/src/main/java/seedu/address/model/ReadOnlyUserPrefs.java b/src/main/java/seedu/revision/model/ReadOnlyUserPrefs.java similarity index 70% rename from src/main/java/seedu/address/model/ReadOnlyUserPrefs.java rename to src/main/java/seedu/revision/model/ReadOnlyUserPrefs.java index befd58a4c73..7a970e903b4 100644 --- a/src/main/java/seedu/address/model/ReadOnlyUserPrefs.java +++ b/src/main/java/seedu/revision/model/ReadOnlyUserPrefs.java @@ -1,8 +1,8 @@ -package seedu.address.model; +package seedu.revision.model; import java.nio.file.Path; -import seedu.address.commons.core.GuiSettings; +import seedu.revision.commons.core.GuiSettings; /** * Unmodifiable view of user prefs. diff --git a/src/main/java/seedu/address/model/UserPrefs.java b/src/main/java/seedu/revision/model/UserPrefs.java similarity index 96% rename from src/main/java/seedu/address/model/UserPrefs.java rename to src/main/java/seedu/revision/model/UserPrefs.java index 25a5fd6eab9..3e32d8940dd 100644 --- a/src/main/java/seedu/address/model/UserPrefs.java +++ b/src/main/java/seedu/revision/model/UserPrefs.java @@ -1,4 +1,4 @@ -package seedu.address.model; +package seedu.revision.model; import static java.util.Objects.requireNonNull; @@ -6,7 +6,7 @@ import java.nio.file.Paths; import java.util.Objects; -import seedu.address.commons.core.GuiSettings; +import seedu.revision.commons.core.GuiSettings; /** * Represents User's preferences. diff --git a/src/main/java/seedu/address/model/answerable/Answer.java b/src/main/java/seedu/revision/model/answerable/Answer.java similarity index 90% rename from src/main/java/seedu/address/model/answerable/Answer.java rename to src/main/java/seedu/revision/model/answerable/Answer.java index dda0f5edf56..b578ecedf67 100644 --- a/src/main/java/seedu/address/model/answerable/Answer.java +++ b/src/main/java/seedu/revision/model/answerable/Answer.java @@ -1,10 +1,10 @@ -package seedu.address.model.answerable; +package seedu.revision.model.answerable; import static java.util.Objects.requireNonNull; -import static seedu.address.commons.util.AppUtil.checkArgument; +import static seedu.revision.commons.util.AppUtil.checkArgument; /** - * Represents a Answer in the address book. + * Represents a Answer in the revision tool. * Guarantees: immutable; name is valid as declared in {@link #isValidAnswer(String)} */ public class Answer { diff --git a/src/main/java/seedu/address/model/answerable/Answerable.java b/src/main/java/seedu/revision/model/answerable/Answerable.java similarity index 95% rename from src/main/java/seedu/address/model/answerable/Answerable.java rename to src/main/java/seedu/revision/model/answerable/Answerable.java index 2e17fa0b2d4..16499c9b0af 100644 --- a/src/main/java/seedu/address/model/answerable/Answerable.java +++ b/src/main/java/seedu/revision/model/answerable/Answerable.java @@ -1,14 +1,13 @@ -package seedu.address.model.answerable; +package seedu.revision.model.answerable; -import static seedu.address.commons.util.CollectionUtil.requireAllNonNull; +import static seedu.revision.commons.util.CollectionUtil.requireAllNonNull; -import java.util.Arrays; import java.util.Collections; import java.util.HashSet; import java.util.Objects; import java.util.Set; -import seedu.address.model.category.Category; +import seedu.revision.model.category.Category; /** * Represents a Answerable in the Test Bank. * Guarantees: details are present and not null, field values are validated, immutable. diff --git a/src/main/java/seedu/address/model/answerable/Difficulty.java b/src/main/java/seedu/revision/model/answerable/Difficulty.java similarity index 93% rename from src/main/java/seedu/address/model/answerable/Difficulty.java rename to src/main/java/seedu/revision/model/answerable/Difficulty.java index fb44011fbb6..4a805e3ed90 100644 --- a/src/main/java/seedu/address/model/answerable/Difficulty.java +++ b/src/main/java/seedu/revision/model/answerable/Difficulty.java @@ -1,7 +1,7 @@ -package seedu.address.model.answerable; +package seedu.revision.model.answerable; import static java.util.Objects.requireNonNull; -import static seedu.address.commons.util.AppUtil.checkArgument; +import static seedu.revision.commons.util.AppUtil.checkArgument; /** * Represents a Questions's Difficulty in the test bank. diff --git a/src/main/java/seedu/address/model/answerable/Mcq.java b/src/main/java/seedu/revision/model/answerable/Mcq.java similarity index 76% rename from src/main/java/seedu/address/model/answerable/Mcq.java rename to src/main/java/seedu/revision/model/answerable/Mcq.java index 4e5c27e975c..1402219d619 100644 --- a/src/main/java/seedu/address/model/answerable/Mcq.java +++ b/src/main/java/seedu/revision/model/answerable/Mcq.java @@ -1,10 +1,10 @@ -package seedu.address.model.answerable; +package seedu.revision.model.answerable; -import seedu.address.model.category.Category; +import seedu.revision.model.category.Category; import java.util.Set; -import static seedu.address.commons.util.CollectionUtil.requireAllNonNull; +import static seedu.revision.commons.util.CollectionUtil.requireAllNonNull; /** * Represents a Answerable in the Test Bank. diff --git a/src/main/java/seedu/address/model/answerable/Question.java b/src/main/java/seedu/revision/model/answerable/Question.java similarity index 90% rename from src/main/java/seedu/address/model/answerable/Question.java rename to src/main/java/seedu/revision/model/answerable/Question.java index 16a584d85fc..0d51d73a578 100644 --- a/src/main/java/seedu/address/model/answerable/Question.java +++ b/src/main/java/seedu/revision/model/answerable/Question.java @@ -1,10 +1,10 @@ -package seedu.address.model.answerable; +package seedu.revision.model.answerable; import static java.util.Objects.requireNonNull; -import static seedu.address.commons.util.AppUtil.checkArgument; +import static seedu.revision.commons.util.AppUtil.checkArgument; /** - * Represents a Answerable's name in the address book. + * Represents a Answerable's name in the revision tool. * Guarantees: immutable; is valid as declared in {@link #isValidQuestion(String)} */ public class Question { diff --git a/src/main/java/seedu/address/model/answerable/Saq.java b/src/main/java/seedu/revision/model/answerable/Saq.java similarity index 85% rename from src/main/java/seedu/address/model/answerable/Saq.java rename to src/main/java/seedu/revision/model/answerable/Saq.java index 610521584a8..7f926dd3701 100644 --- a/src/main/java/seedu/address/model/answerable/Saq.java +++ b/src/main/java/seedu/revision/model/answerable/Saq.java @@ -1,6 +1,6 @@ -package seedu.address.model.answerable; +package seedu.revision.model.answerable; -import seedu.address.model.category.Category; +import seedu.revision.model.category.Category; import java.util.Set; diff --git a/src/main/java/seedu/address/model/answerable/UniqueAnswerableList.java b/src/main/java/seedu/revision/model/answerable/UniqueAnswerableList.java similarity index 94% rename from src/main/java/seedu/address/model/answerable/UniqueAnswerableList.java rename to src/main/java/seedu/revision/model/answerable/UniqueAnswerableList.java index 2b97c32d56a..a587549b822 100644 --- a/src/main/java/seedu/address/model/answerable/UniqueAnswerableList.java +++ b/src/main/java/seedu/revision/model/answerable/UniqueAnswerableList.java @@ -1,15 +1,15 @@ -package seedu.address.model.answerable; +package seedu.revision.model.answerable; import static java.util.Objects.requireNonNull; -import static seedu.address.commons.util.CollectionUtil.requireAllNonNull; +import static seedu.revision.commons.util.CollectionUtil.requireAllNonNull; import java.util.Iterator; import java.util.List; import javafx.collections.FXCollections; import javafx.collections.ObservableList; -import seedu.address.model.answerable.exceptions.DuplicateAnswerableException; -import seedu.address.model.answerable.exceptions.AnswerableNotFoundException; +import seedu.revision.model.answerable.exceptions.DuplicateAnswerableException; +import seedu.revision.model.answerable.exceptions.AnswerableNotFoundException; /** * A list of answerables that enforces uniqueness between its elements and does not allow nulls. diff --git a/src/main/java/seedu/address/model/answerable/exceptions/AnswerableNotFoundException.java b/src/main/java/seedu/revision/model/answerable/exceptions/AnswerableNotFoundException.java similarity index 74% rename from src/main/java/seedu/address/model/answerable/exceptions/AnswerableNotFoundException.java rename to src/main/java/seedu/revision/model/answerable/exceptions/AnswerableNotFoundException.java index d65a5779fe2..014e9ffd57d 100644 --- a/src/main/java/seedu/address/model/answerable/exceptions/AnswerableNotFoundException.java +++ b/src/main/java/seedu/revision/model/answerable/exceptions/AnswerableNotFoundException.java @@ -1,4 +1,4 @@ -package seedu.address.model.answerable.exceptions; +package seedu.revision.model.answerable.exceptions; /** * Signals that the operation is unable to find the specified answerable. diff --git a/src/main/java/seedu/address/model/answerable/exceptions/DuplicateAnswerableException.java b/src/main/java/seedu/revision/model/answerable/exceptions/DuplicateAnswerableException.java similarity index 86% rename from src/main/java/seedu/address/model/answerable/exceptions/DuplicateAnswerableException.java rename to src/main/java/seedu/revision/model/answerable/exceptions/DuplicateAnswerableException.java index abd11e21939..0da13595143 100644 --- a/src/main/java/seedu/address/model/answerable/exceptions/DuplicateAnswerableException.java +++ b/src/main/java/seedu/revision/model/answerable/exceptions/DuplicateAnswerableException.java @@ -1,4 +1,4 @@ -package seedu.address.model.answerable.exceptions; +package seedu.revision.model.answerable.exceptions; /** * Signals that the operation will result in duplicate Answerables (Answerables are considered duplicates if they have the same diff --git a/src/main/java/seedu/address/model/answerable/predicates/CategoryPredicate.java b/src/main/java/seedu/revision/model/answerable/predicates/CategoryPredicate.java similarity index 86% rename from src/main/java/seedu/address/model/answerable/predicates/CategoryPredicate.java rename to src/main/java/seedu/revision/model/answerable/predicates/CategoryPredicate.java index d0794ea33c4..6548d30664e 100644 --- a/src/main/java/seedu/address/model/answerable/predicates/CategoryPredicate.java +++ b/src/main/java/seedu/revision/model/answerable/predicates/CategoryPredicate.java @@ -1,9 +1,9 @@ -package seedu.address.model.answerable.predicates; +package seedu.revision.model.answerable.predicates; import java.util.function.Predicate; -import seedu.address.model.answerable.Answerable; -import seedu.address.model.category.Category; +import seedu.revision.model.answerable.Answerable; +import seedu.revision.model.category.Category; /** * Tests that a {@code Answerable}'s {@code category} matches the category given. diff --git a/src/main/java/seedu/address/model/answerable/predicates/DifficultyPredicate.java b/src/main/java/seedu/revision/model/answerable/predicates/DifficultyPredicate.java similarity index 81% rename from src/main/java/seedu/address/model/answerable/predicates/DifficultyPredicate.java rename to src/main/java/seedu/revision/model/answerable/predicates/DifficultyPredicate.java index 428e9c3ef23..d9386b243f2 100644 --- a/src/main/java/seedu/address/model/answerable/predicates/DifficultyPredicate.java +++ b/src/main/java/seedu/revision/model/answerable/predicates/DifficultyPredicate.java @@ -1,9 +1,9 @@ -package seedu.address.model.answerable.predicates; +package seedu.revision.model.answerable.predicates; import java.util.function.Predicate; -import seedu.address.model.answerable.Answerable; -import seedu.address.model.answerable.Difficulty; +import seedu.revision.model.answerable.Answerable; +import seedu.revision.model.answerable.Difficulty; public class DifficultyPredicate implements Predicate { diff --git a/src/main/java/seedu/address/model/answerable/predicates/QuestionContainsKeywordsPredicate.java b/src/main/java/seedu/revision/model/answerable/predicates/QuestionContainsKeywordsPredicate.java similarity index 86% rename from src/main/java/seedu/address/model/answerable/predicates/QuestionContainsKeywordsPredicate.java rename to src/main/java/seedu/revision/model/answerable/predicates/QuestionContainsKeywordsPredicate.java index cb3ead87075..a97c9062a5c 100644 --- a/src/main/java/seedu/address/model/answerable/predicates/QuestionContainsKeywordsPredicate.java +++ b/src/main/java/seedu/revision/model/answerable/predicates/QuestionContainsKeywordsPredicate.java @@ -1,10 +1,10 @@ -package seedu.address.model.answerable.predicates; +package seedu.revision.model.answerable.predicates; import java.util.List; import java.util.function.Predicate; -import seedu.address.commons.util.StringUtil; -import seedu.address.model.answerable.Answerable; +import seedu.revision.commons.util.StringUtil; +import seedu.revision.model.answerable.Answerable; /** * Tests that a {@code Answerable}'s {@code Question} matches any of the keywords given. diff --git a/src/main/java/seedu/address/model/category/Category.java b/src/main/java/seedu/revision/model/category/Category.java similarity index 90% rename from src/main/java/seedu/address/model/category/Category.java rename to src/main/java/seedu/revision/model/category/Category.java index 9029b26da28..e184327c280 100644 --- a/src/main/java/seedu/address/model/category/Category.java +++ b/src/main/java/seedu/revision/model/category/Category.java @@ -1,10 +1,10 @@ -package seedu.address.model.category; +package seedu.revision.model.category; import static java.util.Objects.requireNonNull; -import static seedu.address.commons.util.AppUtil.checkArgument; +import static seedu.revision.commons.util.AppUtil.checkArgument; /** - * Represents a category in the address book. + * Represents a category in the revision tool. * Guarantees: immutable; name is valid as declared in {@link #isValidCategoryName(String)} */ public class Category { diff --git a/src/main/java/seedu/address/model/util/SampleDataUtil.java b/src/main/java/seedu/revision/model/util/SampleDataUtil.java similarity index 84% rename from src/main/java/seedu/address/model/util/SampleDataUtil.java rename to src/main/java/seedu/revision/model/util/SampleDataUtil.java index 6e992130169..ff46939285f 100644 --- a/src/main/java/seedu/address/model/util/SampleDataUtil.java +++ b/src/main/java/seedu/revision/model/util/SampleDataUtil.java @@ -1,18 +1,18 @@ -package seedu.address.model.util; +package seedu.revision.model.util; import java.util.Arrays; import java.util.HashSet; import java.util.Set; import java.util.stream.Collectors; -import seedu.address.model.AddressBook; -import seedu.address.model.ReadOnlyAddressBook; -import seedu.address.model.answerable.Answer; -import seedu.address.model.answerable.Answerable; -import seedu.address.model.answerable.Difficulty; -import seedu.address.model.answerable.Mcq; -import seedu.address.model.answerable.Question; -import seedu.address.model.category.Category; +import seedu.revision.model.AddressBook; +import seedu.revision.model.ReadOnlyAddressBook; +import seedu.revision.model.answerable.Answer; +import seedu.revision.model.answerable.Answerable; +import seedu.revision.model.answerable.Difficulty; +import seedu.revision.model.answerable.Mcq; +import seedu.revision.model.answerable.Question; +import seedu.revision.model.category.Category; /** diff --git a/src/main/java/seedu/address/storage/AddressBookStorage.java b/src/main/java/seedu/revision/storage/AddressBookStorage.java similarity index 85% rename from src/main/java/seedu/address/storage/AddressBookStorage.java rename to src/main/java/seedu/revision/storage/AddressBookStorage.java index 4599182b3f9..f5ce5ceb53e 100644 --- a/src/main/java/seedu/address/storage/AddressBookStorage.java +++ b/src/main/java/seedu/revision/storage/AddressBookStorage.java @@ -1,14 +1,14 @@ -package seedu.address.storage; +package seedu.revision.storage; import java.io.IOException; import java.nio.file.Path; import java.util.Optional; -import seedu.address.commons.exceptions.DataConversionException; -import seedu.address.model.ReadOnlyAddressBook; +import seedu.revision.commons.exceptions.DataConversionException; +import seedu.revision.model.ReadOnlyAddressBook; /** - * Represents a storage for {@link seedu.address.model.AddressBook}. + * Represents a storage for {@link seedu.revision.model.AddressBook}. */ public interface AddressBookStorage { diff --git a/src/main/java/seedu/address/storage/JsonAdaptedAnswer.java b/src/main/java/seedu/revision/storage/JsonAdaptedAnswer.java similarity index 88% rename from src/main/java/seedu/address/storage/JsonAdaptedAnswer.java rename to src/main/java/seedu/revision/storage/JsonAdaptedAnswer.java index a1039dacde5..eaf6cfbee6e 100644 --- a/src/main/java/seedu/address/storage/JsonAdaptedAnswer.java +++ b/src/main/java/seedu/revision/storage/JsonAdaptedAnswer.java @@ -1,9 +1,9 @@ -package seedu.address.storage; +package seedu.revision.storage; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -import seedu.address.commons.exceptions.IllegalValueException; -import seedu.address.model.answerable.Answer; +import seedu.revision.commons.exceptions.IllegalValueException; +import seedu.revision.model.answerable.Answer; /** * Jackson-friendly version of {@link Answer}. diff --git a/src/main/java/seedu/address/storage/JsonAdaptedAnswerable.java b/src/main/java/seedu/revision/storage/JsonAdaptedAnswerable.java similarity index 91% rename from src/main/java/seedu/address/storage/JsonAdaptedAnswerable.java rename to src/main/java/seedu/revision/storage/JsonAdaptedAnswerable.java index 46a922b030d..93bfaf1cf4e 100644 --- a/src/main/java/seedu/address/storage/JsonAdaptedAnswerable.java +++ b/src/main/java/seedu/revision/storage/JsonAdaptedAnswerable.java @@ -1,4 +1,4 @@ -package seedu.address.storage; +package seedu.revision.storage; import java.util.ArrayList; import java.util.HashSet; @@ -9,14 +9,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import seedu.address.commons.exceptions.IllegalValueException; -import seedu.address.model.answerable.Answer; -import seedu.address.model.answerable.Answerable; +import seedu.revision.commons.exceptions.IllegalValueException; +import seedu.revision.model.answerable.Answer; +import seedu.revision.model.answerable.Answerable; -import seedu.address.model.answerable.Difficulty; -import seedu.address.model.answerable.Mcq; -import seedu.address.model.answerable.Question; -import seedu.address.model.category.Category; +import seedu.revision.model.answerable.Difficulty; +import seedu.revision.model.answerable.Mcq; +import seedu.revision.model.answerable.Question; +import seedu.revision.model.category.Category; /** * Jackson-friendly version of {@link Answerable}. diff --git a/src/main/java/seedu/address/storage/JsonAdaptedCategory.java b/src/main/java/seedu/revision/storage/JsonAdaptedCategory.java similarity index 89% rename from src/main/java/seedu/address/storage/JsonAdaptedCategory.java rename to src/main/java/seedu/revision/storage/JsonAdaptedCategory.java index 69057a157f7..385d4e853b0 100644 --- a/src/main/java/seedu/address/storage/JsonAdaptedCategory.java +++ b/src/main/java/seedu/revision/storage/JsonAdaptedCategory.java @@ -1,10 +1,10 @@ -package seedu.address.storage; +package seedu.revision.storage; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -import seedu.address.commons.exceptions.IllegalValueException; -import seedu.address.model.category.Category; +import seedu.revision.commons.exceptions.IllegalValueException; +import seedu.revision.model.category.Category; /** * Jackson-friendly version of {@link Category}. diff --git a/src/main/java/seedu/address/storage/JsonAddressBookStorage.java b/src/main/java/seedu/revision/storage/JsonAddressBookStorage.java similarity index 86% rename from src/main/java/seedu/address/storage/JsonAddressBookStorage.java rename to src/main/java/seedu/revision/storage/JsonAddressBookStorage.java index dfab9daaa0d..786e54eba00 100644 --- a/src/main/java/seedu/address/storage/JsonAddressBookStorage.java +++ b/src/main/java/seedu/revision/storage/JsonAddressBookStorage.java @@ -1,4 +1,4 @@ -package seedu.address.storage; +package seedu.revision.storage; import static java.util.Objects.requireNonNull; @@ -7,12 +7,12 @@ import java.util.Optional; import java.util.logging.Logger; -import seedu.address.commons.core.LogsCenter; -import seedu.address.commons.exceptions.DataConversionException; -import seedu.address.commons.exceptions.IllegalValueException; -import seedu.address.commons.util.FileUtil; -import seedu.address.commons.util.JsonUtil; -import seedu.address.model.ReadOnlyAddressBook; +import seedu.revision.commons.core.LogsCenter; +import seedu.revision.commons.exceptions.DataConversionException; +import seedu.revision.commons.exceptions.IllegalValueException; +import seedu.revision.commons.util.FileUtil; +import seedu.revision.commons.util.JsonUtil; +import seedu.revision.model.ReadOnlyAddressBook; /** * A class to access AddressBook data stored as a json file on the hard disk. diff --git a/src/main/java/seedu/address/storage/JsonSerializableAddressBook.java b/src/main/java/seedu/revision/storage/JsonSerializableAddressBook.java similarity index 85% rename from src/main/java/seedu/address/storage/JsonSerializableAddressBook.java rename to src/main/java/seedu/revision/storage/JsonSerializableAddressBook.java index 6dfb06555ba..3d7b659b1f9 100644 --- a/src/main/java/seedu/address/storage/JsonSerializableAddressBook.java +++ b/src/main/java/seedu/revision/storage/JsonSerializableAddressBook.java @@ -1,4 +1,4 @@ -package seedu.address.storage; +package seedu.revision.storage; import java.util.ArrayList; import java.util.List; @@ -8,10 +8,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonRootName; -import seedu.address.commons.exceptions.IllegalValueException; -import seedu.address.model.AddressBook; -import seedu.address.model.ReadOnlyAddressBook; -import seedu.address.model.answerable.Answerable; +import seedu.revision.commons.exceptions.IllegalValueException; +import seedu.revision.model.AddressBook; +import seedu.revision.model.ReadOnlyAddressBook; +import seedu.revision.model.answerable.Answerable; /** * An Immutable AddressBook that is serializable to JSON format. @@ -41,7 +41,7 @@ public JsonSerializableAddressBook(ReadOnlyAddressBook source) { } /** - * Converts this address book into the model's {@code AddressBook} object. + * Converts this revision tool into the model's {@code AddressBook} object. * * @throws IllegalValueException if there were any data constraints violated. */ diff --git a/src/main/java/seedu/address/storage/JsonUserPrefsStorage.java b/src/main/java/seedu/revision/storage/JsonUserPrefsStorage.java similarity index 82% rename from src/main/java/seedu/address/storage/JsonUserPrefsStorage.java rename to src/main/java/seedu/revision/storage/JsonUserPrefsStorage.java index bc2bbad84aa..f646fb1d5df 100644 --- a/src/main/java/seedu/address/storage/JsonUserPrefsStorage.java +++ b/src/main/java/seedu/revision/storage/JsonUserPrefsStorage.java @@ -1,13 +1,13 @@ -package seedu.address.storage; +package seedu.revision.storage; import java.io.IOException; import java.nio.file.Path; import java.util.Optional; -import seedu.address.commons.exceptions.DataConversionException; -import seedu.address.commons.util.JsonUtil; -import seedu.address.model.ReadOnlyUserPrefs; -import seedu.address.model.UserPrefs; +import seedu.revision.commons.exceptions.DataConversionException; +import seedu.revision.commons.util.JsonUtil; +import seedu.revision.model.ReadOnlyUserPrefs; +import seedu.revision.model.UserPrefs; /** * A class to access UserPrefs stored in the hard disk as a json file diff --git a/src/main/java/seedu/address/storage/Storage.java b/src/main/java/seedu/revision/storage/Storage.java similarity index 73% rename from src/main/java/seedu/address/storage/Storage.java rename to src/main/java/seedu/revision/storage/Storage.java index beda8bd9f11..2f05a25adca 100644 --- a/src/main/java/seedu/address/storage/Storage.java +++ b/src/main/java/seedu/revision/storage/Storage.java @@ -1,13 +1,13 @@ -package seedu.address.storage; +package seedu.revision.storage; import java.io.IOException; import java.nio.file.Path; import java.util.Optional; -import seedu.address.commons.exceptions.DataConversionException; -import seedu.address.model.ReadOnlyAddressBook; -import seedu.address.model.ReadOnlyUserPrefs; -import seedu.address.model.UserPrefs; +import seedu.revision.commons.exceptions.DataConversionException; +import seedu.revision.model.ReadOnlyAddressBook; +import seedu.revision.model.ReadOnlyUserPrefs; +import seedu.revision.model.UserPrefs; /** * API of the Storage component diff --git a/src/main/java/seedu/address/storage/StorageManager.java b/src/main/java/seedu/revision/storage/StorageManager.java similarity index 89% rename from src/main/java/seedu/address/storage/StorageManager.java rename to src/main/java/seedu/revision/storage/StorageManager.java index e4f452b6cbf..a2c5d7de38d 100644 --- a/src/main/java/seedu/address/storage/StorageManager.java +++ b/src/main/java/seedu/revision/storage/StorageManager.java @@ -1,15 +1,15 @@ -package seedu.address.storage; +package seedu.revision.storage; import java.io.IOException; import java.nio.file.Path; import java.util.Optional; import java.util.logging.Logger; -import seedu.address.commons.core.LogsCenter; -import seedu.address.commons.exceptions.DataConversionException; -import seedu.address.model.ReadOnlyAddressBook; -import seedu.address.model.ReadOnlyUserPrefs; -import seedu.address.model.UserPrefs; +import seedu.revision.commons.core.LogsCenter; +import seedu.revision.commons.exceptions.DataConversionException; +import seedu.revision.model.ReadOnlyAddressBook; +import seedu.revision.model.ReadOnlyUserPrefs; +import seedu.revision.model.UserPrefs; /** * Manages storage of AddressBook data in local storage. diff --git a/src/main/java/seedu/address/storage/UserPrefsStorage.java b/src/main/java/seedu/revision/storage/UserPrefsStorage.java similarity index 71% rename from src/main/java/seedu/address/storage/UserPrefsStorage.java rename to src/main/java/seedu/revision/storage/UserPrefsStorage.java index 29eef178dbc..ec993c41db3 100644 --- a/src/main/java/seedu/address/storage/UserPrefsStorage.java +++ b/src/main/java/seedu/revision/storage/UserPrefsStorage.java @@ -1,15 +1,15 @@ -package seedu.address.storage; +package seedu.revision.storage; import java.io.IOException; import java.nio.file.Path; import java.util.Optional; -import seedu.address.commons.exceptions.DataConversionException; -import seedu.address.model.ReadOnlyUserPrefs; -import seedu.address.model.UserPrefs; +import seedu.revision.commons.exceptions.DataConversionException; +import seedu.revision.model.ReadOnlyUserPrefs; +import seedu.revision.model.UserPrefs; /** - * Represents a storage for {@link seedu.address.model.UserPrefs}. + * Represents a storage for {@link seedu.revision.model.UserPrefs}. */ public interface UserPrefsStorage { @@ -27,7 +27,7 @@ public interface UserPrefsStorage { Optional readUserPrefs() throws DataConversionException, IOException; /** - * Saves the given {@link seedu.address.model.ReadOnlyUserPrefs} to the storage. + * Saves the given {@link seedu.revision.model.ReadOnlyUserPrefs} to the storage. * @param userPrefs cannot be null. * @throws IOException if there was any problem writing to the file. */ diff --git a/src/main/java/seedu/address/ui/AnswerableCard.java b/src/main/java/seedu/revision/ui/AnswerableCard.java similarity index 96% rename from src/main/java/seedu/address/ui/AnswerableCard.java rename to src/main/java/seedu/revision/ui/AnswerableCard.java index 25a0dba5b3e..a41997e00a0 100644 --- a/src/main/java/seedu/address/ui/AnswerableCard.java +++ b/src/main/java/seedu/revision/ui/AnswerableCard.java @@ -1,4 +1,4 @@ -package seedu.address.ui; +package seedu.revision.ui; import java.util.Comparator; @@ -7,7 +7,7 @@ import javafx.scene.layout.FlowPane; import javafx.scene.layout.HBox; import javafx.scene.layout.Region; -import seedu.address.model.answerable.Answerable; +import seedu.revision.model.answerable.Answerable; /** * An UI component that displays information of a {@code Answerable}. diff --git a/src/main/java/seedu/address/ui/AnswerableListPanel.java b/src/main/java/seedu/revision/ui/AnswerableListPanel.java similarity index 91% rename from src/main/java/seedu/address/ui/AnswerableListPanel.java rename to src/main/java/seedu/revision/ui/AnswerableListPanel.java index 616b5c2c939..030c40c71bd 100644 --- a/src/main/java/seedu/address/ui/AnswerableListPanel.java +++ b/src/main/java/seedu/revision/ui/AnswerableListPanel.java @@ -1,4 +1,4 @@ -package seedu.address.ui; +package seedu.revision.ui; import java.util.logging.Logger; @@ -7,8 +7,8 @@ import javafx.scene.control.ListCell; import javafx.scene.control.ListView; import javafx.scene.layout.Region; -import seedu.address.commons.core.LogsCenter; -import seedu.address.model.answerable.Answerable; +import seedu.revision.commons.core.LogsCenter; +import seedu.revision.model.answerable.Answerable; /** * Panel containing the list of answerables. diff --git a/src/main/java/seedu/address/ui/CommandBox.java b/src/main/java/seedu/revision/ui/CommandBox.java similarity index 88% rename from src/main/java/seedu/address/ui/CommandBox.java rename to src/main/java/seedu/revision/ui/CommandBox.java index 7d76e691f52..c790b4c0922 100644 --- a/src/main/java/seedu/address/ui/CommandBox.java +++ b/src/main/java/seedu/revision/ui/CommandBox.java @@ -1,12 +1,12 @@ -package seedu.address.ui; +package seedu.revision.ui; import javafx.collections.ObservableList; import javafx.fxml.FXML; import javafx.scene.control.TextField; import javafx.scene.layout.Region; -import seedu.address.logic.commands.CommandResult; -import seedu.address.logic.commands.exceptions.CommandException; -import seedu.address.logic.parser.exceptions.ParseException; +import seedu.revision.logic.commands.CommandResult; +import seedu.revision.logic.commands.exceptions.CommandException; +import seedu.revision.logic.parser.exceptions.ParseException; /** * The UI component that is responsible for receiving user command inputs. @@ -69,7 +69,7 @@ public interface CommandExecutor { /** * Executes the command and returns the result. * - * @see seedu.address.logic.Logic#execute(String) + * @see seedu.revision.logic.Logic#execute(String) */ CommandResult execute(String commandText) throws CommandException, ParseException; } diff --git a/src/main/java/seedu/address/ui/HelpWindow.java b/src/main/java/seedu/revision/ui/HelpWindow.java similarity index 97% rename from src/main/java/seedu/address/ui/HelpWindow.java rename to src/main/java/seedu/revision/ui/HelpWindow.java index 9a665915949..2ebfe425cd4 100644 --- a/src/main/java/seedu/address/ui/HelpWindow.java +++ b/src/main/java/seedu/revision/ui/HelpWindow.java @@ -1,4 +1,4 @@ -package seedu.address.ui; +package seedu.revision.ui; import java.util.logging.Logger; @@ -8,7 +8,7 @@ import javafx.scene.input.Clipboard; import javafx.scene.input.ClipboardContent; import javafx.stage.Stage; -import seedu.address.commons.core.LogsCenter; +import seedu.revision.commons.core.LogsCenter; /** * Controller for a help page diff --git a/src/main/java/seedu/address/ui/MainWindow.java b/src/main/java/seedu/revision/ui/MainWindow.java similarity index 93% rename from src/main/java/seedu/address/ui/MainWindow.java rename to src/main/java/seedu/revision/ui/MainWindow.java index 8102e537135..d1112d3dd2b 100644 --- a/src/main/java/seedu/address/ui/MainWindow.java +++ b/src/main/java/seedu/revision/ui/MainWindow.java @@ -1,4 +1,4 @@ -package seedu.address.ui; +package seedu.revision.ui; import java.util.logging.Logger; @@ -10,12 +10,12 @@ import javafx.scene.input.KeyEvent; import javafx.scene.layout.StackPane; import javafx.stage.Stage; -import seedu.address.commons.core.GuiSettings; -import seedu.address.commons.core.LogsCenter; -import seedu.address.logic.Logic; -import seedu.address.logic.commands.CommandResult; -import seedu.address.logic.commands.exceptions.CommandException; -import seedu.address.logic.parser.exceptions.ParseException; +import seedu.revision.commons.core.GuiSettings; +import seedu.revision.commons.core.LogsCenter; +import seedu.revision.logic.Logic; +import seedu.revision.logic.commands.CommandResult; +import seedu.revision.logic.commands.exceptions.CommandException; +import seedu.revision.logic.parser.exceptions.ParseException; /** * The Main Window. Provides the basic application layout containing @@ -167,7 +167,7 @@ public AnswerableListPanel getAnswerableListPanel() { /** * Executes the command and returns the result. * - * @see seedu.address.logic.Logic#execute(String) + * @see seedu.revision.logic.Logic#execute(String) */ private CommandResult executeCommand(String commandText) throws CommandException, ParseException { try { diff --git a/src/main/java/seedu/address/ui/ResultDisplay.java b/src/main/java/seedu/revision/ui/ResultDisplay.java similarity index 95% rename from src/main/java/seedu/address/ui/ResultDisplay.java rename to src/main/java/seedu/revision/ui/ResultDisplay.java index 7d98e84eedf..8f9013fe4eb 100644 --- a/src/main/java/seedu/address/ui/ResultDisplay.java +++ b/src/main/java/seedu/revision/ui/ResultDisplay.java @@ -1,4 +1,4 @@ -package seedu.address.ui; +package seedu.revision.ui; import static java.util.Objects.requireNonNull; diff --git a/src/main/java/seedu/address/ui/StatusBarFooter.java b/src/main/java/seedu/revision/ui/StatusBarFooter.java similarity index 95% rename from src/main/java/seedu/address/ui/StatusBarFooter.java rename to src/main/java/seedu/revision/ui/StatusBarFooter.java index 7e17911323f..b105c89ee12 100644 --- a/src/main/java/seedu/address/ui/StatusBarFooter.java +++ b/src/main/java/seedu/revision/ui/StatusBarFooter.java @@ -1,4 +1,4 @@ -package seedu.address.ui; +package seedu.revision.ui; import java.nio.file.Path; import java.nio.file.Paths; diff --git a/src/main/java/seedu/address/ui/Ui.java b/src/main/java/seedu/revision/ui/Ui.java similarity index 85% rename from src/main/java/seedu/address/ui/Ui.java rename to src/main/java/seedu/revision/ui/Ui.java index 17aa0b494fe..c6bdeaac54c 100644 --- a/src/main/java/seedu/address/ui/Ui.java +++ b/src/main/java/seedu/revision/ui/Ui.java @@ -1,4 +1,4 @@ -package seedu.address.ui; +package seedu.revision.ui; import javafx.stage.Stage; diff --git a/src/main/java/seedu/address/ui/UiManager.java b/src/main/java/seedu/revision/ui/UiManager.java similarity index 93% rename from src/main/java/seedu/address/ui/UiManager.java rename to src/main/java/seedu/revision/ui/UiManager.java index 876621d79b9..47d93f8952e 100644 --- a/src/main/java/seedu/address/ui/UiManager.java +++ b/src/main/java/seedu/revision/ui/UiManager.java @@ -1,4 +1,4 @@ -package seedu.address.ui; +package seedu.revision.ui; import java.util.logging.Logger; @@ -7,10 +7,10 @@ import javafx.scene.control.Alert.AlertType; import javafx.scene.image.Image; import javafx.stage.Stage; -import seedu.address.MainApp; -import seedu.address.commons.core.LogsCenter; -import seedu.address.commons.util.StringUtil; -import seedu.address.logic.Logic; +import seedu.revision.MainApp; +import seedu.revision.commons.core.LogsCenter; +import seedu.revision.commons.util.StringUtil; +import seedu.revision.logic.Logic; /** * The manager of the UI component. diff --git a/src/main/java/seedu/address/ui/UiPart.java b/src/main/java/seedu/revision/ui/UiPart.java similarity index 97% rename from src/main/java/seedu/address/ui/UiPart.java rename to src/main/java/seedu/revision/ui/UiPart.java index fc820e01a9c..ac4f3e38a8d 100644 --- a/src/main/java/seedu/address/ui/UiPart.java +++ b/src/main/java/seedu/revision/ui/UiPart.java @@ -1,4 +1,4 @@ -package seedu.address.ui; +package seedu.revision.ui; import static java.util.Objects.requireNonNull; @@ -6,7 +6,7 @@ import java.net.URL; import javafx.fxml.FXMLLoader; -import seedu.address.MainApp; +import seedu.revision.MainApp; /** * Represents a distinct part of the UI. e.g. Windows, dialogs, panels, status bars, etc. diff --git a/src/main/resources/view/AnswerableListCard 2.fxml b/src/main/resources/view/AnswerableListCard 2.fxml new file mode 100644 index 00000000000..5d13b61ef4c --- /dev/null +++ b/src/main/resources/view/AnswerableListCard 2.fxml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/data/JsonAddressBookStorageTest/invalidAnswerableTestBank 2.json b/src/test/data/JsonAddressBookStorageTest/invalidAnswerableTestBank 2.json new file mode 100644 index 00000000000..e467b638395 --- /dev/null +++ b/src/test/data/JsonAddressBookStorageTest/invalidAnswerableTestBank 2.json @@ -0,0 +1,13 @@ +{ + "answerables": [ { + "question": "", + "answerSet": { + "correctAnswerSet": [ + { "answer": "CORRECT" } + ], + "wrongAnswerSet": [ + { "answer": "WRONG" } + ] }, + "difficulty": "9482424", + } ] +} diff --git a/src/test/data/JsonSerializableAddressBookTest/duplicateAnswerableTestBank 2.json b/src/test/data/JsonSerializableAddressBookTest/duplicateAnswerableTestBank 2.json new file mode 100644 index 00000000000..f68989f77e3 --- /dev/null +++ b/src/test/data/JsonSerializableAddressBookTest/duplicateAnswerableTestBank 2.json @@ -0,0 +1,15 @@ +{ + "answerables": [ { + "question": "Alice Pauline", + "correctAnswerSet": [ "CORRECT" ], + "wrongAnswerSet": [ "WRONG" ], + "difficulty": "1", + "categories": [ "friends" ] + }, { + "question": "Alice Pauline", + "correctAnswerSet": [ "CORRECT" ], + "wrongAnswerSet": [ "WRONG" ], + "difficulty": "1", + "categories": [ "friends" ] + } ] +} diff --git a/src/test/data/JsonSerializableAddressBookTest/invalidAnswerableTestBank 2.json b/src/test/data/JsonSerializableAddressBookTest/invalidAnswerableTestBank 2.json new file mode 100644 index 00000000000..ee7b2f9a18f --- /dev/null +++ b/src/test/data/JsonSerializableAddressBookTest/invalidAnswerableTestBank 2.json @@ -0,0 +1,7 @@ +{ + "answerables": [ { + "question": "invalid question! Hans@ Muster", + "difficulty": "9482424", + "category": "4th street" + } ] +} diff --git a/src/test/java/seedu/address/AppParametersTest.java b/src/test/java/seedu/revision/AppParametersTest.java similarity index 98% rename from src/test/java/seedu/address/AppParametersTest.java rename to src/test/java/seedu/revision/AppParametersTest.java index 61326b2d31a..8137aefce63 100644 --- a/src/test/java/seedu/address/AppParametersTest.java +++ b/src/test/java/seedu/revision/AppParametersTest.java @@ -1,4 +1,4 @@ -package seedu.address; +package seedu.revision; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/seedu/address/commons/core/ConfigTest.java b/src/test/java/seedu/revision/commons/core/ConfigTest.java similarity index 95% rename from src/test/java/seedu/address/commons/core/ConfigTest.java rename to src/test/java/seedu/revision/commons/core/ConfigTest.java index 07cd7f73d53..2308684e16f 100644 --- a/src/test/java/seedu/address/commons/core/ConfigTest.java +++ b/src/test/java/seedu/revision/commons/core/ConfigTest.java @@ -1,4 +1,4 @@ -package seedu.address.commons.core; +package seedu.revision.commons.core; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/src/test/java/seedu/address/commons/core/VersionTest.java b/src/test/java/seedu/revision/commons/core/VersionTest.java similarity index 98% rename from src/test/java/seedu/address/commons/core/VersionTest.java rename to src/test/java/seedu/revision/commons/core/VersionTest.java index 495cd231554..d06a8189fe4 100644 --- a/src/test/java/seedu/address/commons/core/VersionTest.java +++ b/src/test/java/seedu/revision/commons/core/VersionTest.java @@ -1,8 +1,8 @@ -package seedu.address.commons.core; +package seedu.revision.commons.core; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -import static seedu.address.testutil.Assert.assertThrows; +import static seedu.revision.testutil.Assert.assertThrows; import org.junit.jupiter.api.Test; diff --git a/src/test/java/seedu/address/commons/core/index/IndexTest.java b/src/test/java/seedu/revision/commons/core/index/IndexTest.java similarity index 95% rename from src/test/java/seedu/address/commons/core/index/IndexTest.java rename to src/test/java/seedu/revision/commons/core/index/IndexTest.java index b5cdfc2b99b..66634140b70 100644 --- a/src/test/java/seedu/address/commons/core/index/IndexTest.java +++ b/src/test/java/seedu/revision/commons/core/index/IndexTest.java @@ -1,9 +1,9 @@ -package seedu.address.commons.core.index; +package seedu.revision.commons.core.index; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -import static seedu.address.testutil.Assert.assertThrows; +import static seedu.revision.testutil.Assert.assertThrows; import org.junit.jupiter.api.Test; diff --git a/src/test/java/seedu/address/commons/util/AppUtilTest.java b/src/test/java/seedu/revision/commons/util/AppUtilTest.java similarity index 91% rename from src/test/java/seedu/address/commons/util/AppUtilTest.java rename to src/test/java/seedu/revision/commons/util/AppUtilTest.java index 594de1e6365..974b1c0ee15 100644 --- a/src/test/java/seedu/address/commons/util/AppUtilTest.java +++ b/src/test/java/seedu/revision/commons/util/AppUtilTest.java @@ -1,7 +1,7 @@ -package seedu.address.commons.util; +package seedu.revision.commons.util; import static org.junit.jupiter.api.Assertions.assertNotNull; -import static seedu.address.testutil.Assert.assertThrows; +import static seedu.revision.testutil.Assert.assertThrows; import org.junit.jupiter.api.Test; diff --git a/src/test/java/seedu/address/commons/util/CollectionUtilTest.java b/src/test/java/seedu/revision/commons/util/CollectionUtilTest.java similarity index 96% rename from src/test/java/seedu/address/commons/util/CollectionUtilTest.java rename to src/test/java/seedu/revision/commons/util/CollectionUtilTest.java index b467a3dc025..a76ff96e67a 100644 --- a/src/test/java/seedu/address/commons/util/CollectionUtilTest.java +++ b/src/test/java/seedu/revision/commons/util/CollectionUtilTest.java @@ -1,9 +1,9 @@ -package seedu.address.commons.util; +package seedu.revision.commons.util; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -import static seedu.address.commons.util.CollectionUtil.requireAllNonNull; -import static seedu.address.testutil.Assert.assertThrows; +import static seedu.revision.commons.util.CollectionUtil.requireAllNonNull; +import static seedu.revision.testutil.Assert.assertThrows; import java.util.Arrays; import java.util.Collection; diff --git a/src/test/java/seedu/address/commons/util/ConfigUtilTest.java b/src/test/java/seedu/revision/commons/util/ConfigUtilTest.java similarity index 94% rename from src/test/java/seedu/address/commons/util/ConfigUtilTest.java rename to src/test/java/seedu/revision/commons/util/ConfigUtilTest.java index d2ab2839a52..1194640434f 100644 --- a/src/test/java/seedu/address/commons/util/ConfigUtilTest.java +++ b/src/test/java/seedu/revision/commons/util/ConfigUtilTest.java @@ -1,8 +1,8 @@ -package seedu.address.commons.util; +package seedu.revision.commons.util; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; -import static seedu.address.testutil.Assert.assertThrows; +import static seedu.revision.testutil.Assert.assertThrows; import java.io.IOException; import java.nio.file.Path; @@ -13,8 +13,8 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; -import seedu.address.commons.core.Config; -import seedu.address.commons.exceptions.DataConversionException; +import seedu.revision.commons.core.Config; +import seedu.revision.commons.exceptions.DataConversionException; public class ConfigUtilTest { diff --git a/src/test/java/seedu/address/commons/util/FileUtilTest.java b/src/test/java/seedu/revision/commons/util/FileUtilTest.java similarity index 84% rename from src/test/java/seedu/address/commons/util/FileUtilTest.java rename to src/test/java/seedu/revision/commons/util/FileUtilTest.java index 1fe5478c756..3ff3ae1cdbe 100644 --- a/src/test/java/seedu/address/commons/util/FileUtilTest.java +++ b/src/test/java/seedu/revision/commons/util/FileUtilTest.java @@ -1,8 +1,8 @@ -package seedu.address.commons.util; +package seedu.revision.commons.util; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -import static seedu.address.testutil.Assert.assertThrows; +import static seedu.revision.testutil.Assert.assertThrows; import org.junit.jupiter.api.Test; diff --git a/src/test/java/seedu/address/commons/util/JsonUtilTest.java b/src/test/java/seedu/revision/commons/util/JsonUtilTest.java similarity index 92% rename from src/test/java/seedu/address/commons/util/JsonUtilTest.java rename to src/test/java/seedu/revision/commons/util/JsonUtilTest.java index d4907539dee..1829802ca87 100644 --- a/src/test/java/seedu/address/commons/util/JsonUtilTest.java +++ b/src/test/java/seedu/revision/commons/util/JsonUtilTest.java @@ -1,4 +1,4 @@ -package seedu.address.commons.util; +package seedu.revision.commons.util; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -7,8 +7,8 @@ import org.junit.jupiter.api.Test; -import seedu.address.testutil.SerializableTestClass; -import seedu.address.testutil.TestUtil; +import seedu.revision.testutil.SerializableTestClass; +import seedu.revision.testutil.TestUtil; /** * Tests JSON Read and Write diff --git a/src/test/java/seedu/address/commons/util/StringUtilTest.java b/src/test/java/seedu/revision/commons/util/StringUtilTest.java similarity index 98% rename from src/test/java/seedu/address/commons/util/StringUtilTest.java rename to src/test/java/seedu/revision/commons/util/StringUtilTest.java index c56d407bf3f..959e7afc61c 100644 --- a/src/test/java/seedu/address/commons/util/StringUtilTest.java +++ b/src/test/java/seedu/revision/commons/util/StringUtilTest.java @@ -1,8 +1,8 @@ -package seedu.address.commons.util; +package seedu.revision.commons.util; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -import static seedu.address.testutil.Assert.assertThrows; +import static seedu.revision.testutil.Assert.assertThrows; import java.io.FileNotFoundException; diff --git a/src/test/java/seedu/address/logic/LogicManagerTest.java b/src/test/java/seedu/revision/logic/LogicManagerTest.java similarity index 80% rename from src/test/java/seedu/address/logic/LogicManagerTest.java rename to src/test/java/seedu/revision/logic/LogicManagerTest.java index e18a7af9566..be1a36dd4db 100644 --- a/src/test/java/seedu/address/logic/LogicManagerTest.java +++ b/src/test/java/seedu/revision/logic/LogicManagerTest.java @@ -1,16 +1,16 @@ -package seedu.address.logic; +package seedu.revision.logic; import static org.junit.jupiter.api.Assertions.assertEquals; -import static seedu.address.commons.core.Messages.MESSAGE_INVALID_ANSWERABLE_DISPLAYED_INDEX; -import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND; -import static seedu.address.logic.commands.CommandTestUtil.CATEGORY_DESC_UML; -import static seedu.address.logic.commands.CommandTestUtil.CORRECT_ANSWER_DESC; -import static seedu.address.logic.commands.CommandTestUtil.QUESTION_DESC_AMY; -import static seedu.address.logic.commands.CommandTestUtil.DIFFICULTY_DESC_ALPHA; -import static seedu.address.logic.commands.CommandTestUtil.QUESTION_TYPE_MCQ; -import static seedu.address.logic.commands.CommandTestUtil.WRONG_ANSWER_DESC; -import static seedu.address.testutil.Assert.assertThrows; -import static seedu.address.testutil.TypicalAnswerables.ALPHA; +import static seedu.revision.commons.core.Messages.MESSAGE_INVALID_ANSWERABLE_DISPLAYED_INDEX; +import static seedu.revision.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND; +import static seedu.revision.logic.commands.CommandTestUtil.CATEGORY_DESC_UML; +import static seedu.revision.logic.commands.CommandTestUtil.CORRECT_ANSWER_DESC; +import static seedu.revision.logic.commands.CommandTestUtil.QUESTION_DESC_AMY; +import static seedu.revision.logic.commands.CommandTestUtil.DIFFICULTY_DESC_ALPHA; +import static seedu.revision.logic.commands.CommandTestUtil.QUESTION_TYPE_MCQ; +import static seedu.revision.logic.commands.CommandTestUtil.WRONG_ANSWER_DESC; +import static seedu.revision.testutil.Assert.assertThrows; +import static seedu.revision.testutil.TypicalAnswerables.ALPHA; import java.io.IOException; import java.nio.file.Path; @@ -19,20 +19,20 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; -import seedu.address.logic.commands.AddCommand; -import seedu.address.logic.commands.CommandResult; -import seedu.address.logic.commands.ListCommand; -import seedu.address.logic.commands.exceptions.CommandException; -import seedu.address.logic.parser.exceptions.ParseException; -import seedu.address.model.Model; -import seedu.address.model.ModelManager; -import seedu.address.model.ReadOnlyAddressBook; -import seedu.address.model.UserPrefs; -import seedu.address.model.answerable.Answerable; -import seedu.address.storage.JsonAddressBookStorage; -import seedu.address.storage.JsonUserPrefsStorage; -import seedu.address.storage.StorageManager; -import seedu.address.testutil.AnswerableBuilder; +import seedu.revision.logic.commands.AddCommand; +import seedu.revision.logic.commands.CommandResult; +import seedu.revision.logic.commands.ListCommand; +import seedu.revision.logic.commands.exceptions.CommandException; +import seedu.revision.logic.parser.exceptions.ParseException; +import seedu.revision.model.Model; +import seedu.revision.model.ModelManager; +import seedu.revision.model.ReadOnlyAddressBook; +import seedu.revision.model.UserPrefs; +import seedu.revision.model.answerable.Answerable; +import seedu.revision.storage.JsonAddressBookStorage; +import seedu.revision.storage.JsonUserPrefsStorage; +import seedu.revision.storage.StorageManager; +import seedu.revision.testutil.AnswerableBuilder; public class LogicManagerTest { private static final IOException DUMMY_IO_EXCEPTION = new IOException("dummy exception"); diff --git a/src/test/java/seedu/address/logic/commands/AddCommandIntegrationTest.java b/src/test/java/seedu/revision/logic/commands/AddCommandIntegrationTest.java similarity index 68% rename from src/test/java/seedu/address/logic/commands/AddCommandIntegrationTest.java rename to src/test/java/seedu/revision/logic/commands/AddCommandIntegrationTest.java index dce1801e6fc..42b8723ca18 100644 --- a/src/test/java/seedu/address/logic/commands/AddCommandIntegrationTest.java +++ b/src/test/java/seedu/revision/logic/commands/AddCommandIntegrationTest.java @@ -1,17 +1,17 @@ -package seedu.address.logic.commands; +package seedu.revision.logic.commands; -import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure; -import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess; -import static seedu.address.testutil.TypicalAnswerables.getTypicalAddressBook; +import static seedu.revision.logic.commands.CommandTestUtil.assertCommandFailure; +import static seedu.revision.logic.commands.CommandTestUtil.assertCommandSuccess; +import static seedu.revision.testutil.TypicalAnswerables.getTypicalAddressBook; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import seedu.address.model.Model; -import seedu.address.model.ModelManager; -import seedu.address.model.UserPrefs; -import seedu.address.model.answerable.Answerable; -import seedu.address.testutil.AnswerableBuilder; +import seedu.revision.model.Model; +import seedu.revision.model.ModelManager; +import seedu.revision.model.UserPrefs; +import seedu.revision.model.answerable.Answerable; +import seedu.revision.testutil.AnswerableBuilder; /** * Contains integration tests (interaction with the Model) for {@code AddCommand}. diff --git a/src/test/java/seedu/address/logic/commands/AddCommandTest.java b/src/test/java/seedu/revision/logic/commands/AddCommandTest.java similarity index 92% rename from src/test/java/seedu/address/logic/commands/AddCommandTest.java rename to src/test/java/seedu/revision/logic/commands/AddCommandTest.java index b65aedaac2a..e451f2851f9 100644 --- a/src/test/java/seedu/address/logic/commands/AddCommandTest.java +++ b/src/test/java/seedu/revision/logic/commands/AddCommandTest.java @@ -1,10 +1,10 @@ -package seedu.address.logic.commands; +package seedu.revision.logic.commands; import static java.util.Objects.requireNonNull; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -import static seedu.address.testutil.Assert.assertThrows; +import static seedu.revision.testutil.Assert.assertThrows; import java.nio.file.Path; import java.util.ArrayList; @@ -14,14 +14,14 @@ import org.junit.jupiter.api.Test; import javafx.collections.ObservableList; -import seedu.address.commons.core.GuiSettings; -import seedu.address.logic.commands.exceptions.CommandException; -import seedu.address.model.AddressBook; -import seedu.address.model.Model; -import seedu.address.model.ReadOnlyAddressBook; -import seedu.address.model.ReadOnlyUserPrefs; -import seedu.address.model.answerable.Answerable; -import seedu.address.testutil.AnswerableBuilder; +import seedu.revision.commons.core.GuiSettings; +import seedu.revision.logic.commands.exceptions.CommandException; +import seedu.revision.model.AddressBook; +import seedu.revision.model.Model; +import seedu.revision.model.ReadOnlyAddressBook; +import seedu.revision.model.ReadOnlyUserPrefs; +import seedu.revision.model.answerable.Answerable; +import seedu.revision.testutil.AnswerableBuilder; public class AddCommandTest { diff --git a/src/test/java/seedu/address/logic/commands/ClearCommandTest.java b/src/test/java/seedu/revision/logic/commands/ClearCommandTest.java similarity index 67% rename from src/test/java/seedu/address/logic/commands/ClearCommandTest.java rename to src/test/java/seedu/revision/logic/commands/ClearCommandTest.java index 3a968d3560e..11cd1f43bb7 100644 --- a/src/test/java/seedu/address/logic/commands/ClearCommandTest.java +++ b/src/test/java/seedu/revision/logic/commands/ClearCommandTest.java @@ -1,14 +1,14 @@ -package seedu.address.logic.commands; +package seedu.revision.logic.commands; -import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess; -import static seedu.address.testutil.TypicalAnswerables.getTypicalAddressBook; +import static seedu.revision.logic.commands.CommandTestUtil.assertCommandSuccess; +import static seedu.revision.testutil.TypicalAnswerables.getTypicalAddressBook; import org.junit.jupiter.api.Test; -import seedu.address.model.AddressBook; -import seedu.address.model.Model; -import seedu.address.model.ModelManager; -import seedu.address.model.UserPrefs; +import seedu.revision.model.AddressBook; +import seedu.revision.model.Model; +import seedu.revision.model.ModelManager; +import seedu.revision.model.UserPrefs; public class ClearCommandTest { diff --git a/src/test/java/seedu/address/logic/commands/CommandResultTest.java b/src/test/java/seedu/revision/logic/commands/CommandResultTest.java similarity index 98% rename from src/test/java/seedu/address/logic/commands/CommandResultTest.java rename to src/test/java/seedu/revision/logic/commands/CommandResultTest.java index 4f3eb46e9ef..879c76f357a 100644 --- a/src/test/java/seedu/address/logic/commands/CommandResultTest.java +++ b/src/test/java/seedu/revision/logic/commands/CommandResultTest.java @@ -1,4 +1,4 @@ -package seedu.address.logic.commands; +package seedu.revision.logic.commands; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; diff --git a/src/test/java/seedu/address/logic/commands/CommandTestUtil.java b/src/test/java/seedu/revision/logic/commands/CommandTestUtil.java similarity index 85% rename from src/test/java/seedu/address/logic/commands/CommandTestUtil.java rename to src/test/java/seedu/revision/logic/commands/CommandTestUtil.java index 708bad99859..f96de529dea 100644 --- a/src/test/java/seedu/address/logic/commands/CommandTestUtil.java +++ b/src/test/java/seedu/revision/logic/commands/CommandTestUtil.java @@ -1,14 +1,14 @@ -package seedu.address.logic.commands; +package seedu.revision.logic.commands; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -import static seedu.address.logic.parser.CliSyntax.PREFIX_CATEGORY; -import static seedu.address.logic.parser.CliSyntax.PREFIX_CORRECT; -import static seedu.address.logic.parser.CliSyntax.PREFIX_QUESTION; -import static seedu.address.logic.parser.CliSyntax.PREFIX_DIFFICULTY; -import static seedu.address.logic.parser.CliSyntax.PREFIX_QUESTION_TYPE; -import static seedu.address.logic.parser.CliSyntax.PREFIX_WRONG; -import static seedu.address.testutil.Assert.assertThrows; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_CATEGORY; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_CORRECT; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_QUESTION; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_DIFFICULTY; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_QUESTION_TYPE; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_WRONG; +import static seedu.revision.testutil.Assert.assertThrows; import java.util.ArrayList; import java.util.Arrays; @@ -16,14 +16,14 @@ import java.util.List; import java.util.Set; -import seedu.address.commons.core.index.Index; -import seedu.address.logic.commands.exceptions.CommandException; -import seedu.address.model.AddressBook; -import seedu.address.model.Model; -import seedu.address.model.answerable.Answer; -import seedu.address.model.answerable.predicates.QuestionContainsKeywordsPredicate; -import seedu.address.model.answerable.Answerable; -import seedu.address.testutil.EditAnswerableDescriptorBuilder; +import seedu.revision.commons.core.index.Index; +import seedu.revision.logic.commands.exceptions.CommandException; +import seedu.revision.model.AddressBook; +import seedu.revision.model.Model; +import seedu.revision.model.answerable.Answer; +import seedu.revision.model.answerable.predicates.QuestionContainsKeywordsPredicate; +import seedu.revision.model.answerable.Answerable; +import seedu.revision.testutil.EditAnswerableDescriptorBuilder; /** * Contains helper methods for testing commands. @@ -105,7 +105,7 @@ public static void assertCommandSuccess(Command command, Model actualModel, Stri * Executes the given {@code command}, confirms that
* - a {@code CommandException} is thrown
* - the CommandException message matches {@code expectedMessage}
- * - the address book, filtered answerable list and selected answerable in {@code actualModel} remain unchanged + * - the revision tool, filtered answerable list and selected answerable in {@code actualModel} remain unchanged */ public static void assertCommandFailure(Command command, Model actualModel, String expectedMessage) { // we are unable to defensively copy the model for comparison later, so we can @@ -119,7 +119,7 @@ public static void assertCommandFailure(Command command, Model actualModel, Stri } /** * Updates {@code model}'s filtered list to show only the answerable at the given {@code targetIndex} in the - * {@code model}'s address book. + * {@code model}'s revision tool. */ public static void showAnswerableAtIndex(Model model, Index targetIndex) { assertTrue(targetIndex.getZeroBased() < model.getFilteredAnswerableList().size()); diff --git a/src/test/java/seedu/address/logic/commands/DeleteCommandTest.java b/src/test/java/seedu/revision/logic/commands/DeleteCommandTest.java similarity index 81% rename from src/test/java/seedu/address/logic/commands/DeleteCommandTest.java rename to src/test/java/seedu/revision/logic/commands/DeleteCommandTest.java index 6d08dda35a8..cc05aa71c64 100644 --- a/src/test/java/seedu/address/logic/commands/DeleteCommandTest.java +++ b/src/test/java/seedu/revision/logic/commands/DeleteCommandTest.java @@ -1,22 +1,22 @@ -package seedu.address.logic.commands; +package seedu.revision.logic.commands; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure; -import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess; -import static seedu.address.logic.commands.CommandTestUtil.showAnswerableAtIndex; -import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_ANSWERABLE; -import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_ANSWERABLE; -import static seedu.address.testutil.TypicalAnswerables.getTypicalAddressBook; +import static seedu.revision.logic.commands.CommandTestUtil.assertCommandFailure; +import static seedu.revision.logic.commands.CommandTestUtil.assertCommandSuccess; +import static seedu.revision.logic.commands.CommandTestUtil.showAnswerableAtIndex; +import static seedu.revision.testutil.TypicalIndexes.INDEX_FIRST_ANSWERABLE; +import static seedu.revision.testutil.TypicalIndexes.INDEX_SECOND_ANSWERABLE; +import static seedu.revision.testutil.TypicalAnswerables.getTypicalAddressBook; import org.junit.jupiter.api.Test; -import seedu.address.commons.core.Messages; -import seedu.address.commons.core.index.Index; -import seedu.address.model.Model; -import seedu.address.model.ModelManager; -import seedu.address.model.UserPrefs; -import seedu.address.model.answerable.Answerable; +import seedu.revision.commons.core.Messages; +import seedu.revision.commons.core.index.Index; +import seedu.revision.model.Model; +import seedu.revision.model.ModelManager; +import seedu.revision.model.UserPrefs; +import seedu.revision.model.answerable.Answerable; /** * Contains integration tests (interaction with the Model, UndoCommand and RedoCommand) and unit tests for @@ -68,7 +68,7 @@ public void execute_invalidIndexFilteredList_throwsCommandException() { showAnswerableAtIndex(model, INDEX_FIRST_ANSWERABLE); Index outOfBoundIndex = INDEX_SECOND_ANSWERABLE; - // ensures that outOfBoundIndex is still in bounds of address book list + // ensures that outOfBoundIndex is still in bounds of revision tool list assertTrue(outOfBoundIndex.getZeroBased() < model.getAddressBook().getAnswerableList().size()); DeleteCommand deleteCommand = new DeleteCommand(outOfBoundIndex); diff --git a/src/test/java/seedu/address/logic/commands/EditAnswerableDescriptorTest.java b/src/test/java/seedu/revision/logic/commands/EditAnswerableDescriptorTest.java similarity index 72% rename from src/test/java/seedu/address/logic/commands/EditAnswerableDescriptorTest.java rename to src/test/java/seedu/revision/logic/commands/EditAnswerableDescriptorTest.java index 3212db538f5..b42837991e5 100644 --- a/src/test/java/seedu/address/logic/commands/EditAnswerableDescriptorTest.java +++ b/src/test/java/seedu/revision/logic/commands/EditAnswerableDescriptorTest.java @@ -1,17 +1,17 @@ -package seedu.address.logic.commands; +package seedu.revision.logic.commands; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -import static seedu.address.logic.commands.CommandTestUtil.DESC_ALPHA; -import static seedu.address.logic.commands.CommandTestUtil.DESC_BETA; -import static seedu.address.logic.commands.CommandTestUtil.VALID_QUESTION_BETA; -import static seedu.address.logic.commands.CommandTestUtil.VALID_DIFFICULTY_BETA; -import static seedu.address.logic.commands.CommandTestUtil.VALID_CATEGORY_GREENFIELD; +import static seedu.revision.logic.commands.CommandTestUtil.DESC_ALPHA; +import static seedu.revision.logic.commands.CommandTestUtil.DESC_BETA; +import static seedu.revision.logic.commands.CommandTestUtil.VALID_QUESTION_BETA; +import static seedu.revision.logic.commands.CommandTestUtil.VALID_DIFFICULTY_BETA; +import static seedu.revision.logic.commands.CommandTestUtil.VALID_CATEGORY_GREENFIELD; import org.junit.jupiter.api.Test; -import seedu.address.logic.commands.EditCommand.EditAnswerableDescriptor; -import seedu.address.testutil.EditAnswerableDescriptorBuilder; +import seedu.revision.logic.commands.EditCommand.EditAnswerableDescriptor; +import seedu.revision.testutil.EditAnswerableDescriptorBuilder; public class EditAnswerableDescriptorTest { diff --git a/src/test/java/seedu/address/logic/commands/EditCommandTest.java b/src/test/java/seedu/revision/logic/commands/EditCommandTest.java similarity index 82% rename from src/test/java/seedu/address/logic/commands/EditCommandTest.java rename to src/test/java/seedu/revision/logic/commands/EditCommandTest.java index 86d7929be7d..88b4579ac3d 100644 --- a/src/test/java/seedu/address/logic/commands/EditCommandTest.java +++ b/src/test/java/seedu/revision/logic/commands/EditCommandTest.java @@ -1,31 +1,31 @@ -package seedu.address.logic.commands; +package seedu.revision.logic.commands; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -import static seedu.address.logic.commands.CommandTestUtil.DESC_ALPHA; -import static seedu.address.logic.commands.CommandTestUtil.DESC_BETA; -import static seedu.address.logic.commands.CommandTestUtil.VALID_QUESTION_BETA; -import static seedu.address.logic.commands.CommandTestUtil.VALID_DIFFICULTY_BETA; -import static seedu.address.logic.commands.CommandTestUtil.VALID_CATEGORY_GREENFIELD; -import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure; -import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess; -import static seedu.address.logic.commands.CommandTestUtil.showAnswerableAtIndex; -import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_ANSWERABLE; -import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_ANSWERABLE; -import static seedu.address.testutil.TypicalAnswerables.getTypicalAddressBook; +import static seedu.revision.logic.commands.CommandTestUtil.DESC_ALPHA; +import static seedu.revision.logic.commands.CommandTestUtil.DESC_BETA; +import static seedu.revision.logic.commands.CommandTestUtil.VALID_QUESTION_BETA; +import static seedu.revision.logic.commands.CommandTestUtil.VALID_DIFFICULTY_BETA; +import static seedu.revision.logic.commands.CommandTestUtil.VALID_CATEGORY_GREENFIELD; +import static seedu.revision.logic.commands.CommandTestUtil.assertCommandFailure; +import static seedu.revision.logic.commands.CommandTestUtil.assertCommandSuccess; +import static seedu.revision.logic.commands.CommandTestUtil.showAnswerableAtIndex; +import static seedu.revision.testutil.TypicalIndexes.INDEX_FIRST_ANSWERABLE; +import static seedu.revision.testutil.TypicalIndexes.INDEX_SECOND_ANSWERABLE; +import static seedu.revision.testutil.TypicalAnswerables.getTypicalAddressBook; import org.junit.jupiter.api.Test; -import seedu.address.commons.core.Messages; -import seedu.address.commons.core.index.Index; -import seedu.address.logic.commands.EditCommand.EditAnswerableDescriptor; -import seedu.address.model.AddressBook; -import seedu.address.model.Model; -import seedu.address.model.ModelManager; -import seedu.address.model.UserPrefs; -import seedu.address.model.answerable.Answerable; -import seedu.address.testutil.EditAnswerableDescriptorBuilder; -import seedu.address.testutil.AnswerableBuilder; +import seedu.revision.commons.core.Messages; +import seedu.revision.commons.core.index.Index; +import seedu.revision.logic.commands.EditCommand.EditAnswerableDescriptor; +import seedu.revision.model.AddressBook; +import seedu.revision.model.Model; +import seedu.revision.model.ModelManager; +import seedu.revision.model.UserPrefs; +import seedu.revision.model.answerable.Answerable; +import seedu.revision.testutil.EditAnswerableDescriptorBuilder; +import seedu.revision.testutil.AnswerableBuilder; /** * Contains integration tests (interaction with the Model, UndoCommand and RedoCommand) and unit tests for EditCommand. @@ -111,7 +111,7 @@ public void execute_duplicateAnswerableUnfilteredList_failure() { public void execute_duplicateAnswerableFilteredList_failure() { showAnswerableAtIndex(model, INDEX_FIRST_ANSWERABLE); - // edit answerable in filtered list into a duplicate in address book + // edit answerable in filtered list into a duplicate in revision tool Answerable answerableInList = model.getAddressBook().getAnswerableList().get(INDEX_SECOND_ANSWERABLE.getZeroBased()); EditCommand editCommand = new EditCommand(INDEX_FIRST_ANSWERABLE, new EditAnswerableDescriptorBuilder(answerableInList).build()); @@ -130,13 +130,13 @@ public void execute_invalidAnswerableIndexUnfilteredList_failure() { /** * Edit filtered list where index is larger than size of filtered list, - * but smaller than size of address book + * but smaller than size of revision tool */ @Test public void execute_invalidAnswerableIndexFilteredList_failure() { showAnswerableAtIndex(model, INDEX_FIRST_ANSWERABLE); Index outOfBoundIndex = INDEX_SECOND_ANSWERABLE; - // ensures that outOfBoundIndex is still in bounds of address book list + // ensures that outOfBoundIndex is still in bounds of revision tool list assertTrue(outOfBoundIndex.getZeroBased() < model.getAddressBook().getAnswerableList().size()); EditCommand editCommand = new EditCommand(outOfBoundIndex, diff --git a/src/test/java/seedu/address/logic/commands/ExitCommandTest.java b/src/test/java/seedu/revision/logic/commands/ExitCommandTest.java similarity index 60% rename from src/test/java/seedu/address/logic/commands/ExitCommandTest.java rename to src/test/java/seedu/revision/logic/commands/ExitCommandTest.java index 9533c473875..5236a178fb3 100644 --- a/src/test/java/seedu/address/logic/commands/ExitCommandTest.java +++ b/src/test/java/seedu/revision/logic/commands/ExitCommandTest.java @@ -1,12 +1,12 @@ -package seedu.address.logic.commands; +package seedu.revision.logic.commands; -import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess; -import static seedu.address.logic.commands.ExitCommand.MESSAGE_EXIT_ACKNOWLEDGEMENT; +import static seedu.revision.logic.commands.CommandTestUtil.assertCommandSuccess; +import static seedu.revision.logic.commands.ExitCommand.MESSAGE_EXIT_ACKNOWLEDGEMENT; import org.junit.jupiter.api.Test; -import seedu.address.model.Model; -import seedu.address.model.ModelManager; +import seedu.revision.model.Model; +import seedu.revision.model.ModelManager; public class ExitCommandTest { private Model model = new ModelManager(); diff --git a/src/test/java/seedu/address/logic/commands/FindCommandTest.java b/src/test/java/seedu/revision/logic/commands/FindCommandTest.java similarity index 81% rename from src/test/java/seedu/address/logic/commands/FindCommandTest.java rename to src/test/java/seedu/revision/logic/commands/FindCommandTest.java index 0ad1fb83b5e..8425cf2a687 100644 --- a/src/test/java/seedu/address/logic/commands/FindCommandTest.java +++ b/src/test/java/seedu/revision/logic/commands/FindCommandTest.java @@ -1,24 +1,24 @@ -package seedu.address.logic.commands; +package seedu.revision.logic.commands; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -import static seedu.address.commons.core.Messages.MESSAGE_ANSWERABLES_LISTED_OVERVIEW; -import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess; -import static seedu.address.testutil.TypicalAnswerables.C_ANSWERABLE; -import static seedu.address.testutil.TypicalAnswerables.E_ANSWERABLE; -import static seedu.address.testutil.TypicalAnswerables.F_ANSWERABLE; -import static seedu.address.testutil.TypicalAnswerables.getTypicalAddressBook; +import static seedu.revision.commons.core.Messages.MESSAGE_ANSWERABLES_LISTED_OVERVIEW; +import static seedu.revision.logic.commands.CommandTestUtil.assertCommandSuccess; +import static seedu.revision.testutil.TypicalAnswerables.C_ANSWERABLE; +import static seedu.revision.testutil.TypicalAnswerables.E_ANSWERABLE; +import static seedu.revision.testutil.TypicalAnswerables.F_ANSWERABLE; +import static seedu.revision.testutil.TypicalAnswerables.getTypicalAddressBook; import java.util.Arrays; import java.util.Collections; import org.junit.jupiter.api.Test; -import seedu.address.model.Model; -import seedu.address.model.ModelManager; -import seedu.address.model.UserPrefs; -import seedu.address.model.answerable.predicates.QuestionContainsKeywordsPredicate; +import seedu.revision.model.Model; +import seedu.revision.model.ModelManager; +import seedu.revision.model.UserPrefs; +import seedu.revision.model.answerable.predicates.QuestionContainsKeywordsPredicate; /** * Contains integration tests (interaction with the Model) for {@code FindCommand}. diff --git a/src/test/java/seedu/address/logic/commands/HelpCommandTest.java b/src/test/java/seedu/revision/logic/commands/HelpCommandTest.java similarity index 60% rename from src/test/java/seedu/address/logic/commands/HelpCommandTest.java rename to src/test/java/seedu/revision/logic/commands/HelpCommandTest.java index 4904fc4352e..0c4c5675ff8 100644 --- a/src/test/java/seedu/address/logic/commands/HelpCommandTest.java +++ b/src/test/java/seedu/revision/logic/commands/HelpCommandTest.java @@ -1,12 +1,12 @@ -package seedu.address.logic.commands; +package seedu.revision.logic.commands; -import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess; -import static seedu.address.logic.commands.HelpCommand.SHOWING_HELP_MESSAGE; +import static seedu.revision.logic.commands.CommandTestUtil.assertCommandSuccess; +import static seedu.revision.logic.commands.HelpCommand.SHOWING_HELP_MESSAGE; import org.junit.jupiter.api.Test; -import seedu.address.model.Model; -import seedu.address.model.ModelManager; +import seedu.revision.model.Model; +import seedu.revision.model.ModelManager; public class HelpCommandTest { private Model model = new ModelManager(); diff --git a/src/test/java/seedu/address/logic/commands/ListCommandTest.java b/src/test/java/seedu/revision/logic/commands/ListCommandTest.java similarity index 63% rename from src/test/java/seedu/address/logic/commands/ListCommandTest.java rename to src/test/java/seedu/revision/logic/commands/ListCommandTest.java index 33fb4eb6546..200ed384040 100644 --- a/src/test/java/seedu/address/logic/commands/ListCommandTest.java +++ b/src/test/java/seedu/revision/logic/commands/ListCommandTest.java @@ -1,20 +1,20 @@ -package seedu.address.logic.commands; +package seedu.revision.logic.commands; -import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess; -import static seedu.address.logic.commands.CommandTestUtil.showAnswerableAtIndex; -import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_ANSWERABLE; -import static seedu.address.testutil.TypicalAnswerables.getTypicalAddressBook; +import static seedu.revision.logic.commands.CommandTestUtil.assertCommandSuccess; +import static seedu.revision.logic.commands.CommandTestUtil.showAnswerableAtIndex; +import static seedu.revision.testutil.TypicalIndexes.INDEX_FIRST_ANSWERABLE; +import static seedu.revision.testutil.TypicalAnswerables.getTypicalAddressBook; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import seedu.address.model.Model; -import seedu.address.model.ModelManager; -import seedu.address.model.UserPrefs; -import seedu.address.model.answerable.Difficulty; -import seedu.address.model.answerable.predicates.CategoryPredicate; -import seedu.address.model.answerable.predicates.DifficultyPredicate; -import seedu.address.model.category.Category; +import seedu.revision.model.Model; +import seedu.revision.model.ModelManager; +import seedu.revision.model.UserPrefs; +import seedu.revision.model.answerable.Difficulty; +import seedu.revision.model.answerable.predicates.CategoryPredicate; +import seedu.revision.model.answerable.predicates.DifficultyPredicate; +import seedu.revision.model.category.Category; /** * Contains integration tests (interaction with the Model) and unit tests for ListCommand. diff --git a/src/test/java/seedu/address/logic/parser/AddCommandParserTest.java b/src/test/java/seedu/revision/logic/parser/AddCommandParserTest.java similarity index 59% rename from src/test/java/seedu/address/logic/parser/AddCommandParserTest.java rename to src/test/java/seedu/revision/logic/parser/AddCommandParserTest.java index fec34ada8a6..696e0e6aeca 100644 --- a/src/test/java/seedu/address/logic/parser/AddCommandParserTest.java +++ b/src/test/java/seedu/revision/logic/parser/AddCommandParserTest.java @@ -1,34 +1,34 @@ -package seedu.address.logic.parser; - -import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; -import static seedu.address.logic.commands.CommandTestUtil.CORRECT_ANSWER_DESC; -import static seedu.address.logic.commands.CommandTestUtil.INVALID_QUESTION_DESC; -import static seedu.address.logic.commands.CommandTestUtil.INVALID_DIFFICULTY_DESC; -import static seedu.address.logic.commands.CommandTestUtil.QUESTION_DESC_AMY; -import static seedu.address.logic.commands.CommandTestUtil.QUESTION_DESC_BETA; -import static seedu.address.logic.commands.CommandTestUtil.DIFFICULTY_DESC_ALPHA; -import static seedu.address.logic.commands.CommandTestUtil.DIFFICULTY_DESC_BETA; -import static seedu.address.logic.commands.CommandTestUtil.PREAMBLE_NON_EMPTY; -import static seedu.address.logic.commands.CommandTestUtil.PREAMBLE_WHITESPACE; -import static seedu.address.logic.commands.CommandTestUtil.QUESTION_TYPE_MCQ; -import static seedu.address.logic.commands.CommandTestUtil.CATEGORY_DESC_UML; -import static seedu.address.logic.commands.CommandTestUtil.CATEGORY_DESC_GREENFIELD; -import static seedu.address.logic.commands.CommandTestUtil.VALID_QUESTION_BETA; -import static seedu.address.logic.commands.CommandTestUtil.VALID_DIFFICULTY_BETA; -import static seedu.address.logic.commands.CommandTestUtil.VALID_CATEGORY_UML; -import static seedu.address.logic.commands.CommandTestUtil.VALID_CATEGORY_GREENFIELD; -import static seedu.address.logic.commands.CommandTestUtil.WRONG_ANSWER_DESC; -import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure; -import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess; -import static seedu.address.testutil.TypicalAnswerables.BETA; +package seedu.revision.logic.parser; + +import static seedu.revision.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.revision.logic.commands.CommandTestUtil.CORRECT_ANSWER_DESC; +import static seedu.revision.logic.commands.CommandTestUtil.INVALID_QUESTION_DESC; +import static seedu.revision.logic.commands.CommandTestUtil.INVALID_DIFFICULTY_DESC; +import static seedu.revision.logic.commands.CommandTestUtil.QUESTION_DESC_AMY; +import static seedu.revision.logic.commands.CommandTestUtil.QUESTION_DESC_BETA; +import static seedu.revision.logic.commands.CommandTestUtil.DIFFICULTY_DESC_ALPHA; +import static seedu.revision.logic.commands.CommandTestUtil.DIFFICULTY_DESC_BETA; +import static seedu.revision.logic.commands.CommandTestUtil.PREAMBLE_NON_EMPTY; +import static seedu.revision.logic.commands.CommandTestUtil.PREAMBLE_WHITESPACE; +import static seedu.revision.logic.commands.CommandTestUtil.QUESTION_TYPE_MCQ; +import static seedu.revision.logic.commands.CommandTestUtil.CATEGORY_DESC_UML; +import static seedu.revision.logic.commands.CommandTestUtil.CATEGORY_DESC_GREENFIELD; +import static seedu.revision.logic.commands.CommandTestUtil.VALID_QUESTION_BETA; +import static seedu.revision.logic.commands.CommandTestUtil.VALID_DIFFICULTY_BETA; +import static seedu.revision.logic.commands.CommandTestUtil.VALID_CATEGORY_UML; +import static seedu.revision.logic.commands.CommandTestUtil.VALID_CATEGORY_GREENFIELD; +import static seedu.revision.logic.commands.CommandTestUtil.WRONG_ANSWER_DESC; +import static seedu.revision.logic.parser.CommandParserTestUtil.assertParseFailure; +import static seedu.revision.logic.parser.CommandParserTestUtil.assertParseSuccess; +import static seedu.revision.testutil.TypicalAnswerables.BETA; import org.junit.jupiter.api.Test; -import seedu.address.logic.commands.AddCommand; -import seedu.address.model.answerable.Answerable; -import seedu.address.model.answerable.Difficulty; -import seedu.address.model.answerable.Question; -import seedu.address.testutil.AnswerableBuilder; +import seedu.revision.logic.commands.AddCommand; +import seedu.revision.model.answerable.Answerable; +import seedu.revision.model.answerable.Difficulty; +import seedu.revision.model.answerable.Question; +import seedu.revision.testutil.AnswerableBuilder; public class AddCommandParserTest { private AddCommandParser parser = new AddCommandParser(); @@ -52,11 +52,7 @@ public void parse_allFieldsPresent_success() { assertParseSuccess(parser, QUESTION_TYPE_MCQ + QUESTION_DESC_BETA + DIFFICULTY_DESC_ALPHA + DIFFICULTY_DESC_BETA + CORRECT_ANSWER_DESC + WRONG_ANSWER_DESC + CATEGORY_DESC_UML, new AddCommand(expectedAnswerable)); - // multiple addresses - last address accepted - assertParseSuccess(parser, QUESTION_TYPE_MCQ + QUESTION_DESC_BETA + DIFFICULTY_DESC_BETA - + CORRECT_ANSWER_DESC + WRONG_ANSWER_DESC + CATEGORY_DESC_UML, new AddCommand(expectedAnswerable)); - - // multiple tags - all accepted + // multiple categories - all accepted Answerable expectedAnswerableMultipleTags = new AnswerableBuilder(BETA).withCategories(VALID_CATEGORY_UML, VALID_CATEGORY_GREENFIELD) .build(); assertParseSuccess(parser, QUESTION_TYPE_MCQ + QUESTION_DESC_BETA + DIFFICULTY_DESC_BETA diff --git a/src/test/java/seedu/address/logic/parser/AddressBookParserTest.java b/src/test/java/seedu/revision/logic/parser/AddressBookParserTest.java similarity index 75% rename from src/test/java/seedu/address/logic/parser/AddressBookParserTest.java rename to src/test/java/seedu/revision/logic/parser/AddressBookParserTest.java index 264d5d6c583..79bc765c6f3 100644 --- a/src/test/java/seedu/address/logic/parser/AddressBookParserTest.java +++ b/src/test/java/seedu/revision/logic/parser/AddressBookParserTest.java @@ -1,11 +1,11 @@ -package seedu.address.logic.parser; +package seedu.revision.logic.parser; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; -import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND; -import static seedu.address.testutil.Assert.assertThrows; -import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_ANSWERABLE; +import static seedu.revision.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.revision.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND; +import static seedu.revision.testutil.Assert.assertThrows; +import static seedu.revision.testutil.TypicalIndexes.INDEX_FIRST_ANSWERABLE; import java.util.Arrays; import java.util.List; @@ -13,20 +13,20 @@ import org.junit.jupiter.api.Test; -import seedu.address.logic.commands.AddCommand; -import seedu.address.logic.commands.ClearCommand; -import seedu.address.logic.commands.DeleteCommand; -import seedu.address.logic.commands.EditCommand; -import seedu.address.logic.commands.ExitCommand; -import seedu.address.logic.commands.FindCommand; -import seedu.address.logic.commands.HelpCommand; -import seedu.address.logic.commands.ListCommand; -import seedu.address.logic.parser.exceptions.ParseException; -import seedu.address.model.answerable.Answerable; -import seedu.address.model.answerable.predicates.QuestionContainsKeywordsPredicate; -import seedu.address.testutil.EditAnswerableDescriptorBuilder; -import seedu.address.testutil.AnswerableBuilder; -import seedu.address.testutil.AnswerableUtil; +import seedu.revision.logic.commands.AddCommand; +import seedu.revision.logic.commands.ClearCommand; +import seedu.revision.logic.commands.DeleteCommand; +import seedu.revision.logic.commands.EditCommand; +import seedu.revision.logic.commands.ExitCommand; +import seedu.revision.logic.commands.FindCommand; +import seedu.revision.logic.commands.HelpCommand; +import seedu.revision.logic.commands.ListCommand; +import seedu.revision.logic.parser.exceptions.ParseException; +import seedu.revision.model.answerable.Answerable; +import seedu.revision.model.answerable.predicates.QuestionContainsKeywordsPredicate; +import seedu.revision.testutil.EditAnswerableDescriptorBuilder; +import seedu.revision.testutil.AnswerableBuilder; +import seedu.revision.testutil.AnswerableUtil; public class AddressBookParserTest { diff --git a/src/test/java/seedu/address/logic/parser/ArgumentTokenizerTest.java b/src/test/java/seedu/revision/logic/parser/ArgumentTokenizerTest.java similarity index 99% rename from src/test/java/seedu/address/logic/parser/ArgumentTokenizerTest.java rename to src/test/java/seedu/revision/logic/parser/ArgumentTokenizerTest.java index b672a16d1a9..512d24df069 100644 --- a/src/test/java/seedu/address/logic/parser/ArgumentTokenizerTest.java +++ b/src/test/java/seedu/revision/logic/parser/ArgumentTokenizerTest.java @@ -1,4 +1,4 @@ -package seedu.address.logic.parser; +package seedu.revision.logic.parser; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; diff --git a/src/test/java/seedu/address/logic/parser/CommandParserTestUtil.java b/src/test/java/seedu/revision/logic/parser/CommandParserTestUtil.java similarity index 89% rename from src/test/java/seedu/address/logic/parser/CommandParserTestUtil.java rename to src/test/java/seedu/revision/logic/parser/CommandParserTestUtil.java index e4c33515768..eb03776fec4 100644 --- a/src/test/java/seedu/address/logic/parser/CommandParserTestUtil.java +++ b/src/test/java/seedu/revision/logic/parser/CommandParserTestUtil.java @@ -1,9 +1,9 @@ -package seedu.address.logic.parser; +package seedu.revision.logic.parser; import static org.junit.jupiter.api.Assertions.assertEquals; -import seedu.address.logic.commands.Command; -import seedu.address.logic.parser.exceptions.ParseException; +import seedu.revision.logic.commands.Command; +import seedu.revision.logic.parser.exceptions.ParseException; /** * Contains helper methods for testing command parsers. diff --git a/src/test/java/seedu/address/logic/parser/DeleteCommandParserTest.java b/src/test/java/seedu/revision/logic/parser/DeleteCommandParserTest.java similarity index 68% rename from src/test/java/seedu/address/logic/parser/DeleteCommandParserTest.java rename to src/test/java/seedu/revision/logic/parser/DeleteCommandParserTest.java index 6f28dcb336f..b319689ecd8 100644 --- a/src/test/java/seedu/address/logic/parser/DeleteCommandParserTest.java +++ b/src/test/java/seedu/revision/logic/parser/DeleteCommandParserTest.java @@ -1,13 +1,13 @@ -package seedu.address.logic.parser; +package seedu.revision.logic.parser; -import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; -import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure; -import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess; -import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_ANSWERABLE; +import static seedu.revision.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.revision.logic.parser.CommandParserTestUtil.assertParseFailure; +import static seedu.revision.logic.parser.CommandParserTestUtil.assertParseSuccess; +import static seedu.revision.testutil.TypicalIndexes.INDEX_FIRST_ANSWERABLE; import org.junit.jupiter.api.Test; -import seedu.address.logic.commands.DeleteCommand; +import seedu.revision.logic.commands.DeleteCommand; /** * As we are only doing white-box testing, our test cases do not cover path variations diff --git a/src/test/java/seedu/address/logic/parser/EditCommandParserTest.java b/src/test/java/seedu/revision/logic/parser/EditCommandParserTest.java similarity index 74% rename from src/test/java/seedu/address/logic/parser/EditCommandParserTest.java rename to src/test/java/seedu/revision/logic/parser/EditCommandParserTest.java index 4a1e4cf52c3..caff5cf0738 100644 --- a/src/test/java/seedu/address/logic/parser/EditCommandParserTest.java +++ b/src/test/java/seedu/revision/logic/parser/EditCommandParserTest.java @@ -1,39 +1,39 @@ -package seedu.address.logic.parser; - -import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; -import static seedu.address.logic.commands.CommandTestUtil.CORRECT_ANSWER_DESC; -import static seedu.address.logic.commands.CommandTestUtil.INVALID_QUESTION_DESC; -import static seedu.address.logic.commands.CommandTestUtil.INVALID_DIFFICULTY_DESC; -import static seedu.address.logic.commands.CommandTestUtil.INVALID_CATEGORY_DESC; -import static seedu.address.logic.commands.CommandTestUtil.QUESTION_DESC_AMY; -import static seedu.address.logic.commands.CommandTestUtil.DIFFICULTY_DESC_ALPHA; -import static seedu.address.logic.commands.CommandTestUtil.DIFFICULTY_DESC_BETA; -import static seedu.address.logic.commands.CommandTestUtil.QUESTION_TYPE_MCQ; -import static seedu.address.logic.commands.CommandTestUtil.CATEGORY_DESC_UML; -import static seedu.address.logic.commands.CommandTestUtil.CATEGORY_DESC_GREENFIELD; -import static seedu.address.logic.commands.CommandTestUtil.VALID_CATEGORY_ALPHA; -import static seedu.address.logic.commands.CommandTestUtil.VALID_QUESTION_ALPHA; -import static seedu.address.logic.commands.CommandTestUtil.VALID_DIFFICULTY_ALPHA; -import static seedu.address.logic.commands.CommandTestUtil.VALID_DIFFICULTY_BETA; -import static seedu.address.logic.commands.CommandTestUtil.VALID_CATEGORY_UML; -import static seedu.address.logic.commands.CommandTestUtil.VALID_CATEGORY_GREENFIELD; -import static seedu.address.logic.commands.CommandTestUtil.WRONG_ANSWER_DESC; -import static seedu.address.logic.parser.CliSyntax.PREFIX_CATEGORY; -import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure; -import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess; -import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_ANSWERABLE; -import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_ANSWERABLE; -import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_ANSWERABLE; +package seedu.revision.logic.parser; + +import static seedu.revision.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.revision.logic.commands.CommandTestUtil.CORRECT_ANSWER_DESC; +import static seedu.revision.logic.commands.CommandTestUtil.INVALID_QUESTION_DESC; +import static seedu.revision.logic.commands.CommandTestUtil.INVALID_DIFFICULTY_DESC; +import static seedu.revision.logic.commands.CommandTestUtil.INVALID_CATEGORY_DESC; +import static seedu.revision.logic.commands.CommandTestUtil.QUESTION_DESC_AMY; +import static seedu.revision.logic.commands.CommandTestUtil.DIFFICULTY_DESC_ALPHA; +import static seedu.revision.logic.commands.CommandTestUtil.DIFFICULTY_DESC_BETA; +import static seedu.revision.logic.commands.CommandTestUtil.QUESTION_TYPE_MCQ; +import static seedu.revision.logic.commands.CommandTestUtil.CATEGORY_DESC_UML; +import static seedu.revision.logic.commands.CommandTestUtil.CATEGORY_DESC_GREENFIELD; +import static seedu.revision.logic.commands.CommandTestUtil.VALID_CATEGORY_ALPHA; +import static seedu.revision.logic.commands.CommandTestUtil.VALID_QUESTION_ALPHA; +import static seedu.revision.logic.commands.CommandTestUtil.VALID_DIFFICULTY_ALPHA; +import static seedu.revision.logic.commands.CommandTestUtil.VALID_DIFFICULTY_BETA; +import static seedu.revision.logic.commands.CommandTestUtil.VALID_CATEGORY_UML; +import static seedu.revision.logic.commands.CommandTestUtil.VALID_CATEGORY_GREENFIELD; +import static seedu.revision.logic.commands.CommandTestUtil.WRONG_ANSWER_DESC; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_CATEGORY; +import static seedu.revision.logic.parser.CommandParserTestUtil.assertParseFailure; +import static seedu.revision.logic.parser.CommandParserTestUtil.assertParseSuccess; +import static seedu.revision.testutil.TypicalIndexes.INDEX_FIRST_ANSWERABLE; +import static seedu.revision.testutil.TypicalIndexes.INDEX_SECOND_ANSWERABLE; +import static seedu.revision.testutil.TypicalIndexes.INDEX_THIRD_ANSWERABLE; import org.junit.jupiter.api.Test; -import seedu.address.commons.core.index.Index; -import seedu.address.logic.commands.EditCommand; -import seedu.address.logic.commands.EditCommand.EditAnswerableDescriptor; -import seedu.address.model.answerable.Difficulty; -import seedu.address.model.answerable.Question; -import seedu.address.model.category.Category; -import seedu.address.testutil.EditAnswerableDescriptorBuilder; +import seedu.revision.commons.core.index.Index; +import seedu.revision.logic.commands.EditCommand; +import seedu.revision.logic.commands.EditCommand.EditAnswerableDescriptor; +import seedu.revision.model.answerable.Difficulty; +import seedu.revision.model.answerable.Question; +import seedu.revision.model.category.Category; +import seedu.revision.testutil.EditAnswerableDescriptorBuilder; public class EditCommandParserTest { diff --git a/src/test/java/seedu/address/logic/parser/FindCommandParserTest.java b/src/test/java/seedu/revision/logic/parser/FindCommandParserTest.java similarity index 66% rename from src/test/java/seedu/address/logic/parser/FindCommandParserTest.java rename to src/test/java/seedu/revision/logic/parser/FindCommandParserTest.java index 49acf7ba32a..1f269a95d4e 100644 --- a/src/test/java/seedu/address/logic/parser/FindCommandParserTest.java +++ b/src/test/java/seedu/revision/logic/parser/FindCommandParserTest.java @@ -1,15 +1,15 @@ -package seedu.address.logic.parser; +package seedu.revision.logic.parser; -import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; -import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure; -import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess; +import static seedu.revision.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.revision.logic.parser.CommandParserTestUtil.assertParseFailure; +import static seedu.revision.logic.parser.CommandParserTestUtil.assertParseSuccess; import java.util.Arrays; import org.junit.jupiter.api.Test; -import seedu.address.logic.commands.FindCommand; -import seedu.address.model.answerable.predicates.QuestionContainsKeywordsPredicate; +import seedu.revision.logic.commands.FindCommand; +import seedu.revision.model.answerable.predicates.QuestionContainsKeywordsPredicate; public class FindCommandParserTest { diff --git a/src/test/java/seedu/address/logic/parser/ParserUtilTest.java b/src/test/java/seedu/revision/logic/parser/ParserUtilTest.java similarity index 92% rename from src/test/java/seedu/address/logic/parser/ParserUtilTest.java rename to src/test/java/seedu/revision/logic/parser/ParserUtilTest.java index 7458a76643f..284c10a41c9 100644 --- a/src/test/java/seedu/address/logic/parser/ParserUtilTest.java +++ b/src/test/java/seedu/revision/logic/parser/ParserUtilTest.java @@ -1,10 +1,10 @@ -package seedu.address.logic.parser; +package seedu.revision.logic.parser; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX; -import static seedu.address.testutil.Assert.assertThrows; -import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_ANSWERABLE; +import static seedu.revision.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX; +import static seedu.revision.testutil.Assert.assertThrows; +import static seedu.revision.testutil.TypicalIndexes.INDEX_FIRST_ANSWERABLE; import java.util.Arrays; import java.util.Collections; @@ -13,10 +13,10 @@ import org.junit.jupiter.api.Test; -import seedu.address.logic.parser.exceptions.ParseException; -import seedu.address.model.category.Category; -import seedu.address.model.answerable.Difficulty; -import seedu.address.model.answerable.Question; +import seedu.revision.logic.parser.exceptions.ParseException; +import seedu.revision.model.category.Category; +import seedu.revision.model.answerable.Difficulty; +import seedu.revision.model.answerable.Question; public class ParserUtilTest { private static final String INVALID_QUESTION = ""; diff --git a/src/test/java/seedu/address/model/AddressBookTest.java b/src/test/java/seedu/revision/model/AddressBookTest.java similarity index 84% rename from src/test/java/seedu/address/model/AddressBookTest.java rename to src/test/java/seedu/revision/model/AddressBookTest.java index 06433912e10..23fff52b246 100644 --- a/src/test/java/seedu/address/model/AddressBookTest.java +++ b/src/test/java/seedu/revision/model/AddressBookTest.java @@ -1,12 +1,12 @@ -package seedu.address.model; +package seedu.revision.model; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -import static seedu.address.logic.commands.CommandTestUtil.VALID_CATEGORY_GREENFIELD; -import static seedu.address.testutil.Assert.assertThrows; -import static seedu.address.testutil.TypicalAnswerables.A_ANSWERABLE; -import static seedu.address.testutil.TypicalAnswerables.getTypicalAddressBook; +import static seedu.revision.logic.commands.CommandTestUtil.VALID_CATEGORY_GREENFIELD; +import static seedu.revision.testutil.Assert.assertThrows; +import static seedu.revision.testutil.TypicalAnswerables.A_ANSWERABLE; +import static seedu.revision.testutil.TypicalAnswerables.getTypicalAddressBook; import java.util.Arrays; import java.util.Collection; @@ -17,9 +17,9 @@ import javafx.collections.FXCollections; import javafx.collections.ObservableList; -import seedu.address.model.answerable.Answerable; -import seedu.address.model.answerable.exceptions.DuplicateAnswerableException; -import seedu.address.testutil.AnswerableBuilder; +import seedu.revision.model.answerable.Answerable; +import seedu.revision.model.answerable.exceptions.DuplicateAnswerableException; +import seedu.revision.testutil.AnswerableBuilder; public class AddressBookTest { diff --git a/src/test/java/seedu/address/model/ModelManagerTest.java b/src/test/java/seedu/revision/model/ModelManagerTest.java similarity index 86% rename from src/test/java/seedu/address/model/ModelManagerTest.java rename to src/test/java/seedu/revision/model/ModelManagerTest.java index 67412e62e7f..3f77b865cef 100644 --- a/src/test/java/seedu/address/model/ModelManagerTest.java +++ b/src/test/java/seedu/revision/model/ModelManagerTest.java @@ -1,12 +1,12 @@ -package seedu.address.model; +package seedu.revision.model; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -import static seedu.address.model.Model.PREDICATE_SHOW_ALL_ANSWERABLE; -import static seedu.address.testutil.Assert.assertThrows; -import static seedu.address.testutil.TypicalAnswerables.A_ANSWERABLE; -import static seedu.address.testutil.TypicalAnswerables.B_ANSWERABLE; +import static seedu.revision.model.Model.PREDICATE_SHOW_ALL_ANSWERABLE; +import static seedu.revision.testutil.Assert.assertThrows; +import static seedu.revision.testutil.TypicalAnswerables.A_ANSWERABLE; +import static seedu.revision.testutil.TypicalAnswerables.B_ANSWERABLE; import java.nio.file.Path; import java.nio.file.Paths; @@ -14,9 +14,9 @@ import org.junit.jupiter.api.Test; -import seedu.address.commons.core.GuiSettings; -import seedu.address.model.answerable.predicates.QuestionContainsKeywordsPredicate; -import seedu.address.testutil.AddressBookBuilder; +import seedu.revision.commons.core.GuiSettings; +import seedu.revision.model.answerable.predicates.QuestionContainsKeywordsPredicate; +import seedu.revision.testutil.AddressBookBuilder; public class ModelManagerTest { @@ -37,14 +37,14 @@ public void setUserPrefs_nullUserPrefs_throwsNullPointerException() { @Test public void setUserPrefs_validUserPrefs_copiesUserPrefs() { UserPrefs userPrefs = new UserPrefs(); - userPrefs.setAddressBookFilePath(Paths.get("address/book/file/path")); + userPrefs.setAddressBookFilePath(Paths.get("revision/book/file/path")); userPrefs.setGuiSettings(new GuiSettings(1, 2, 3, 4)); modelManager.setUserPrefs(userPrefs); assertEquals(userPrefs, modelManager.getUserPrefs()); // Modifying userPrefs should not modify modelManager's userPrefs UserPrefs oldUserPrefs = new UserPrefs(userPrefs); - userPrefs.setAddressBookFilePath(Paths.get("new/address/book/file/path")); + userPrefs.setAddressBookFilePath(Paths.get("new/revision/book/file/path")); assertEquals(oldUserPrefs, modelManager.getUserPrefs()); } @@ -67,7 +67,7 @@ public void setAddressBookFilePath_nullPath_throwsNullPointerException() { @Test public void setAddressBookFilePath_validPath_setsAddressBookFilePath() { - Path path = Paths.get("address/book/file/path"); + Path path = Paths.get("revision/book/file/path"); modelManager.setAddressBookFilePath(path); assertEquals(path, modelManager.getAddressBookFilePath()); } diff --git a/src/test/java/seedu/address/model/UserPrefsTest.java b/src/test/java/seedu/revision/model/UserPrefsTest.java similarity index 85% rename from src/test/java/seedu/address/model/UserPrefsTest.java rename to src/test/java/seedu/revision/model/UserPrefsTest.java index b1307a70d52..dd29f3be6ce 100644 --- a/src/test/java/seedu/address/model/UserPrefsTest.java +++ b/src/test/java/seedu/revision/model/UserPrefsTest.java @@ -1,6 +1,6 @@ -package seedu.address.model; +package seedu.revision.model; -import static seedu.address.testutil.Assert.assertThrows; +import static seedu.revision.testutil.Assert.assertThrows; import org.junit.jupiter.api.Test; diff --git a/src/test/java/seedu/address/model/answerable/AnswerableTest.java b/src/test/java/seedu/revision/model/answerable/AnswerableTest.java similarity index 83% rename from src/test/java/seedu/address/model/answerable/AnswerableTest.java rename to src/test/java/seedu/revision/model/answerable/AnswerableTest.java index 044ba90523a..d5165f7e7b0 100644 --- a/src/test/java/seedu/address/model/answerable/AnswerableTest.java +++ b/src/test/java/seedu/revision/model/answerable/AnswerableTest.java @@ -1,17 +1,17 @@ -package seedu.address.model.answerable; +package seedu.revision.model.answerable; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -import static seedu.address.logic.commands.CommandTestUtil.VALID_QUESTION_BETA; -import static seedu.address.logic.commands.CommandTestUtil.VALID_DIFFICULTY_BETA; -import static seedu.address.logic.commands.CommandTestUtil.VALID_CATEGORY_GREENFIELD; -import static seedu.address.testutil.Assert.assertThrows; -import static seedu.address.testutil.TypicalAnswerables.A_ANSWERABLE; -import static seedu.address.testutil.TypicalAnswerables.BETA; +import static seedu.revision.logic.commands.CommandTestUtil.VALID_QUESTION_BETA; +import static seedu.revision.logic.commands.CommandTestUtil.VALID_DIFFICULTY_BETA; +import static seedu.revision.logic.commands.CommandTestUtil.VALID_CATEGORY_GREENFIELD; +import static seedu.revision.testutil.Assert.assertThrows; +import static seedu.revision.testutil.TypicalAnswerables.A_ANSWERABLE; +import static seedu.revision.testutil.TypicalAnswerables.BETA; import org.junit.jupiter.api.Test; -import seedu.address.testutil.AnswerableBuilder; +import seedu.revision.testutil.AnswerableBuilder; public class AnswerableTest { diff --git a/src/test/java/seedu/address/model/answerable/DifficultyTest.java b/src/test/java/seedu/revision/model/answerable/DifficultyTest.java similarity index 93% rename from src/test/java/seedu/address/model/answerable/DifficultyTest.java rename to src/test/java/seedu/revision/model/answerable/DifficultyTest.java index 155a35eab36..5207588bf16 100644 --- a/src/test/java/seedu/address/model/answerable/DifficultyTest.java +++ b/src/test/java/seedu/revision/model/answerable/DifficultyTest.java @@ -1,8 +1,8 @@ -package seedu.address.model.answerable; +package seedu.revision.model.answerable; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -import static seedu.address.testutil.Assert.assertThrows; +import static seedu.revision.testutil.Assert.assertThrows; import org.junit.jupiter.api.Test; diff --git a/src/test/java/seedu/address/model/answerable/QuestionContainsKeywordsPredicateTest.java b/src/test/java/seedu/revision/model/answerable/QuestionContainsKeywordsPredicateTest.java similarity index 92% rename from src/test/java/seedu/address/model/answerable/QuestionContainsKeywordsPredicateTest.java rename to src/test/java/seedu/revision/model/answerable/QuestionContainsKeywordsPredicateTest.java index 7609942d19a..939b51b9432 100644 --- a/src/test/java/seedu/address/model/answerable/QuestionContainsKeywordsPredicateTest.java +++ b/src/test/java/seedu/revision/model/answerable/QuestionContainsKeywordsPredicateTest.java @@ -1,4 +1,4 @@ -package seedu.address.model.answerable; +package seedu.revision.model.answerable; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -9,8 +9,8 @@ import org.junit.jupiter.api.Test; -import seedu.address.model.answerable.predicates.QuestionContainsKeywordsPredicate; -import seedu.address.testutil.AnswerableBuilder; +import seedu.revision.model.answerable.predicates.QuestionContainsKeywordsPredicate; +import seedu.revision.testutil.AnswerableBuilder; public class QuestionContainsKeywordsPredicateTest { @@ -68,7 +68,7 @@ public void test_questionDoesNotContainKeywords_returnsFalse() { predicate = new QuestionContainsKeywordsPredicate(Arrays.asList("Carol")); assertFalse(predicate.test(new AnswerableBuilder().withQuestion("Alice Bob").build())); - // Keywords match difficulty and address, but does not match name + // Keywords match difficulty, but does not match name predicate = new QuestionContainsKeywordsPredicate(Arrays.asList("12345", "Main", "Street")); assertFalse(predicate.test(new AnswerableBuilder().withQuestion("Alice").withDifficulty("1").build())); } diff --git a/src/test/java/seedu/address/model/answerable/QuestionTest.java b/src/test/java/seedu/revision/model/answerable/QuestionTest.java similarity index 92% rename from src/test/java/seedu/address/model/answerable/QuestionTest.java rename to src/test/java/seedu/revision/model/answerable/QuestionTest.java index df73144a573..ca20598f4a0 100644 --- a/src/test/java/seedu/address/model/answerable/QuestionTest.java +++ b/src/test/java/seedu/revision/model/answerable/QuestionTest.java @@ -1,8 +1,8 @@ -package seedu.address.model.answerable; +package seedu.revision.model.answerable; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -import static seedu.address.testutil.Assert.assertThrows; +import static seedu.revision.testutil.Assert.assertThrows; import org.junit.jupiter.api.Test; diff --git a/src/test/java/seedu/address/model/answerable/UniqueAnswerableListTest.java b/src/test/java/seedu/revision/model/answerable/UniqueAnswerableListTest.java similarity index 92% rename from src/test/java/seedu/address/model/answerable/UniqueAnswerableListTest.java rename to src/test/java/seedu/revision/model/answerable/UniqueAnswerableListTest.java index de865a9fa9f..51623759df8 100644 --- a/src/test/java/seedu/address/model/answerable/UniqueAnswerableListTest.java +++ b/src/test/java/seedu/revision/model/answerable/UniqueAnswerableListTest.java @@ -1,12 +1,12 @@ -package seedu.address.model.answerable; +package seedu.revision.model.answerable; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -import static seedu.address.logic.commands.CommandTestUtil.VALID_CATEGORY_GREENFIELD; -import static seedu.address.testutil.Assert.assertThrows; -import static seedu.address.testutil.TypicalAnswerables.A_ANSWERABLE; -import static seedu.address.testutil.TypicalAnswerables.BETA; +import static seedu.revision.logic.commands.CommandTestUtil.VALID_CATEGORY_GREENFIELD; +import static seedu.revision.testutil.Assert.assertThrows; +import static seedu.revision.testutil.TypicalAnswerables.A_ANSWERABLE; +import static seedu.revision.testutil.TypicalAnswerables.BETA; import java.util.Arrays; import java.util.Collections; @@ -14,9 +14,9 @@ import org.junit.jupiter.api.Test; -import seedu.address.model.answerable.exceptions.DuplicateAnswerableException; -import seedu.address.model.answerable.exceptions.AnswerableNotFoundException; -import seedu.address.testutil.AnswerableBuilder; +import seedu.revision.model.answerable.exceptions.DuplicateAnswerableException; +import seedu.revision.model.answerable.exceptions.AnswerableNotFoundException; +import seedu.revision.testutil.AnswerableBuilder; public class UniqueAnswerableListTest { diff --git a/src/test/java/seedu/address/model/category/CategoryTest.java b/src/test/java/seedu/revision/model/category/CategoryTest.java similarity index 86% rename from src/test/java/seedu/address/model/category/CategoryTest.java rename to src/test/java/seedu/revision/model/category/CategoryTest.java index 4af51061a0b..bde0d67f133 100644 --- a/src/test/java/seedu/address/model/category/CategoryTest.java +++ b/src/test/java/seedu/revision/model/category/CategoryTest.java @@ -1,6 +1,6 @@ -package seedu.address.model.category; +package seedu.revision.model.category; -import static seedu.address.testutil.Assert.assertThrows; +import static seedu.revision.testutil.Assert.assertThrows; import org.junit.jupiter.api.Test; diff --git a/src/test/java/seedu/address/storage/JsonAdaptedAnswerableTest.java b/src/test/java/seedu/revision/storage/JsonAdaptedAnswerableTest.java similarity index 89% rename from src/test/java/seedu/address/storage/JsonAdaptedAnswerableTest.java rename to src/test/java/seedu/revision/storage/JsonAdaptedAnswerableTest.java index b8d1111e67a..a47fcae3a3d 100644 --- a/src/test/java/seedu/address/storage/JsonAdaptedAnswerableTest.java +++ b/src/test/java/seedu/revision/storage/JsonAdaptedAnswerableTest.java @@ -1,9 +1,9 @@ -package seedu.address.storage; +package seedu.revision.storage; import static org.junit.jupiter.api.Assertions.assertEquals; -import static seedu.address.storage.JsonAdaptedAnswerable.MISSING_FIELD_MESSAGE_FORMAT; -import static seedu.address.testutil.Assert.assertThrows; -import static seedu.address.testutil.TypicalAnswerables.B_ANSWERABLE; +import static seedu.revision.storage.JsonAdaptedAnswerable.MISSING_FIELD_MESSAGE_FORMAT; +import static seedu.revision.testutil.Assert.assertThrows; +import static seedu.revision.testutil.TypicalAnswerables.B_ANSWERABLE; import java.util.ArrayList; import java.util.List; @@ -11,9 +11,9 @@ import org.junit.jupiter.api.Test; -import seedu.address.commons.exceptions.IllegalValueException; -import seedu.address.model.answerable.Difficulty; -import seedu.address.model.answerable.Question; +import seedu.revision.commons.exceptions.IllegalValueException; +import seedu.revision.model.answerable.Difficulty; +import seedu.revision.model.answerable.Question; public class JsonAdaptedAnswerableTest { private static final String INVALID_QUESTION = " "; diff --git a/src/test/java/seedu/address/storage/JsonAddressBookStorageTest.java b/src/test/java/seedu/revision/storage/JsonAddressBookStorageTest.java similarity index 88% rename from src/test/java/seedu/address/storage/JsonAddressBookStorageTest.java rename to src/test/java/seedu/revision/storage/JsonAddressBookStorageTest.java index 83d148ce2b9..17874e42865 100644 --- a/src/test/java/seedu/address/storage/JsonAddressBookStorageTest.java +++ b/src/test/java/seedu/revision/storage/JsonAddressBookStorageTest.java @@ -1,12 +1,12 @@ -package seedu.address.storage; +package seedu.revision.storage; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; -import static seedu.address.testutil.Assert.assertThrows; -import static seedu.address.testutil.TypicalAnswerables.A_ANSWERABLE; -import static seedu.address.testutil.TypicalAnswerables.H_ANSWERABLE; -import static seedu.address.testutil.TypicalAnswerables.I_ANSWERABLE; -import static seedu.address.testutil.TypicalAnswerables.getTypicalAddressBook; +import static seedu.revision.testutil.Assert.assertThrows; +import static seedu.revision.testutil.TypicalAnswerables.A_ANSWERABLE; +import static seedu.revision.testutil.TypicalAnswerables.H_ANSWERABLE; +import static seedu.revision.testutil.TypicalAnswerables.I_ANSWERABLE; +import static seedu.revision.testutil.TypicalAnswerables.getTypicalAddressBook; import java.io.IOException; import java.nio.file.Path; @@ -15,9 +15,9 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; -import seedu.address.commons.exceptions.DataConversionException; -import seedu.address.model.AddressBook; -import seedu.address.model.ReadOnlyAddressBook; +import seedu.revision.commons.exceptions.DataConversionException; +import seedu.revision.model.AddressBook; +import seedu.revision.model.ReadOnlyAddressBook; public class JsonAddressBookStorageTest { private static final Path TEST_DATA_FOLDER = Paths.get("src", "test", "data", "JsonAddressBookStorageTest"); diff --git a/src/test/java/seedu/address/storage/JsonSerializableAddressBookTest.java b/src/test/java/seedu/revision/storage/JsonSerializableAddressBookTest.java similarity index 86% rename from src/test/java/seedu/address/storage/JsonSerializableAddressBookTest.java rename to src/test/java/seedu/revision/storage/JsonSerializableAddressBookTest.java index 27ff71d287c..235f00abf83 100644 --- a/src/test/java/seedu/address/storage/JsonSerializableAddressBookTest.java +++ b/src/test/java/seedu/revision/storage/JsonSerializableAddressBookTest.java @@ -1,17 +1,17 @@ -package seedu.address.storage; +package seedu.revision.storage; import static org.junit.jupiter.api.Assertions.assertEquals; -import static seedu.address.testutil.Assert.assertThrows; +import static seedu.revision.testutil.Assert.assertThrows; import java.nio.file.Path; import java.nio.file.Paths; import org.junit.jupiter.api.Test; -import seedu.address.commons.exceptions.IllegalValueException; -import seedu.address.commons.util.JsonUtil; -import seedu.address.model.AddressBook; -import seedu.address.testutil.TypicalAnswerables; +import seedu.revision.commons.exceptions.IllegalValueException; +import seedu.revision.commons.util.JsonUtil; +import seedu.revision.model.AddressBook; +import seedu.revision.testutil.TypicalAnswerables; public class JsonSerializableAddressBookTest { diff --git a/src/test/java/seedu/address/storage/JsonUserPrefsStorageTest.java b/src/test/java/seedu/revision/storage/JsonUserPrefsStorageTest.java similarity index 94% rename from src/test/java/seedu/address/storage/JsonUserPrefsStorageTest.java rename to src/test/java/seedu/revision/storage/JsonUserPrefsStorageTest.java index 16f33f4a6bb..6879db1eb90 100644 --- a/src/test/java/seedu/address/storage/JsonUserPrefsStorageTest.java +++ b/src/test/java/seedu/revision/storage/JsonUserPrefsStorageTest.java @@ -1,8 +1,8 @@ -package seedu.address.storage; +package seedu.revision.storage; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; -import static seedu.address.testutil.Assert.assertThrows; +import static seedu.revision.testutil.Assert.assertThrows; import java.io.IOException; import java.nio.file.Path; @@ -12,9 +12,9 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; -import seedu.address.commons.core.GuiSettings; -import seedu.address.commons.exceptions.DataConversionException; -import seedu.address.model.UserPrefs; +import seedu.revision.commons.core.GuiSettings; +import seedu.revision.commons.exceptions.DataConversionException; +import seedu.revision.model.UserPrefs; public class JsonUserPrefsStorageTest { diff --git a/src/test/java/seedu/address/storage/StorageManagerTest.java b/src/test/java/seedu/revision/storage/StorageManagerTest.java similarity index 88% rename from src/test/java/seedu/address/storage/StorageManagerTest.java rename to src/test/java/seedu/revision/storage/StorageManagerTest.java index 8bbea9c7972..e8c09a48f62 100644 --- a/src/test/java/seedu/address/storage/StorageManagerTest.java +++ b/src/test/java/seedu/revision/storage/StorageManagerTest.java @@ -1,8 +1,8 @@ -package seedu.address.storage; +package seedu.revision.storage; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; -import static seedu.address.testutil.TypicalAnswerables.getTypicalAddressBook; +import static seedu.revision.testutil.TypicalAnswerables.getTypicalAddressBook; import java.nio.file.Path; @@ -10,10 +10,10 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; -import seedu.address.commons.core.GuiSettings; -import seedu.address.model.AddressBook; -import seedu.address.model.ReadOnlyAddressBook; -import seedu.address.model.UserPrefs; +import seedu.revision.commons.core.GuiSettings; +import seedu.revision.model.AddressBook; +import seedu.revision.model.ReadOnlyAddressBook; +import seedu.revision.model.UserPrefs; public class StorageManagerTest { diff --git a/src/test/java/seedu/address/testutil/AddressBookBuilder.java b/src/test/java/seedu/revision/testutil/AddressBookBuilder.java similarity index 85% rename from src/test/java/seedu/address/testutil/AddressBookBuilder.java rename to src/test/java/seedu/revision/testutil/AddressBookBuilder.java index e3fd240f3b2..4f1fdcfc09a 100644 --- a/src/test/java/seedu/address/testutil/AddressBookBuilder.java +++ b/src/test/java/seedu/revision/testutil/AddressBookBuilder.java @@ -1,7 +1,7 @@ -package seedu.address.testutil; +package seedu.revision.testutil; -import seedu.address.model.AddressBook; -import seedu.address.model.answerable.Answerable; +import seedu.revision.model.AddressBook; +import seedu.revision.model.answerable.Answerable; /** * A utility class to help with building Addressbook objects. diff --git a/src/test/java/seedu/address/testutil/AnswerableBuilder.java b/src/test/java/seedu/revision/testutil/AnswerableBuilder.java similarity index 89% rename from src/test/java/seedu/address/testutil/AnswerableBuilder.java rename to src/test/java/seedu/revision/testutil/AnswerableBuilder.java index fb0ca822847..9eef895b402 100644 --- a/src/test/java/seedu/address/testutil/AnswerableBuilder.java +++ b/src/test/java/seedu/revision/testutil/AnswerableBuilder.java @@ -1,16 +1,16 @@ -package seedu.address.testutil; +package seedu.revision.testutil; import java.util.Arrays; import java.util.HashSet; import java.util.Set; -import seedu.address.model.answerable.Answer; -import seedu.address.model.answerable.Answerable; -import seedu.address.model.category.Category; -import seedu.address.model.answerable.Difficulty; -import seedu.address.model.answerable.Mcq; -import seedu.address.model.answerable.Question; -import seedu.address.model.util.SampleDataUtil; +import seedu.revision.model.answerable.Answer; +import seedu.revision.model.answerable.Answerable; +import seedu.revision.model.category.Category; +import seedu.revision.model.answerable.Difficulty; +import seedu.revision.model.answerable.Mcq; +import seedu.revision.model.answerable.Question; +import seedu.revision.model.util.SampleDataUtil; /** * A utility class to help with building Answerable objects. diff --git a/src/test/java/seedu/address/testutil/AnswerableUtil.java b/src/test/java/seedu/revision/testutil/AnswerableUtil.java similarity index 80% rename from src/test/java/seedu/address/testutil/AnswerableUtil.java rename to src/test/java/seedu/revision/testutil/AnswerableUtil.java index b396975086f..7de729df641 100644 --- a/src/test/java/seedu/address/testutil/AnswerableUtil.java +++ b/src/test/java/seedu/revision/testutil/AnswerableUtil.java @@ -1,19 +1,19 @@ -package seedu.address.testutil; +package seedu.revision.testutil; -import static seedu.address.logic.parser.CliSyntax.PREFIX_CATEGORY; -import static seedu.address.logic.parser.CliSyntax.PREFIX_CORRECT; -import static seedu.address.logic.parser.CliSyntax.PREFIX_QUESTION; -import static seedu.address.logic.parser.CliSyntax.PREFIX_DIFFICULTY; -import static seedu.address.logic.parser.CliSyntax.PREFIX_QUESTION_TYPE; -import static seedu.address.logic.parser.CliSyntax.PREFIX_WRONG; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_CATEGORY; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_CORRECT; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_QUESTION; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_DIFFICULTY; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_QUESTION_TYPE; +import static seedu.revision.logic.parser.CliSyntax.PREFIX_WRONG; import java.util.Set; -import seedu.address.logic.commands.AddCommand; -import seedu.address.logic.commands.EditCommand; -import seedu.address.model.answerable.Answer; -import seedu.address.model.answerable.Answerable; -import seedu.address.model.category.Category; +import seedu.revision.logic.commands.AddCommand; +import seedu.revision.logic.commands.EditCommand; +import seedu.revision.model.answerable.Answer; +import seedu.revision.model.answerable.Answerable; +import seedu.revision.model.category.Category; /** * A utility class for Answerable. diff --git a/src/test/java/seedu/address/testutil/Assert.java b/src/test/java/seedu/revision/testutil/Assert.java similarity index 97% rename from src/test/java/seedu/address/testutil/Assert.java rename to src/test/java/seedu/revision/testutil/Assert.java index 9863093bd6e..37d24326b12 100644 --- a/src/test/java/seedu/address/testutil/Assert.java +++ b/src/test/java/seedu/revision/testutil/Assert.java @@ -1,4 +1,4 @@ -package seedu.address.testutil; +package seedu.revision.testutil; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.function.Executable; diff --git a/src/test/java/seedu/address/testutil/EditAnswerableDescriptorBuilder.java b/src/test/java/seedu/revision/testutil/EditAnswerableDescriptorBuilder.java similarity index 87% rename from src/test/java/seedu/address/testutil/EditAnswerableDescriptorBuilder.java rename to src/test/java/seedu/revision/testutil/EditAnswerableDescriptorBuilder.java index 52c94708232..22c02716a67 100644 --- a/src/test/java/seedu/address/testutil/EditAnswerableDescriptorBuilder.java +++ b/src/test/java/seedu/revision/testutil/EditAnswerableDescriptorBuilder.java @@ -1,16 +1,16 @@ -package seedu.address.testutil; +package seedu.revision.testutil; import java.util.Set; import java.util.stream.Collectors; import java.util.stream.Stream; -import seedu.address.logic.commands.EditCommand; -import seedu.address.logic.commands.EditCommand.EditAnswerableDescriptor; -import seedu.address.model.answerable.Answer; -import seedu.address.model.answerable.Answerable; -import seedu.address.model.category.Category; -import seedu.address.model.answerable.Question; -import seedu.address.model.answerable.Difficulty; +import seedu.revision.logic.commands.EditCommand; +import seedu.revision.logic.commands.EditCommand.EditAnswerableDescriptor; +import seedu.revision.model.answerable.Answer; +import seedu.revision.model.answerable.Answerable; +import seedu.revision.model.category.Category; +import seedu.revision.model.answerable.Question; +import seedu.revision.model.answerable.Difficulty; /** diff --git a/src/test/java/seedu/address/testutil/SerializableTestClass.java b/src/test/java/seedu/revision/testutil/SerializableTestClass.java similarity index 98% rename from src/test/java/seedu/address/testutil/SerializableTestClass.java rename to src/test/java/seedu/revision/testutil/SerializableTestClass.java index f5a66340489..a622e56b54c 100644 --- a/src/test/java/seedu/address/testutil/SerializableTestClass.java +++ b/src/test/java/seedu/revision/testutil/SerializableTestClass.java @@ -1,4 +1,4 @@ -package seedu.address.testutil; +package seedu.revision.testutil; import java.time.LocalDateTime; import java.util.ArrayList; diff --git a/src/test/java/seedu/address/testutil/TestUtil.java b/src/test/java/seedu/revision/testutil/TestUtil.java similarity index 90% rename from src/test/java/seedu/address/testutil/TestUtil.java rename to src/test/java/seedu/revision/testutil/TestUtil.java index 60c4e987ba7..756c178defa 100644 --- a/src/test/java/seedu/address/testutil/TestUtil.java +++ b/src/test/java/seedu/revision/testutil/TestUtil.java @@ -1,13 +1,13 @@ -package seedu.address.testutil; +package seedu.revision.testutil; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import seedu.address.commons.core.index.Index; -import seedu.address.model.Model; -import seedu.address.model.answerable.Answerable; +import seedu.revision.commons.core.index.Index; +import seedu.revision.model.Model; +import seedu.revision.model.answerable.Answerable; /** * A utility class for test cases. diff --git a/src/test/java/seedu/address/testutil/TypicalAnswerables.java b/src/test/java/seedu/revision/testutil/TypicalAnswerables.java similarity index 85% rename from src/test/java/seedu/address/testutil/TypicalAnswerables.java rename to src/test/java/seedu/revision/testutil/TypicalAnswerables.java index f1b4d3c92ff..d8275fadd88 100644 --- a/src/test/java/seedu/address/testutil/TypicalAnswerables.java +++ b/src/test/java/seedu/revision/testutil/TypicalAnswerables.java @@ -1,11 +1,11 @@ -package seedu.address.testutil; +package seedu.revision.testutil; -import static seedu.address.logic.commands.CommandTestUtil.VALID_QUESTION_ALPHA; -import static seedu.address.logic.commands.CommandTestUtil.VALID_QUESTION_BETA; -import static seedu.address.logic.commands.CommandTestUtil.VALID_DIFFICULTY_ALPHA; -import static seedu.address.logic.commands.CommandTestUtil.VALID_DIFFICULTY_BETA; -import static seedu.address.logic.commands.CommandTestUtil.VALID_CATEGORY_UML; -import static seedu.address.logic.commands.CommandTestUtil.VALID_CATEGORY_GREENFIELD; +import static seedu.revision.logic.commands.CommandTestUtil.VALID_QUESTION_ALPHA; +import static seedu.revision.logic.commands.CommandTestUtil.VALID_QUESTION_BETA; +import static seedu.revision.logic.commands.CommandTestUtil.VALID_DIFFICULTY_ALPHA; +import static seedu.revision.logic.commands.CommandTestUtil.VALID_DIFFICULTY_BETA; +import static seedu.revision.logic.commands.CommandTestUtil.VALID_CATEGORY_UML; +import static seedu.revision.logic.commands.CommandTestUtil.VALID_CATEGORY_GREENFIELD; import java.util.ArrayList; import java.util.Arrays; @@ -13,9 +13,9 @@ import java.util.List; import java.util.Set; -import seedu.address.model.AddressBook; -import seedu.address.model.answerable.Answer; -import seedu.address.model.answerable.Answerable; +import seedu.revision.model.AddressBook; +import seedu.revision.model.answerable.Answer; +import seedu.revision.model.answerable.Answerable; /** * A utility class containing a list of {@code Answerable} objects to be used in tests. diff --git a/src/test/java/seedu/address/testutil/TypicalIndexes.java b/src/test/java/seedu/revision/testutil/TypicalIndexes.java similarity index 81% rename from src/test/java/seedu/address/testutil/TypicalIndexes.java rename to src/test/java/seedu/revision/testutil/TypicalIndexes.java index f2ce79eb849..c15702b9d3f 100644 --- a/src/test/java/seedu/address/testutil/TypicalIndexes.java +++ b/src/test/java/seedu/revision/testutil/TypicalIndexes.java @@ -1,6 +1,6 @@ -package seedu.address.testutil; +package seedu.revision.testutil; -import seedu.address.commons.core.index.Index; +import seedu.revision.commons.core.index.Index; /** * A utility class containing a list of {@code Index} objects to be used in tests. diff --git a/src/test/java/seedu/address/ui/TestFxmlObject.java b/src/test/java/seedu/revision/ui/TestFxmlObject.java similarity index 96% rename from src/test/java/seedu/address/ui/TestFxmlObject.java rename to src/test/java/seedu/revision/ui/TestFxmlObject.java index 5ecd82656f2..11646bedbc2 100644 --- a/src/test/java/seedu/address/ui/TestFxmlObject.java +++ b/src/test/java/seedu/revision/ui/TestFxmlObject.java @@ -1,4 +1,4 @@ -package seedu.address.ui; +package seedu.revision.ui; import javafx.beans.DefaultProperty; diff --git a/src/test/java/seedu/address/ui/UiPartTest.java b/src/test/java/seedu/revision/ui/UiPartTest.java similarity index 97% rename from src/test/java/seedu/address/ui/UiPartTest.java rename to src/test/java/seedu/revision/ui/UiPartTest.java index 33d82d911b8..facd7aa62ca 100644 --- a/src/test/java/seedu/address/ui/UiPartTest.java +++ b/src/test/java/seedu/revision/ui/UiPartTest.java @@ -1,8 +1,8 @@ -package seedu.address.ui; +package seedu.revision.ui; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; -import static seedu.address.testutil.Assert.assertThrows; +import static seedu.revision.testutil.Assert.assertThrows; import java.net.URL; import java.nio.file.Path; @@ -11,7 +11,7 @@ import org.junit.jupiter.api.io.TempDir; import javafx.fxml.FXML; -import seedu.address.MainApp; +import seedu.revision.MainApp; public class UiPartTest { diff --git a/src/test/resources/view/UiPartTest/validFile.fxml b/src/test/resources/view/UiPartTest/validFile.fxml index bab836af0db..14db0fd4ec0 100644 --- a/src/test/resources/view/UiPartTest/validFile.fxml +++ b/src/test/resources/view/UiPartTest/validFile.fxml @@ -1,4 +1,4 @@ - + Hello World! diff --git a/src/test/resources/view/UiPartTest/validFileWithFxRoot.fxml b/src/test/resources/view/UiPartTest/validFileWithFxRoot.fxml index 151e09ce926..c9ab024e025 100644 --- a/src/test/resources/view/UiPartTest/validFileWithFxRoot.fxml +++ b/src/test/resources/view/UiPartTest/validFileWithFxRoot.fxml @@ -1,6 +1,6 @@ - + Hello World!