From 9a660f373f70fe695e2610e938d3c73b293facf2 Mon Sep 17 00:00:00 2001 From: Hannah Chia Date: Mon, 11 Oct 2021 22:29:39 +0800 Subject: [PATCH 1/6] Chore: Change Command to Interface + Javadocs Edits --- src/main/java/seedu/address/MainApp.java | 14 +++++++------- .../seedu/address/logic/commands/ClearCommand.java | 6 +++--- .../java/seedu/address/logic/commands/Command.java | 2 +- .../address/logic/commands/TargetedCommand.java | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/java/seedu/address/MainApp.java b/src/main/java/seedu/address/MainApp.java index 185a339b3ec..d886e791261 100644 --- a/src/main/java/seedu/address/MainApp.java +++ b/src/main/java/seedu/address/MainApp.java @@ -51,7 +51,7 @@ public class MainApp extends Application { @Override public void init() throws Exception { - logger.info("=============================[ Initializing AddressBook ]==========================="); + logger.info("=============================[ Initializing Notor ]==========================="); super.init(); Trie.setup(); @@ -86,14 +86,14 @@ private Model initModelManager(Storage storage, ReadOnlyUserPrefs userPrefs) { try { addressBookOptional = storage.readAddressBook(); if (addressBookOptional.isEmpty()) { - logger.info("Data file not found. Will be starting with a sample AddressBook"); + logger.info("Data file not found. Will be starting with a sample Notor"); } initialData = addressBookOptional.orElseGet(SampleDataUtil::getSampleAddressBook); } catch (DataConversionException e) { - logger.warning("Data file not in the correct format. Will be starting with an empty AddressBook"); + logger.warning("Data file not in the correct format. Will be starting with an empty Notor"); initialData = new AddressBook(); } catch (IOException e) { - logger.warning("Problem while reading from the file. Will be starting with an empty AddressBook"); + logger.warning("Problem while reading from the file. Will be starting with an empty Notor"); initialData = new AddressBook(); } @@ -158,7 +158,7 @@ protected UserPrefs initPrefs(UserPrefsStorage storage) { + "Using default user prefs"); initializedPrefs = new UserPrefs(); } catch (IOException e) { - logger.warning("Problem while reading from the file. Will be starting with an empty AddressBook"); + logger.warning("Problem while reading from the file. Will be starting with an empty Notor"); initializedPrefs = new UserPrefs(); } @@ -174,13 +174,13 @@ protected UserPrefs initPrefs(UserPrefsStorage storage) { @Override public void start(Stage primaryStage) { - logger.info("Starting AddressBook " + MainApp.VERSION); + logger.info("Starting Notor " + MainApp.VERSION); ui.start(primaryStage); } @Override public void stop() { - logger.info("============================ [ Stopping Address Book ] ============================="); + logger.info("============================ [ Stopping Notor ] ============================="); try { storage.saveUserPrefs(model.getUserPrefs()); } catch (IOException e) { diff --git a/src/main/java/seedu/address/logic/commands/ClearCommand.java b/src/main/java/seedu/address/logic/commands/ClearCommand.java index 255644e59e6..ae253499e80 100644 --- a/src/main/java/seedu/address/logic/commands/ClearCommand.java +++ b/src/main/java/seedu/address/logic/commands/ClearCommand.java @@ -6,11 +6,11 @@ import seedu.address.model.Model; /** - * Clears the address book. + * Clears Notor of all entries */ -public class ClearCommand extends Command { +public class ClearCommand implements Command { public static final String COMMAND_WORD = "clear"; - public static final String MESSAGE_SUCCESS = "Address book has been cleared!"; + public static final String MESSAGE_SUCCESS = "Notor has been cleared!"; @Override public CommandResult execute(Model model) { diff --git a/src/main/java/seedu/address/logic/commands/Command.java b/src/main/java/seedu/address/logic/commands/Command.java index 4b76aa4ee4b..203558bef75 100644 --- a/src/main/java/seedu/address/logic/commands/Command.java +++ b/src/main/java/seedu/address/logic/commands/Command.java @@ -7,7 +7,7 @@ /** * Represents a command with hidden internal logic and the ability to be executed. */ -public abstract class Command { +public interface Command { /** * Executes the command and returns the result message. * diff --git a/src/main/java/seedu/address/logic/commands/TargetedCommand.java b/src/main/java/seedu/address/logic/commands/TargetedCommand.java index bf601637d57..ee831895275 100644 --- a/src/main/java/seedu/address/logic/commands/TargetedCommand.java +++ b/src/main/java/seedu/address/logic/commands/TargetedCommand.java @@ -4,7 +4,7 @@ import seedu.address.logic.executors.exceptions.ExecuteException; import seedu.address.model.Model; -public abstract class TargetedCommand extends Command { +public abstract class TargetedCommand implements Command { public abstract CommandResult execute() throws CommandException, ExecuteException; @Override From 805bed64eac8f2efa9b50e4775cd6684e1884715 Mon Sep 17 00:00:00 2001 From: Hannah Chia Date: Wed, 13 Oct 2021 16:09:44 +0800 Subject: [PATCH 2/6] Chore, Refactor: Change to Notor + General Refactoring Renames the packages to Notor and fixes remaining interface errors caused by refactoring Command to an interface rather than an abstract class. Command should be an interface as it describes functionality rather than having us write any functionality within Command. --- build.gradle | 4 +- .../logic/commands/group/GroupCommand.java | 8 --- .../logic/executors/group/GroupExecutor.java | 6 -- .../{address => notor}/AppParameters.java | 6 +- .../java/seedu/{address => notor}/Main.java | 2 +- .../seedu/{address => notor}/MainApp.java | 52 +++++++------- .../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 +- .../commons/core/trie/Trie.java | 6 +- .../commons/core/trie/TrieNode.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/DateUtil.java | 2 +- .../commons/util/FileUtil.java | 2 +- .../commons/util/JsonUtil.java | 6 +- .../commons/util/StringUtil.java | 4 +- .../seedu/{address => notor}/logic/Logic.java | 18 ++--- .../logic/LogicManager.java | 26 +++---- .../logic/commands/ClearCommand.java | 6 +- .../logic/commands/Command.java | 8 +-- .../logic/commands/CommandResult.java | 4 +- .../logic/commands/ExitCommand.java | 6 +- .../logic/commands/FindCommand.java | 10 +-- .../logic/commands/GroupCreateCommand.java | 12 ++-- .../logic/commands/HelpCommand.java | 6 +- .../logic/commands/ListCommand.java | 10 +-- .../logic/commands/PersonAddGroupCommand.java | 16 ++--- .../commands/PersonAddSubGroupCommand.java | 20 +++--- .../commands/PersonRemoveGroupCommand.java | 14 ++-- .../commands/PersonRemoveSubGroupCommand.java | 18 ++--- .../logic/commands/TargetedCommand.java | 8 +-- .../commands/exceptions/CommandException.java | 2 +- .../logic/commands/group/GroupCommand.java | 8 +++ .../logic/commands/person/PersonCommand.java | 6 +- .../commands/person/PersonCreateCommand.java | 24 +++---- .../commands/person/PersonDeleteCommand.java | 10 +-- .../commands/person/PersonEditCommand.java | 22 +++--- .../commands/person/PersonNoteCommand.java | 12 ++-- .../logic/executors/Executor.java | 8 +-- .../exceptions/ExecuteException.java | 2 +- .../logic/executors/group/GroupExecutor.java | 6 ++ .../person/PersonCreateExecutor.java | 10 +-- .../person/PersonDeleteExecutor.java | 10 +-- .../executors/person/PersonEditExecutor.java | 26 +++---- .../executors/person/PersonExecutor.java | 12 ++-- .../executors/person/PersonNoteExecutor.java | 14 ++-- .../logic/parser/AddressBookParser.java | 46 ++++++------ .../logic/parser/ArgumentMultimap.java | 2 +- .../logic/parser/ArgumentTokenizer.java | 2 +- .../logic/parser/CliSyntax.java | 2 +- .../logic/parser/FindCommandParser.java | 10 +-- .../parser/GroupCreateCommandParser.java | 12 ++-- .../logic/parser/Parser.java | 6 +- .../logic/parser/ParserUtil.java | 20 +++--- .../parser/PersonAddGroupCommandParser.java | 12 ++-- .../PersonAddSubGroupCommandParser.java | 14 ++-- .../PersonRemoveGroupCommandParser.java | 14 ++-- .../PersonRemoveSubGroupCommandParser.java | 16 ++--- .../logic/parser/Prefix.java | 2 +- .../parser/exceptions/ParseException.java | 4 +- .../parser/group/GroupCommandParser.java | 10 +-- .../parser/person/PersonCommandParser.java | 18 ++--- .../person/PersonCreateCommandParser.java | 40 +++++------ .../person/PersonDeleteCommandParser.java | 10 +-- .../person/PersonEditCommandParser.java | 28 ++++---- .../person/PersonNoteCommandParser.java | 16 ++--- .../{address => notor}/model/AddressBook.java | 10 +-- .../seedu/{address => notor}/model/Model.java | 10 +-- .../model/ModelManager.java | 14 ++-- .../model/ReadOnlyAddressBook.java | 8 +-- .../model/ReadOnlyUserPrefs.java | 4 +- .../{address => notor}/model/UserPrefs.java | 4 +- .../exceptions/DuplicateItemException.java | 2 +- .../exceptions/ItemNotFoundException.java | 2 +- .../{address => notor}/model/group/Group.java | 4 +- .../model/group/SubGroup.java | 2 +- .../model/group/SuperGroup.java | 2 +- .../model/person/Email.java | 4 +- .../{address => notor}/model/person/Name.java | 4 +- .../person/NameContainsKeywordsPredicate.java | 4 +- .../{address => notor}/model/person/Note.java | 2 +- .../model/person/Person.java | 12 ++-- .../model/person/Phone.java | 4 +- .../{address => notor}/model/tag/Tag.java | 4 +- .../model/util/SampleDataUtil.java | 18 ++--- .../{address => notor}/model/util/Unique.java | 2 +- .../model/util/UniqueList.java | 8 +-- .../storage/AddressBookStorage.java | 8 +-- .../storage/JsonAdaptedPerson.java | 22 +++--- .../storage/JsonAdaptedSubGroup.java | 6 +- .../storage/JsonAdaptedSuperGroup.java | 8 +-- .../storage/JsonAdaptedTag.java | 6 +- .../storage/JsonAddressBookStorage.java | 14 ++-- .../storage/JsonSerializableAddressBook.java | 14 ++-- .../storage/JsonUserPrefsStorage.java | 10 +-- .../{address => notor}/storage/Storage.java | 10 +-- .../storage/StorageManager.java | 12 ++-- .../storage/UserPrefsStorage.java | 12 ++-- .../{address => notor}/ui/CommandBox.java | 12 ++-- .../{address => notor}/ui/HelpWindow.java | 4 +- .../{address => notor}/ui/MainWindow.java | 20 +++--- .../{address => notor}/ui/NoteWindow.java | 14 ++-- .../{address => notor}/ui/PersonCard.java | 4 +- .../ui/PersonListPanel.java | 6 +- .../{address => notor}/ui/ResultDisplay.java | 2 +- .../ui/StatusBarFooter.java | 2 +- .../java/seedu/{address => notor}/ui/Ui.java | 2 +- .../{address => notor}/ui/UiManager.java | 10 +-- .../seedu/{address => notor}/ui/UiPart.java | 4 +- .../{address => notor}/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 | 48 ++++++------- .../logic/commands/ClearCommandTest.java | 12 ++-- .../logic/commands/CommandResultTest.java | 2 +- .../logic/commands/CommandTestUtil.java | 30 ++++---- .../logic/commands/ExitCommandTest.java | 10 +-- .../logic/commands/FindCommandTest.java | 20 +++--- .../logic/commands/HelpCommandTest.java | 10 +-- .../logic/commands/ListCommandTest.java | 14 ++-- .../PersonCreateCommandIntegrationTest.java | 24 +++---- .../commands/PersonCreateCommandTest.java | 32 ++++----- .../commands/PersonDeleteCommandTest.java | 32 ++++----- .../logic/commands/PersonEditCommandTest.java | 48 ++++++------- .../commands/PersonEditDescriptorTest.java | 18 ++--- .../logic/parser/AddressBookParserTest.java | 44 ++++++------ .../logic/parser/ArgumentTokenizerTest.java | 2 +- .../logic/parser/CommandParserTestUtil.java | 6 +- .../logic/parser/FindCommandParserTest.java | 12 ++-- .../logic/parser/ParserUtilTest.java | 18 ++--- .../parser/PersonCreateCommandParserTest.java | 70 +++++++++--------- .../parser/PersonDeleteCommandParserTest.java | 14 ++-- .../parser/PersonEditCommandParserTest.java | 72 +++++++++---------- .../parser/PersonNoteCommandParserTest.java | 12 ++-- .../model/AddressBookTest.java | 18 ++--- .../model/ModelManagerTest.java | 16 ++--- .../model/UserPrefsTest.java | 4 +- .../model/person/EmailTest.java | 4 +- .../NameContainsKeywordsPredicateTest.java | 4 +- .../model/person/NameTest.java | 4 +- .../model/person/PersonTest.java | 18 ++--- .../model/person/PhoneTest.java | 4 +- .../model/person/UniquePersonListTest.java | 18 ++--- .../{address => notor}/model/tag/TagTest.java | 4 +- .../storage/JsonAdaptedPersonTest.java | 16 ++--- .../storage/JsonAddressBookStorageTest.java | 18 ++--- .../JsonSerializableAddressBookTest.java | 12 ++-- .../storage/JsonUserPrefsStorageTest.java | 10 +-- .../storage/StorageManagerTest.java | 12 ++-- .../testutil/AddressBookBuilder.java | 6 +- .../{address => notor}/testutil/Assert.java | 2 +- .../testutil/PersonBuilder.java | 16 ++--- .../testutil/PersonEditDescriptorBuilder.java | 14 ++-- .../testutil/PersonUtil.java | 18 ++--- .../testutil/SerializableTestClass.java | 2 +- .../{address => notor}/testutil/TestUtil.java | 8 +-- .../testutil/TypicalGroups.java | 4 +- .../testutil/TypicalIndexes.java | 4 +- .../testutil/TypicalPersons.java | 26 +++---- .../testutil/TypicalSubGroups.java | 4 +- .../{address => notor}/ui/TestFxmlObject.java | 2 +- .../{address => notor}/ui/UiPartTest.java | 6 +- .../resources/view/UiPartTest/validFile.fxml | 2 +- .../view/UiPartTest/validFileWithFxRoot.fxml | 4 +- 178 files changed, 983 insertions(+), 983 deletions(-) delete mode 100644 src/main/java/seedu/address/logic/commands/group/GroupCommand.java delete mode 100644 src/main/java/seedu/address/logic/executors/group/GroupExecutor.java rename src/main/java/seedu/{address => notor}/AppParameters.java (93%) rename src/main/java/seedu/{address => notor}/Main.java (97%) rename src/main/java/seedu/{address => notor}/MainApp.java (84%) rename src/main/java/seedu/{address => notor}/commons/core/Config.java (97%) rename src/main/java/seedu/{address => notor}/commons/core/GuiSettings.java (98%) rename src/main/java/seedu/{address => notor}/commons/core/LogsCenter.java (99%) rename src/main/java/seedu/{address => notor}/commons/core/Messages.java (94%) rename src/main/java/seedu/{address => notor}/commons/core/Version.java (98%) rename src/main/java/seedu/{address => notor}/commons/core/index/Index.java (97%) rename src/main/java/seedu/{address => notor}/commons/core/trie/Trie.java (93%) rename src/main/java/seedu/{address => notor}/commons/core/trie/TrieNode.java (98%) rename src/main/java/seedu/{address => notor}/commons/exceptions/DataConversionException.java (84%) rename src/main/java/seedu/{address => notor}/commons/exceptions/IllegalValueException.java (93%) rename src/main/java/seedu/{address => notor}/commons/util/AppUtil.java (94%) rename src/main/java/seedu/{address => notor}/commons/util/CollectionUtil.java (96%) rename src/main/java/seedu/{address => notor}/commons/util/ConfigUtil.java (77%) rename src/main/java/seedu/{address => notor}/commons/util/DateUtil.java (94%) rename src/main/java/seedu/{address => notor}/commons/util/FileUtil.java (98%) rename src/main/java/seedu/{address => notor}/commons/util/JsonUtil.java (97%) rename src/main/java/seedu/{address => notor}/commons/util/StringUtil.java (95%) rename src/main/java/seedu/{address => notor}/logic/Logic.java (75%) rename src/main/java/seedu/{address => notor}/logic/LogicManager.java (80%) rename src/main/java/seedu/{address => notor}/logic/commands/ClearCommand.java (80%) rename src/main/java/seedu/{address => notor}/logic/commands/Command.java (68%) rename src/main/java/seedu/{address => notor}/logic/commands/CommandResult.java (96%) rename src/main/java/seedu/{address => notor}/logic/commands/ExitCommand.java (76%) rename src/main/java/seedu/{address => notor}/logic/commands/FindCommand.java (85%) rename src/main/java/seedu/{address => notor}/logic/commands/GroupCreateCommand.java (79%) rename src/main/java/seedu/{address => notor}/logic/commands/HelpCommand.java (81%) rename src/main/java/seedu/{address => notor}/logic/commands/ListCommand.java (63%) rename src/main/java/seedu/{address => notor}/logic/commands/PersonAddGroupCommand.java (80%) rename src/main/java/seedu/{address => notor}/logic/commands/PersonAddSubGroupCommand.java (82%) rename src/main/java/seedu/{address => notor}/logic/commands/PersonRemoveGroupCommand.java (81%) rename src/main/java/seedu/{address => notor}/logic/commands/PersonRemoveSubGroupCommand.java (79%) rename src/main/java/seedu/{address => notor}/logic/commands/TargetedCommand.java (58%) rename src/main/java/seedu/{address => notor}/logic/commands/exceptions/CommandException.java (89%) create mode 100644 src/main/java/seedu/notor/logic/commands/group/GroupCommand.java rename src/main/java/seedu/{address => notor}/logic/commands/person/PersonCommand.java (81%) rename src/main/java/seedu/{address => notor}/logic/commands/person/PersonCreateCommand.java (70%) rename src/main/java/seedu/{address => notor}/logic/commands/person/PersonDeleteCommand.java (82%) rename src/main/java/seedu/{address => notor}/logic/commands/person/PersonEditCommand.java (74%) rename src/main/java/seedu/{address => notor}/logic/commands/person/PersonNoteCommand.java (78%) rename src/main/java/seedu/{address => notor}/logic/executors/Executor.java (61%) rename src/main/java/seedu/{address => notor}/logic/executors/exceptions/ExecuteException.java (85%) create mode 100644 src/main/java/seedu/notor/logic/executors/group/GroupExecutor.java rename src/main/java/seedu/{address => notor}/logic/executors/person/PersonCreateExecutor.java (85%) rename src/main/java/seedu/{address => notor}/logic/executors/person/PersonDeleteExecutor.java (66%) rename src/main/java/seedu/{address => notor}/logic/executors/person/PersonEditExecutor.java (90%) rename src/main/java/seedu/{address => notor}/logic/executors/person/PersonExecutor.java (77%) rename src/main/java/seedu/{address => notor}/logic/executors/person/PersonNoteExecutor.java (81%) rename src/main/java/seedu/{address => notor}/logic/parser/AddressBookParser.java (66%) rename src/main/java/seedu/{address => notor}/logic/parser/ArgumentMultimap.java (98%) rename src/main/java/seedu/{address => notor}/logic/parser/ArgumentTokenizer.java (99%) rename src/main/java/seedu/{address => notor}/logic/parser/CliSyntax.java (94%) rename src/main/java/seedu/{address => notor}/logic/parser/FindCommandParser.java (74%) rename src/main/java/seedu/{address => notor}/logic/parser/GroupCreateCommandParser.java (79%) rename src/main/java/seedu/{address => notor}/logic/parser/Parser.java (73%) rename src/main/java/seedu/{address => notor}/logic/parser/ParserUtil.java (90%) rename src/main/java/seedu/{address => notor}/logic/parser/PersonAddGroupCommandParser.java (80%) rename src/main/java/seedu/{address => notor}/logic/parser/PersonAddSubGroupCommandParser.java (79%) rename src/main/java/seedu/{address => notor}/logic/parser/PersonRemoveGroupCommandParser.java (78%) rename src/main/java/seedu/{address => notor}/logic/parser/PersonRemoveSubGroupCommandParser.java (77%) rename src/main/java/seedu/{address => notor}/logic/parser/Prefix.java (95%) rename src/main/java/seedu/{address => notor}/logic/parser/exceptions/ParseException.java (73%) rename src/main/java/seedu/{address => notor}/logic/parser/group/GroupCommandParser.java (67%) rename src/main/java/seedu/{address => notor}/logic/parser/person/PersonCommandParser.java (63%) rename src/main/java/seedu/{address => notor}/logic/parser/person/PersonCreateCommandParser.java (65%) rename src/main/java/seedu/{address => notor}/logic/parser/person/PersonDeleteCommandParser.java (73%) rename src/main/java/seedu/{address => notor}/logic/parser/person/PersonEditCommandParser.java (77%) rename src/main/java/seedu/{address => notor}/logic/parser/person/PersonNoteCommandParser.java (68%) rename src/main/java/seedu/{address => notor}/model/AddressBook.java (96%) rename src/main/java/seedu/{address => notor}/model/Model.java (93%) rename src/main/java/seedu/{address => notor}/model/ModelManager.java (94%) rename src/main/java/seedu/{address => notor}/model/ReadOnlyAddressBook.java (73%) rename src/main/java/seedu/{address => notor}/model/ReadOnlyUserPrefs.java (70%) rename src/main/java/seedu/{address => notor}/model/UserPrefs.java (96%) rename src/main/java/seedu/{address => notor}/model/exceptions/DuplicateItemException.java (89%) rename src/main/java/seedu/{address => notor}/model/exceptions/ItemNotFoundException.java (78%) rename src/main/java/seedu/{address => notor}/model/group/Group.java (94%) rename src/main/java/seedu/{address => notor}/model/group/SubGroup.java (95%) rename src/main/java/seedu/{address => notor}/model/group/SuperGroup.java (96%) rename src/main/java/seedu/{address => notor}/model/person/Email.java (96%) rename src/main/java/seedu/{address => notor}/model/person/Name.java (93%) rename src/main/java/seedu/{address => notor}/model/person/NameContainsKeywordsPredicate.java (91%) rename src/main/java/seedu/{address => notor}/model/person/Note.java (97%) rename src/main/java/seedu/{address => notor}/model/person/Person.java (93%) rename src/main/java/seedu/{address => notor}/model/person/Phone.java (93%) rename src/main/java/seedu/{address => notor}/model/tag/Tag.java (93%) rename src/main/java/seedu/{address => notor}/model/util/SampleDataUtil.java (83%) rename src/main/java/seedu/{address => notor}/model/util/Unique.java (64%) rename src/main/java/seedu/{address => notor}/model/util/UniqueList.java (93%) rename src/main/java/seedu/{address => notor}/storage/AddressBookStorage.java (85%) rename src/main/java/seedu/{address => notor}/storage/JsonAdaptedPerson.java (90%) rename src/main/java/seedu/{address => notor}/storage/JsonAdaptedSubGroup.java (89%) rename src/main/java/seedu/{address => notor}/storage/JsonAdaptedSuperGroup.java (88%) rename src/main/java/seedu/{address => notor}/storage/JsonAdaptedTag.java (89%) rename src/main/java/seedu/{address => notor}/storage/JsonAddressBookStorage.java (86%) rename src/main/java/seedu/{address => notor}/storage/JsonSerializableAddressBook.java (91%) rename src/main/java/seedu/{address => notor}/storage/JsonUserPrefsStorage.java (83%) rename src/main/java/seedu/{address => notor}/storage/Storage.java (73%) rename src/main/java/seedu/{address => notor}/storage/StorageManager.java (89%) rename src/main/java/seedu/{address => notor}/storage/UserPrefsStorage.java (71%) rename src/main/java/seedu/{address => notor}/ui/CommandBox.java (87%) rename src/main/java/seedu/{address => notor}/ui/HelpWindow.java (97%) rename src/main/java/seedu/{address => notor}/ui/MainWindow.java (93%) rename src/main/java/seedu/{address => notor}/ui/NoteWindow.java (94%) rename src/main/java/seedu/{address => notor}/ui/PersonCard.java (97%) rename src/main/java/seedu/{address => notor}/ui/PersonListPanel.java (92%) rename src/main/java/seedu/{address => notor}/ui/ResultDisplay.java (95%) rename src/main/java/seedu/{address => notor}/ui/StatusBarFooter.java (96%) rename src/main/java/seedu/{address => notor}/ui/Ui.java (87%) rename src/main/java/seedu/{address => notor}/ui/UiManager.java (94%) rename src/main/java/seedu/{address => notor}/ui/UiPart.java (97%) rename src/test/java/seedu/{address => notor}/AppParametersTest.java (98%) rename src/test/java/seedu/{address => notor}/commons/core/ConfigTest.java (94%) rename src/test/java/seedu/{address => notor}/commons/core/VersionTest.java (98%) rename src/test/java/seedu/{address => notor}/commons/core/index/IndexTest.java (95%) rename src/test/java/seedu/{address => notor}/commons/util/AppUtilTest.java (91%) rename src/test/java/seedu/{address => notor}/commons/util/CollectionUtilTest.java (96%) rename src/test/java/seedu/{address => notor}/commons/util/ConfigUtilTest.java (94%) rename src/test/java/seedu/{address => notor}/commons/util/FileUtilTest.java (84%) rename src/test/java/seedu/{address => notor}/commons/util/JsonUtilTest.java (92%) rename src/test/java/seedu/{address => notor}/commons/util/StringUtilTest.java (98%) rename src/test/java/seedu/{address => notor}/logic/LogicManagerTest.java (82%) rename src/test/java/seedu/{address => notor}/logic/commands/ClearCommandTest.java (74%) rename src/test/java/seedu/{address => notor}/logic/commands/CommandResultTest.java (98%) rename src/test/java/seedu/{address => notor}/logic/commands/CommandTestUtil.java (87%) rename src/test/java/seedu/{address => notor}/logic/commands/ExitCommandTest.java (62%) rename src/test/java/seedu/{address => notor}/logic/commands/FindCommandTest.java (84%) rename src/test/java/seedu/{address => notor}/logic/commands/HelpCommandTest.java (62%) rename src/test/java/seedu/{address => notor}/logic/commands/ListCommandTest.java (70%) rename src/test/java/seedu/{address => notor}/logic/commands/PersonCreateCommandIntegrationTest.java (65%) rename src/test/java/seedu/{address => notor}/logic/commands/PersonCreateCommandTest.java (89%) rename src/test/java/seedu/{address => notor}/logic/commands/PersonDeleteCommandTest.java (81%) rename src/test/java/seedu/{address => notor}/logic/commands/PersonEditCommandTest.java (83%) rename src/test/java/seedu/{address => notor}/logic/commands/PersonEditDescriptorTest.java (71%) rename src/test/java/seedu/{address => notor}/logic/parser/AddressBookParserTest.java (74%) rename src/test/java/seedu/{address => notor}/logic/parser/ArgumentTokenizerTest.java (99%) rename src/test/java/seedu/{address => notor}/logic/parser/CommandParserTestUtil.java (89%) rename src/test/java/seedu/{address => notor}/logic/parser/FindCommandParserTest.java (67%) rename src/test/java/seedu/{address => notor}/logic/parser/ParserUtilTest.java (92%) rename src/test/java/seedu/{address => notor}/logic/parser/PersonCreateCommandParserTest.java (63%) rename src/test/java/seedu/{address => notor}/logic/parser/PersonDeleteCommandParserTest.java (65%) rename src/test/java/seedu/{address => notor}/logic/parser/PersonEditCommandParserTest.java (76%) rename src/test/java/seedu/{address => notor}/logic/parser/PersonNoteCommandParserTest.java (56%) rename src/test/java/seedu/{address => notor}/model/AddressBookTest.java (85%) rename src/test/java/seedu/{address => notor}/model/ModelManagerTest.java (91%) rename src/test/java/seedu/{address => notor}/model/UserPrefsTest.java (86%) rename src/test/java/seedu/{address => notor}/model/person/EmailTest.java (97%) rename src/test/java/seedu/{address => notor}/model/person/NameContainsKeywordsPredicateTest.java (97%) rename src/test/java/seedu/{address => notor}/model/person/NameTest.java (93%) rename src/test/java/seedu/{address => notor}/model/person/PersonTest.java (83%) rename src/test/java/seedu/{address => notor}/model/person/PhoneTest.java (93%) rename src/test/java/seedu/{address => notor}/model/person/UniquePersonListTest.java (92%) rename src/test/java/seedu/{address => notor}/model/tag/TagTest.java (86%) rename src/test/java/seedu/{address => notor}/storage/JsonAdaptedPersonTest.java (92%) rename src/test/java/seedu/{address => notor}/storage/JsonAddressBookStorageTest.java (89%) rename src/test/java/seedu/{address => notor}/storage/JsonSerializableAddressBookTest.java (87%) rename src/test/java/seedu/{address => notor}/storage/JsonUserPrefsStorageTest.java (94%) rename src/test/java/seedu/{address => notor}/storage/StorageManagerTest.java (88%) rename src/test/java/seedu/{address => notor}/testutil/AddressBookBuilder.java (86%) rename src/test/java/seedu/{address => notor}/testutil/Assert.java (97%) rename src/test/java/seedu/{address => notor}/testutil/PersonBuilder.java (91%) rename src/test/java/seedu/{address => notor}/testutil/PersonEditDescriptorBuilder.java (87%) rename src/test/java/seedu/{address => notor}/testutil/PersonUtil.java (79%) rename src/test/java/seedu/{address => notor}/testutil/SerializableTestClass.java (98%) rename src/test/java/seedu/{address => notor}/testutil/TestUtil.java (90%) rename src/test/java/seedu/{address => notor}/testutil/TypicalGroups.java (86%) rename src/test/java/seedu/{address => notor}/testutil/TypicalIndexes.java (81%) rename src/test/java/seedu/{address => notor}/testutil/TypicalPersons.java (81%) rename src/test/java/seedu/{address => notor}/testutil/TypicalSubGroups.java (82%) rename src/test/java/seedu/{address => notor}/ui/TestFxmlObject.java (96%) rename src/test/java/seedu/{address => notor}/ui/UiPartTest.java (97%) diff --git a/build.gradle b/build.gradle index be2d2905dde..5a3397e4f4b 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ plugins { id 'jacoco' } -mainClassName = 'seedu.address.Main' +mainClassName = 'seedu.notor.Main' sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 @@ -66,7 +66,7 @@ dependencies { } shadowJar { - archiveName = 'addressbook.jar' + archiveName = 'notor.jar' } defaultTasks 'clean', 'test' diff --git a/src/main/java/seedu/address/logic/commands/group/GroupCommand.java b/src/main/java/seedu/address/logic/commands/group/GroupCommand.java deleted file mode 100644 index d59eecf894c..00000000000 --- a/src/main/java/seedu/address/logic/commands/group/GroupCommand.java +++ /dev/null @@ -1,8 +0,0 @@ -package seedu.address.logic.commands.group; - -import seedu.address.logic.commands.Command; -import seedu.address.model.group.Group; - -public abstract class GroupCommand extends Command { - private Group target; -} diff --git a/src/main/java/seedu/address/logic/executors/group/GroupExecutor.java b/src/main/java/seedu/address/logic/executors/group/GroupExecutor.java deleted file mode 100644 index af6468adf9a..00000000000 --- a/src/main/java/seedu/address/logic/executors/group/GroupExecutor.java +++ /dev/null @@ -1,6 +0,0 @@ -package seedu.address.logic.executors.group; - -import seedu.address.logic.executors.Executor; - -public abstract class GroupExecutor extends Executor { -} diff --git a/src/main/java/seedu/address/AppParameters.java b/src/main/java/seedu/notor/AppParameters.java similarity index 93% rename from src/main/java/seedu/address/AppParameters.java rename to src/main/java/seedu/notor/AppParameters.java index ab552c398f3..ad6c13ad07d 100644 --- a/src/main/java/seedu/address/AppParameters.java +++ b/src/main/java/seedu/notor/AppParameters.java @@ -1,4 +1,4 @@ -package seedu.address; +package seedu.notor; 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.notor.commons.core.LogsCenter; +import seedu.notor.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/notor/Main.java similarity index 97% rename from src/main/java/seedu/address/Main.java rename to src/main/java/seedu/notor/Main.java index 4208153a631..7cebd9fca2f 100644 --- a/src/main/java/seedu/address/Main.java +++ b/src/main/java/seedu/notor/Main.java @@ -1,4 +1,4 @@ -package seedu.address; +package seedu.notor; import javafx.application.Application; diff --git a/src/main/java/seedu/address/MainApp.java b/src/main/java/seedu/notor/MainApp.java similarity index 84% rename from src/main/java/seedu/address/MainApp.java rename to src/main/java/seedu/notor/MainApp.java index d886e791261..aa357b1307e 100644 --- a/src/main/java/seedu/address/MainApp.java +++ b/src/main/java/seedu/notor/MainApp.java @@ -1,4 +1,4 @@ -package seedu.address; +package seedu.notor; import java.io.IOException; import java.nio.file.Path; @@ -7,31 +7,31 @@ 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.core.trie.Trie; -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.logic.executors.Executor; -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.notor.commons.core.Config; +import seedu.notor.commons.core.LogsCenter; +import seedu.notor.commons.core.Version; +import seedu.notor.commons.core.trie.Trie; +import seedu.notor.commons.exceptions.DataConversionException; +import seedu.notor.commons.util.ConfigUtil; +import seedu.notor.commons.util.StringUtil; +import seedu.notor.logic.Logic; +import seedu.notor.logic.LogicManager; +import seedu.notor.logic.executors.Executor; +import seedu.notor.model.AddressBook; +import seedu.notor.model.Model; +import seedu.notor.model.ModelManager; +import seedu.notor.model.ReadOnlyAddressBook; +import seedu.notor.model.ReadOnlyUserPrefs; +import seedu.notor.model.UserPrefs; +import seedu.notor.model.util.SampleDataUtil; +import seedu.notor.storage.AddressBookStorage; +import seedu.notor.storage.JsonAddressBookStorage; +import seedu.notor.storage.JsonUserPrefsStorage; +import seedu.notor.storage.Storage; +import seedu.notor.storage.StorageManager; +import seedu.notor.storage.UserPrefsStorage; +import seedu.notor.ui.Ui; +import seedu.notor.ui.UiManager; /** * Runs the application. diff --git a/src/main/java/seedu/address/commons/core/Config.java b/src/main/java/seedu/notor/commons/core/Config.java similarity index 97% rename from src/main/java/seedu/address/commons/core/Config.java rename to src/main/java/seedu/notor/commons/core/Config.java index 91145745521..364e246ccdb 100644 --- a/src/main/java/seedu/address/commons/core/Config.java +++ b/src/main/java/seedu/notor/commons/core/Config.java @@ -1,4 +1,4 @@ -package seedu.address.commons.core; +package seedu.notor.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/notor/commons/core/GuiSettings.java similarity index 98% rename from src/main/java/seedu/address/commons/core/GuiSettings.java rename to src/main/java/seedu/notor/commons/core/GuiSettings.java index ba33653be67..cc61b5717ec 100644 --- a/src/main/java/seedu/address/commons/core/GuiSettings.java +++ b/src/main/java/seedu/notor/commons/core/GuiSettings.java @@ -1,4 +1,4 @@ -package seedu.address.commons.core; +package seedu.notor.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/notor/commons/core/LogsCenter.java similarity index 99% rename from src/main/java/seedu/address/commons/core/LogsCenter.java rename to src/main/java/seedu/notor/commons/core/LogsCenter.java index 1177cef1b1d..32b5a8aa5b7 100644 --- a/src/main/java/seedu/address/commons/core/LogsCenter.java +++ b/src/main/java/seedu/notor/commons/core/LogsCenter.java @@ -1,4 +1,4 @@ -package seedu.address.commons.core; +package seedu.notor.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/notor/commons/core/Messages.java similarity index 94% rename from src/main/java/seedu/address/commons/core/Messages.java rename to src/main/java/seedu/notor/commons/core/Messages.java index 4d54b47f853..c20b76f0108 100644 --- a/src/main/java/seedu/address/commons/core/Messages.java +++ b/src/main/java/seedu/notor/commons/core/Messages.java @@ -1,4 +1,4 @@ -package seedu.address.commons.core; +package seedu.notor.commons.core; /** * Container for user visible messages. diff --git a/src/main/java/seedu/address/commons/core/Version.java b/src/main/java/seedu/notor/commons/core/Version.java similarity index 98% rename from src/main/java/seedu/address/commons/core/Version.java rename to src/main/java/seedu/notor/commons/core/Version.java index 46cc181b603..75fead77c56 100644 --- a/src/main/java/seedu/address/commons/core/Version.java +++ b/src/main/java/seedu/notor/commons/core/Version.java @@ -1,4 +1,4 @@ -package seedu.address.commons.core; +package seedu.notor.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/notor/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/notor/commons/core/index/Index.java index 9984f20d847..9c45b48383e 100644 --- a/src/main/java/seedu/address/commons/core/index/Index.java +++ b/src/main/java/seedu/notor/commons/core/index/Index.java @@ -1,4 +1,4 @@ -package seedu.address.commons.core.index; +package seedu.notor.commons.core.index; /** * Represents a zero-based or one-based index. diff --git a/src/main/java/seedu/address/commons/core/trie/Trie.java b/src/main/java/seedu/notor/commons/core/trie/Trie.java similarity index 93% rename from src/main/java/seedu/address/commons/core/trie/Trie.java rename to src/main/java/seedu/notor/commons/core/trie/Trie.java index a285ac1a613..c9d8a236d38 100644 --- a/src/main/java/seedu/address/commons/core/trie/Trie.java +++ b/src/main/java/seedu/notor/commons/core/trie/Trie.java @@ -1,11 +1,11 @@ -package seedu.address.commons.core.trie; +package seedu.notor.commons.core.trie; import java.util.HashMap; import java.util.Map; import java.util.logging.Logger; -import seedu.address.commons.core.LogsCenter; -import seedu.address.commons.exceptions.IllegalValueException; +import seedu.notor.commons.core.LogsCenter; +import seedu.notor.commons.exceptions.IllegalValueException; /** * Implementation of a Trie data structure for command and tag autocompletion. diff --git a/src/main/java/seedu/address/commons/core/trie/TrieNode.java b/src/main/java/seedu/notor/commons/core/trie/TrieNode.java similarity index 98% rename from src/main/java/seedu/address/commons/core/trie/TrieNode.java rename to src/main/java/seedu/notor/commons/core/trie/TrieNode.java index 42e7af64ec9..79a5d23aa7b 100644 --- a/src/main/java/seedu/address/commons/core/trie/TrieNode.java +++ b/src/main/java/seedu/notor/commons/core/trie/TrieNode.java @@ -1,4 +1,4 @@ -package seedu.address.commons.core.trie; +package seedu.notor.commons.core.trie; import java.util.ArrayList; import java.util.HashMap; diff --git a/src/main/java/seedu/address/commons/exceptions/DataConversionException.java b/src/main/java/seedu/notor/commons/exceptions/DataConversionException.java similarity index 84% rename from src/main/java/seedu/address/commons/exceptions/DataConversionException.java rename to src/main/java/seedu/notor/commons/exceptions/DataConversionException.java index 1f689bd8e3f..5c78b71f8c0 100644 --- a/src/main/java/seedu/address/commons/exceptions/DataConversionException.java +++ b/src/main/java/seedu/notor/commons/exceptions/DataConversionException.java @@ -1,4 +1,4 @@ -package seedu.address.commons.exceptions; +package seedu.notor.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/notor/commons/exceptions/IllegalValueException.java similarity index 93% rename from src/main/java/seedu/address/commons/exceptions/IllegalValueException.java rename to src/main/java/seedu/notor/commons/exceptions/IllegalValueException.java index 19124db485c..21aee90ccbd 100644 --- a/src/main/java/seedu/address/commons/exceptions/IllegalValueException.java +++ b/src/main/java/seedu/notor/commons/exceptions/IllegalValueException.java @@ -1,4 +1,4 @@ -package seedu.address.commons.exceptions; +package seedu.notor.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/notor/commons/util/AppUtil.java similarity index 94% rename from src/main/java/seedu/address/commons/util/AppUtil.java rename to src/main/java/seedu/notor/commons/util/AppUtil.java index 87aa89c0326..bb43ecb5c42 100644 --- a/src/main/java/seedu/address/commons/util/AppUtil.java +++ b/src/main/java/seedu/notor/commons/util/AppUtil.java @@ -1,9 +1,9 @@ -package seedu.address.commons.util; +package seedu.notor.commons.util; import static java.util.Objects.requireNonNull; import javafx.scene.image.Image; -import seedu.address.MainApp; +import seedu.notor.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/notor/commons/util/CollectionUtil.java similarity index 96% rename from src/main/java/seedu/address/commons/util/CollectionUtil.java rename to src/main/java/seedu/notor/commons/util/CollectionUtil.java index 942edda97d7..47395589970 100644 --- a/src/main/java/seedu/address/commons/util/CollectionUtil.java +++ b/src/main/java/seedu/notor/commons/util/CollectionUtil.java @@ -1,4 +1,4 @@ -package seedu.address.commons.util; +package seedu.notor.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/notor/commons/util/ConfigUtil.java similarity index 77% rename from src/main/java/seedu/address/commons/util/ConfigUtil.java rename to src/main/java/seedu/notor/commons/util/ConfigUtil.java index f7f8a2bd44c..4fdcc400635 100644 --- a/src/main/java/seedu/address/commons/util/ConfigUtil.java +++ b/src/main/java/seedu/notor/commons/util/ConfigUtil.java @@ -1,11 +1,11 @@ -package seedu.address.commons.util; +package seedu.notor.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.notor.commons.core.Config; +import seedu.notor.commons.exceptions.DataConversionException; /** * A class for accessing the Config File. diff --git a/src/main/java/seedu/address/commons/util/DateUtil.java b/src/main/java/seedu/notor/commons/util/DateUtil.java similarity index 94% rename from src/main/java/seedu/address/commons/util/DateUtil.java rename to src/main/java/seedu/notor/commons/util/DateUtil.java index 92c644361c1..677be3aa560 100644 --- a/src/main/java/seedu/address/commons/util/DateUtil.java +++ b/src/main/java/seedu/notor/commons/util/DateUtil.java @@ -1,4 +1,4 @@ -package seedu.address.commons.util; +package seedu.notor.commons.util; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; diff --git a/src/main/java/seedu/address/commons/util/FileUtil.java b/src/main/java/seedu/notor/commons/util/FileUtil.java similarity index 98% rename from src/main/java/seedu/address/commons/util/FileUtil.java rename to src/main/java/seedu/notor/commons/util/FileUtil.java index f811215474c..88bfca47d72 100644 --- a/src/main/java/seedu/address/commons/util/FileUtil.java +++ b/src/main/java/seedu/notor/commons/util/FileUtil.java @@ -1,4 +1,4 @@ -package seedu.address.commons.util; +package seedu.notor.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/notor/commons/util/JsonUtil.java similarity index 97% rename from src/main/java/seedu/address/commons/util/JsonUtil.java rename to src/main/java/seedu/notor/commons/util/JsonUtil.java index bf225ed0bdf..a2eda69e8f6 100644 --- a/src/main/java/seedu/address/commons/util/JsonUtil.java +++ b/src/main/java/seedu/notor/commons/util/JsonUtil.java @@ -1,4 +1,4 @@ -package seedu.address.commons.util; +package seedu.notor.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.notor.commons.core.LogsCenter; +import seedu.notor.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/notor/commons/util/StringUtil.java similarity index 95% rename from src/main/java/seedu/address/commons/util/StringUtil.java rename to src/main/java/seedu/notor/commons/util/StringUtil.java index b8690b530c7..e3ba58b90ef 100644 --- a/src/main/java/seedu/address/commons/util/StringUtil.java +++ b/src/main/java/seedu/notor/commons/util/StringUtil.java @@ -1,7 +1,7 @@ -package seedu.address.commons.util; +package seedu.notor.commons.util; import static java.util.Objects.requireNonNull; -import static seedu.address.commons.util.AppUtil.checkArgument; +import static seedu.notor.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/notor/logic/Logic.java similarity index 75% rename from src/main/java/seedu/address/logic/Logic.java rename to src/main/java/seedu/notor/logic/Logic.java index c7065ad2179..2fdeae7bc33 100644 --- a/src/main/java/seedu/address/logic/Logic.java +++ b/src/main/java/seedu/notor/logic/Logic.java @@ -1,15 +1,15 @@ -package seedu.address.logic; +package seedu.notor.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.executors.exceptions.ExecuteException; -import seedu.address.logic.parser.exceptions.ParseException; -import seedu.address.model.ReadOnlyAddressBook; -import seedu.address.model.person.Person; +import seedu.notor.commons.core.GuiSettings; +import seedu.notor.logic.commands.CommandResult; +import seedu.notor.logic.commands.exceptions.CommandException; +import seedu.notor.logic.executors.exceptions.ExecuteException; +import seedu.notor.logic.parser.exceptions.ParseException; +import seedu.notor.model.ReadOnlyAddressBook; +import seedu.notor.model.person.Person; /** * API of the Logic component @@ -37,7 +37,7 @@ public interface Logic { /** * Returns the AddressBook. * - * @see seedu.address.model.Model#getAddressBook() + * @see seedu.notor.model.Model#getAddressBook() */ ReadOnlyAddressBook getAddressBook(); diff --git a/src/main/java/seedu/address/logic/LogicManager.java b/src/main/java/seedu/notor/logic/LogicManager.java similarity index 80% rename from src/main/java/seedu/address/logic/LogicManager.java rename to src/main/java/seedu/notor/logic/LogicManager.java index d6efc40a962..42445f5a143 100644 --- a/src/main/java/seedu/address/logic/LogicManager.java +++ b/src/main/java/seedu/notor/logic/LogicManager.java @@ -1,22 +1,22 @@ -package seedu.address.logic; +package seedu.notor.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.executors.exceptions.ExecuteException; -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.person.Person; -import seedu.address.storage.Storage; +import seedu.notor.commons.core.GuiSettings; +import seedu.notor.commons.core.LogsCenter; +import seedu.notor.logic.commands.Command; +import seedu.notor.logic.commands.CommandResult; +import seedu.notor.logic.commands.exceptions.CommandException; +import seedu.notor.logic.executors.exceptions.ExecuteException; +import seedu.notor.logic.parser.AddressBookParser; +import seedu.notor.logic.parser.exceptions.ParseException; +import seedu.notor.model.Model; +import seedu.notor.model.ReadOnlyAddressBook; +import seedu.notor.model.person.Person; +import seedu.notor.storage.Storage; /** * The main LogicManager of the app. diff --git a/src/main/java/seedu/address/logic/commands/ClearCommand.java b/src/main/java/seedu/notor/logic/commands/ClearCommand.java similarity index 80% rename from src/main/java/seedu/address/logic/commands/ClearCommand.java rename to src/main/java/seedu/notor/logic/commands/ClearCommand.java index ae253499e80..9bda464f420 100644 --- a/src/main/java/seedu/address/logic/commands/ClearCommand.java +++ b/src/main/java/seedu/notor/logic/commands/ClearCommand.java @@ -1,9 +1,9 @@ -package seedu.address.logic.commands; +package seedu.notor.logic.commands; import static java.util.Objects.requireNonNull; -import seedu.address.model.AddressBook; -import seedu.address.model.Model; +import seedu.notor.model.AddressBook; +import seedu.notor.model.Model; /** * Clears Notor of all entries diff --git a/src/main/java/seedu/address/logic/commands/Command.java b/src/main/java/seedu/notor/logic/commands/Command.java similarity index 68% rename from src/main/java/seedu/address/logic/commands/Command.java rename to src/main/java/seedu/notor/logic/commands/Command.java index 203558bef75..ba6ae25e574 100644 --- a/src/main/java/seedu/address/logic/commands/Command.java +++ b/src/main/java/seedu/notor/logic/commands/Command.java @@ -1,8 +1,8 @@ -package seedu.address.logic.commands; +package seedu.notor.logic.commands; -import seedu.address.logic.commands.exceptions.CommandException; -import seedu.address.logic.executors.exceptions.ExecuteException; -import seedu.address.model.Model; +import seedu.notor.logic.commands.exceptions.CommandException; +import seedu.notor.logic.executors.exceptions.ExecuteException; +import seedu.notor.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/notor/logic/commands/CommandResult.java similarity index 96% rename from src/main/java/seedu/address/logic/commands/CommandResult.java rename to src/main/java/seedu/notor/logic/commands/CommandResult.java index 3da4df6596e..fed0f9f065f 100644 --- a/src/main/java/seedu/address/logic/commands/CommandResult.java +++ b/src/main/java/seedu/notor/logic/commands/CommandResult.java @@ -1,10 +1,10 @@ -package seedu.address.logic.commands; +package seedu.notor.logic.commands; import static java.util.Objects.requireNonNull; import java.util.Objects; -import seedu.address.model.person.Person; +import seedu.notor.model.person.Person; diff --git a/src/main/java/seedu/address/logic/commands/ExitCommand.java b/src/main/java/seedu/notor/logic/commands/ExitCommand.java similarity index 76% rename from src/main/java/seedu/address/logic/commands/ExitCommand.java rename to src/main/java/seedu/notor/logic/commands/ExitCommand.java index 8563eb77b4d..e4ddb58d1de 100644 --- a/src/main/java/seedu/address/logic/commands/ExitCommand.java +++ b/src/main/java/seedu/notor/logic/commands/ExitCommand.java @@ -1,11 +1,11 @@ -package seedu.address.logic.commands; +package seedu.notor.logic.commands; -import seedu.address.model.Model; +import seedu.notor.model.Model; /** * Terminates the program. */ -public class ExitCommand extends Command { +public class ExitCommand implements Command { public static final String COMMAND_WORD = "exit"; diff --git a/src/main/java/seedu/address/logic/commands/FindCommand.java b/src/main/java/seedu/notor/logic/commands/FindCommand.java similarity index 85% rename from src/main/java/seedu/address/logic/commands/FindCommand.java rename to src/main/java/seedu/notor/logic/commands/FindCommand.java index d6b19b0a0de..8d2dce54517 100644 --- a/src/main/java/seedu/address/logic/commands/FindCommand.java +++ b/src/main/java/seedu/notor/logic/commands/FindCommand.java @@ -1,16 +1,16 @@ -package seedu.address.logic.commands; +package seedu.notor.logic.commands; import static java.util.Objects.requireNonNull; -import seedu.address.commons.core.Messages; -import seedu.address.model.Model; -import seedu.address.model.person.NameContainsKeywordsPredicate; +import seedu.notor.commons.core.Messages; +import seedu.notor.model.Model; +import seedu.notor.model.person.NameContainsKeywordsPredicate; /** * Finds and lists all persons in address book whose name contains any of the argument keywords. * Keyword matching is case insensitive. */ -public class FindCommand extends Command { +public class FindCommand implements Command { public static final String COMMAND_WORD = "find"; diff --git a/src/main/java/seedu/address/logic/commands/GroupCreateCommand.java b/src/main/java/seedu/notor/logic/commands/GroupCreateCommand.java similarity index 79% rename from src/main/java/seedu/address/logic/commands/GroupCreateCommand.java rename to src/main/java/seedu/notor/logic/commands/GroupCreateCommand.java index b5222daeeef..06f9e873d4d 100644 --- a/src/main/java/seedu/address/logic/commands/GroupCreateCommand.java +++ b/src/main/java/seedu/notor/logic/commands/GroupCreateCommand.java @@ -1,13 +1,13 @@ -package seedu.address.logic.commands; +package seedu.notor.logic.commands; import static java.util.Objects.requireNonNull; -import static seedu.address.logic.parser.CliSyntax.PREFIX_GROUP; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_GROUP; -import seedu.address.logic.commands.exceptions.CommandException; -import seedu.address.model.Model; -import seedu.address.model.group.SuperGroup; +import seedu.notor.logic.commands.exceptions.CommandException; +import seedu.notor.model.Model; +import seedu.notor.model.group.SuperGroup; -public class GroupCreateCommand extends Command { +public class GroupCreateCommand implements Command { public static final String COMMAND_WORD = "group_create"; diff --git a/src/main/java/seedu/address/logic/commands/HelpCommand.java b/src/main/java/seedu/notor/logic/commands/HelpCommand.java similarity index 81% rename from src/main/java/seedu/address/logic/commands/HelpCommand.java rename to src/main/java/seedu/notor/logic/commands/HelpCommand.java index e4c9626dbb1..c971e658596 100644 --- a/src/main/java/seedu/address/logic/commands/HelpCommand.java +++ b/src/main/java/seedu/notor/logic/commands/HelpCommand.java @@ -1,11 +1,11 @@ -package seedu.address.logic.commands; +package seedu.notor.logic.commands; -import seedu.address.model.Model; +import seedu.notor.model.Model; /** * Format full help instructions for every command for display. */ -public class HelpCommand extends Command { +public class HelpCommand implements Command { public static final String COMMAND_WORD = "help"; diff --git a/src/main/java/seedu/address/logic/commands/ListCommand.java b/src/main/java/seedu/notor/logic/commands/ListCommand.java similarity index 63% rename from src/main/java/seedu/address/logic/commands/ListCommand.java rename to src/main/java/seedu/notor/logic/commands/ListCommand.java index 84be6ad2596..ed731ba5c0d 100644 --- a/src/main/java/seedu/address/logic/commands/ListCommand.java +++ b/src/main/java/seedu/notor/logic/commands/ListCommand.java @@ -1,14 +1,14 @@ -package seedu.address.logic.commands; +package seedu.notor.logic.commands; import static java.util.Objects.requireNonNull; -import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS; +import static seedu.notor.model.Model.PREDICATE_SHOW_ALL_PERSONS; -import seedu.address.model.Model; +import seedu.notor.model.Model; /** - * Lists all persons in the address book to the user. + * Lists all persons in Notor to the user. */ -public class ListCommand extends Command { +public class ListCommand implements Command { public static final String COMMAND_WORD = "list"; diff --git a/src/main/java/seedu/address/logic/commands/PersonAddGroupCommand.java b/src/main/java/seedu/notor/logic/commands/PersonAddGroupCommand.java similarity index 80% rename from src/main/java/seedu/address/logic/commands/PersonAddGroupCommand.java rename to src/main/java/seedu/notor/logic/commands/PersonAddGroupCommand.java index c1ec5009079..de6e374a19f 100644 --- a/src/main/java/seedu/address/logic/commands/PersonAddGroupCommand.java +++ b/src/main/java/seedu/notor/logic/commands/PersonAddGroupCommand.java @@ -1,15 +1,15 @@ -package seedu.address.logic.commands; +package seedu.notor.logic.commands; import static java.util.Objects.requireNonNull; -import static seedu.address.logic.parser.CliSyntax.PREFIX_GROUP; -import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_GROUP; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_NAME; -import seedu.address.logic.commands.exceptions.CommandException; -import seedu.address.model.Model; -import seedu.address.model.group.SuperGroup; -import seedu.address.model.person.Person; +import seedu.notor.logic.commands.exceptions.CommandException; +import seedu.notor.model.Model; +import seedu.notor.model.group.SuperGroup; +import seedu.notor.model.person.Person; -public class PersonAddGroupCommand extends Command { +public class PersonAddGroupCommand implements Command { public static final String COMMAND_WORD = "person_add_group"; diff --git a/src/main/java/seedu/address/logic/commands/PersonAddSubGroupCommand.java b/src/main/java/seedu/notor/logic/commands/PersonAddSubGroupCommand.java similarity index 82% rename from src/main/java/seedu/address/logic/commands/PersonAddSubGroupCommand.java rename to src/main/java/seedu/notor/logic/commands/PersonAddSubGroupCommand.java index 9b74ef1660d..10fd66f50c6 100644 --- a/src/main/java/seedu/address/logic/commands/PersonAddSubGroupCommand.java +++ b/src/main/java/seedu/notor/logic/commands/PersonAddSubGroupCommand.java @@ -1,17 +1,17 @@ -package seedu.address.logic.commands; +package seedu.notor.logic.commands; import static java.util.Objects.requireNonNull; -import static seedu.address.logic.parser.CliSyntax.PREFIX_GROUP; -import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME; -import static seedu.address.logic.parser.CliSyntax.PREFIX_SUBGROUP; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_GROUP; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_NAME; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_SUBGROUP; -import seedu.address.logic.commands.exceptions.CommandException; -import seedu.address.model.Model; -import seedu.address.model.group.SubGroup; -import seedu.address.model.group.SuperGroup; -import seedu.address.model.person.Person; +import seedu.notor.logic.commands.exceptions.CommandException; +import seedu.notor.model.Model; +import seedu.notor.model.group.SubGroup; +import seedu.notor.model.group.SuperGroup; +import seedu.notor.model.person.Person; -public class PersonAddSubGroupCommand extends Command { +public class PersonAddSubGroupCommand implements Command { public static final String COMMAND_WORD = "person_add_subgroup"; diff --git a/src/main/java/seedu/address/logic/commands/PersonRemoveGroupCommand.java b/src/main/java/seedu/notor/logic/commands/PersonRemoveGroupCommand.java similarity index 81% rename from src/main/java/seedu/address/logic/commands/PersonRemoveGroupCommand.java rename to src/main/java/seedu/notor/logic/commands/PersonRemoveGroupCommand.java index 28a6c206b22..83a7903d0ca 100644 --- a/src/main/java/seedu/address/logic/commands/PersonRemoveGroupCommand.java +++ b/src/main/java/seedu/notor/logic/commands/PersonRemoveGroupCommand.java @@ -1,16 +1,16 @@ -package seedu.address.logic.commands; +package seedu.notor.logic.commands; import static java.util.Objects.requireNonNull; -import static seedu.address.logic.parser.CliSyntax.PREFIX_GROUP; -import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_GROUP; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_NAME; import java.util.Arrays; -import seedu.address.logic.commands.exceptions.CommandException; -import seedu.address.model.Model; -import seedu.address.model.person.Person; +import seedu.notor.logic.commands.exceptions.CommandException; +import seedu.notor.model.Model; +import seedu.notor.model.person.Person; -public class PersonRemoveGroupCommand extends Command { +public class PersonRemoveGroupCommand implements Command { public static final String COMMAND_WORD = "person_rm_group"; diff --git a/src/main/java/seedu/address/logic/commands/PersonRemoveSubGroupCommand.java b/src/main/java/seedu/notor/logic/commands/PersonRemoveSubGroupCommand.java similarity index 79% rename from src/main/java/seedu/address/logic/commands/PersonRemoveSubGroupCommand.java rename to src/main/java/seedu/notor/logic/commands/PersonRemoveSubGroupCommand.java index adc36e2c960..24675006531 100644 --- a/src/main/java/seedu/address/logic/commands/PersonRemoveSubGroupCommand.java +++ b/src/main/java/seedu/notor/logic/commands/PersonRemoveSubGroupCommand.java @@ -1,16 +1,16 @@ -package seedu.address.logic.commands; +package seedu.notor.logic.commands; import static java.util.Objects.requireNonNull; -import static seedu.address.logic.parser.CliSyntax.PREFIX_GROUP; -import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME; -import static seedu.address.logic.parser.CliSyntax.PREFIX_SUBGROUP; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_GROUP; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_NAME; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_SUBGROUP; -import seedu.address.logic.commands.exceptions.CommandException; -import seedu.address.model.Model; -import seedu.address.model.group.SubGroup; -import seedu.address.model.person.Person; +import seedu.notor.logic.commands.exceptions.CommandException; +import seedu.notor.model.Model; +import seedu.notor.model.group.SubGroup; +import seedu.notor.model.person.Person; -public class PersonRemoveSubGroupCommand extends Command { +public class PersonRemoveSubGroupCommand implements Command { public static final String COMMAND_WORD = "person_rm_subgroup"; diff --git a/src/main/java/seedu/address/logic/commands/TargetedCommand.java b/src/main/java/seedu/notor/logic/commands/TargetedCommand.java similarity index 58% rename from src/main/java/seedu/address/logic/commands/TargetedCommand.java rename to src/main/java/seedu/notor/logic/commands/TargetedCommand.java index ee831895275..b1edeee8476 100644 --- a/src/main/java/seedu/address/logic/commands/TargetedCommand.java +++ b/src/main/java/seedu/notor/logic/commands/TargetedCommand.java @@ -1,8 +1,8 @@ -package seedu.address.logic.commands; +package seedu.notor.logic.commands; -import seedu.address.logic.commands.exceptions.CommandException; -import seedu.address.logic.executors.exceptions.ExecuteException; -import seedu.address.model.Model; +import seedu.notor.logic.commands.exceptions.CommandException; +import seedu.notor.logic.executors.exceptions.ExecuteException; +import seedu.notor.model.Model; public abstract class TargetedCommand implements Command { public abstract CommandResult execute() throws CommandException, ExecuteException; diff --git a/src/main/java/seedu/address/logic/commands/exceptions/CommandException.java b/src/main/java/seedu/notor/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/notor/logic/commands/exceptions/CommandException.java index a16bd14f2cd..f47197903d5 100644 --- a/src/main/java/seedu/address/logic/commands/exceptions/CommandException.java +++ b/src/main/java/seedu/notor/logic/commands/exceptions/CommandException.java @@ -1,4 +1,4 @@ -package seedu.address.logic.commands.exceptions; +package seedu.notor.logic.commands.exceptions; /** * Represents an error which occurs during execution of a {@link Command}. diff --git a/src/main/java/seedu/notor/logic/commands/group/GroupCommand.java b/src/main/java/seedu/notor/logic/commands/group/GroupCommand.java new file mode 100644 index 00000000000..78cdaaa5852 --- /dev/null +++ b/src/main/java/seedu/notor/logic/commands/group/GroupCommand.java @@ -0,0 +1,8 @@ +package seedu.notor.logic.commands.group; + +import seedu.notor.logic.commands.Command; +import seedu.notor.model.group.Group; + +public abstract class GroupCommand implements Command { + private Group target; +} diff --git a/src/main/java/seedu/address/logic/commands/person/PersonCommand.java b/src/main/java/seedu/notor/logic/commands/person/PersonCommand.java similarity index 81% rename from src/main/java/seedu/address/logic/commands/person/PersonCommand.java rename to src/main/java/seedu/notor/logic/commands/person/PersonCommand.java index 4100c79983b..c871b3a1415 100644 --- a/src/main/java/seedu/address/logic/commands/person/PersonCommand.java +++ b/src/main/java/seedu/notor/logic/commands/person/PersonCommand.java @@ -1,7 +1,7 @@ -package seedu.address.logic.commands.person; +package seedu.notor.logic.commands.person; -import seedu.address.commons.core.index.Index; -import seedu.address.logic.commands.TargetedCommand; +import seedu.notor.commons.core.index.Index; +import seedu.notor.logic.commands.TargetedCommand; public abstract class PersonCommand extends TargetedCommand { public static final String COMMAND_WORD = "person"; diff --git a/src/main/java/seedu/address/logic/commands/person/PersonCreateCommand.java b/src/main/java/seedu/notor/logic/commands/person/PersonCreateCommand.java similarity index 70% rename from src/main/java/seedu/address/logic/commands/person/PersonCreateCommand.java rename to src/main/java/seedu/notor/logic/commands/person/PersonCreateCommand.java index 01b2814a747..7697bff3726 100644 --- a/src/main/java/seedu/address/logic/commands/person/PersonCreateCommand.java +++ b/src/main/java/seedu/notor/logic/commands/person/PersonCreateCommand.java @@ -1,17 +1,17 @@ -package seedu.address.logic.commands.person; +package seedu.notor.logic.commands.person; import static java.util.Objects.requireNonNull; -import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL; -import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME; -import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE; -import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG; - -import seedu.address.commons.core.index.Index; -import seedu.address.logic.commands.CommandResult; -import seedu.address.logic.executors.exceptions.ExecuteException; -import seedu.address.logic.executors.person.PersonCreateExecutor; -import seedu.address.logic.parser.exceptions.ParseException; -import seedu.address.model.person.Person; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_EMAIL; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_NAME; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_PHONE; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_TAG; + +import seedu.notor.commons.core.index.Index; +import seedu.notor.logic.commands.CommandResult; +import seedu.notor.logic.executors.exceptions.ExecuteException; +import seedu.notor.logic.executors.person.PersonCreateExecutor; +import seedu.notor.logic.parser.exceptions.ParseException; +import seedu.notor.model.person.Person; /** * Adds a person to the address book. diff --git a/src/main/java/seedu/address/logic/commands/person/PersonDeleteCommand.java b/src/main/java/seedu/notor/logic/commands/person/PersonDeleteCommand.java similarity index 82% rename from src/main/java/seedu/address/logic/commands/person/PersonDeleteCommand.java rename to src/main/java/seedu/notor/logic/commands/person/PersonDeleteCommand.java index 50221863a04..570ffb40444 100644 --- a/src/main/java/seedu/address/logic/commands/person/PersonDeleteCommand.java +++ b/src/main/java/seedu/notor/logic/commands/person/PersonDeleteCommand.java @@ -1,11 +1,11 @@ -package seedu.address.logic.commands.person; +package seedu.notor.logic.commands.person; import static java.util.Objects.requireNonNull; -import seedu.address.commons.core.index.Index; -import seedu.address.logic.commands.CommandResult; -import seedu.address.logic.executors.exceptions.ExecuteException; -import seedu.address.logic.executors.person.PersonDeleteExecutor; +import seedu.notor.commons.core.index.Index; +import seedu.notor.logic.commands.CommandResult; +import seedu.notor.logic.executors.exceptions.ExecuteException; +import seedu.notor.logic.executors.person.PersonDeleteExecutor; /** * Deletes a person identified using it's displayed index from the address book. diff --git a/src/main/java/seedu/address/logic/commands/person/PersonEditCommand.java b/src/main/java/seedu/notor/logic/commands/person/PersonEditCommand.java similarity index 74% rename from src/main/java/seedu/address/logic/commands/person/PersonEditCommand.java rename to src/main/java/seedu/notor/logic/commands/person/PersonEditCommand.java index 4e93879409a..2d1b25d51f9 100644 --- a/src/main/java/seedu/address/logic/commands/person/PersonEditCommand.java +++ b/src/main/java/seedu/notor/logic/commands/person/PersonEditCommand.java @@ -1,16 +1,16 @@ -package seedu.address.logic.commands.person; +package seedu.notor.logic.commands.person; -import static seedu.address.commons.util.CollectionUtil.requireAllNonNull; -import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL; -import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME; -import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE; -import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG; +import static seedu.notor.commons.util.CollectionUtil.requireAllNonNull; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_EMAIL; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_NAME; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_PHONE; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_TAG; -import seedu.address.commons.core.index.Index; -import seedu.address.logic.commands.CommandResult; -import seedu.address.logic.executors.exceptions.ExecuteException; -import seedu.address.logic.executors.person.PersonEditExecutor; -import seedu.address.logic.executors.person.PersonExecutor; +import seedu.notor.commons.core.index.Index; +import seedu.notor.logic.commands.CommandResult; +import seedu.notor.logic.executors.exceptions.ExecuteException; +import seedu.notor.logic.executors.person.PersonEditExecutor; +import seedu.notor.logic.executors.person.PersonExecutor; /** * Edits the details of an existing person in the address book. diff --git a/src/main/java/seedu/address/logic/commands/person/PersonNoteCommand.java b/src/main/java/seedu/notor/logic/commands/person/PersonNoteCommand.java similarity index 78% rename from src/main/java/seedu/address/logic/commands/person/PersonNoteCommand.java rename to src/main/java/seedu/notor/logic/commands/person/PersonNoteCommand.java index 09699af0c9d..e9aa8435156 100644 --- a/src/main/java/seedu/address/logic/commands/person/PersonNoteCommand.java +++ b/src/main/java/seedu/notor/logic/commands/person/PersonNoteCommand.java @@ -1,11 +1,11 @@ -package seedu.address.logic.commands.person; +package seedu.notor.logic.commands.person; -import static seedu.address.commons.util.CollectionUtil.requireAllNonNull; +import static seedu.notor.commons.util.CollectionUtil.requireAllNonNull; -import seedu.address.commons.core.index.Index; -import seedu.address.logic.commands.CommandResult; -import seedu.address.logic.executors.exceptions.ExecuteException; -import seedu.address.logic.executors.person.PersonNoteExecutor; +import seedu.notor.commons.core.index.Index; +import seedu.notor.logic.commands.CommandResult; +import seedu.notor.logic.executors.exceptions.ExecuteException; +import seedu.notor.logic.executors.person.PersonNoteExecutor; /** * diff --git a/src/main/java/seedu/address/logic/executors/Executor.java b/src/main/java/seedu/notor/logic/executors/Executor.java similarity index 61% rename from src/main/java/seedu/address/logic/executors/Executor.java rename to src/main/java/seedu/notor/logic/executors/Executor.java index 10f374c50fb..59bdf40ff3c 100644 --- a/src/main/java/seedu/address/logic/executors/Executor.java +++ b/src/main/java/seedu/notor/logic/executors/Executor.java @@ -1,10 +1,10 @@ -package seedu.address.logic.executors; +package seedu.notor.logic.executors; import static java.util.Objects.requireNonNull; -import seedu.address.logic.commands.CommandResult; -import seedu.address.logic.executors.exceptions.ExecuteException; -import seedu.address.model.Model; +import seedu.notor.logic.commands.CommandResult; +import seedu.notor.logic.executors.exceptions.ExecuteException; +import seedu.notor.model.Model; public abstract class Executor { protected static Model model; diff --git a/src/main/java/seedu/address/logic/executors/exceptions/ExecuteException.java b/src/main/java/seedu/notor/logic/executors/exceptions/ExecuteException.java similarity index 85% rename from src/main/java/seedu/address/logic/executors/exceptions/ExecuteException.java rename to src/main/java/seedu/notor/logic/executors/exceptions/ExecuteException.java index 584aebe055c..c9d09a38831 100644 --- a/src/main/java/seedu/address/logic/executors/exceptions/ExecuteException.java +++ b/src/main/java/seedu/notor/logic/executors/exceptions/ExecuteException.java @@ -1,4 +1,4 @@ -package seedu.address.logic.executors.exceptions; +package seedu.notor.logic.executors.exceptions; /** * Represents a parse error encountered by a parser. diff --git a/src/main/java/seedu/notor/logic/executors/group/GroupExecutor.java b/src/main/java/seedu/notor/logic/executors/group/GroupExecutor.java new file mode 100644 index 00000000000..a4ec9b991d8 --- /dev/null +++ b/src/main/java/seedu/notor/logic/executors/group/GroupExecutor.java @@ -0,0 +1,6 @@ +package seedu.notor.logic.executors.group; + +import seedu.notor.logic.executors.Executor; + +public abstract class GroupExecutor extends Executor { +} diff --git a/src/main/java/seedu/address/logic/executors/person/PersonCreateExecutor.java b/src/main/java/seedu/notor/logic/executors/person/PersonCreateExecutor.java similarity index 85% rename from src/main/java/seedu/address/logic/executors/person/PersonCreateExecutor.java rename to src/main/java/seedu/notor/logic/executors/person/PersonCreateExecutor.java index 01537621696..57a357fe016 100644 --- a/src/main/java/seedu/address/logic/executors/person/PersonCreateExecutor.java +++ b/src/main/java/seedu/notor/logic/executors/person/PersonCreateExecutor.java @@ -1,11 +1,11 @@ -package seedu.address.logic.executors.person; +package seedu.notor.logic.executors.person; import static java.util.Objects.requireNonNull; -import seedu.address.commons.core.index.Index; -import seedu.address.logic.commands.CommandResult; -import seedu.address.logic.executors.exceptions.ExecuteException; -import seedu.address.model.person.Person; +import seedu.notor.commons.core.index.Index; +import seedu.notor.logic.commands.CommandResult; +import seedu.notor.logic.executors.exceptions.ExecuteException; +import seedu.notor.model.person.Person; /** * Executor for a PersonCreateCommand. diff --git a/src/main/java/seedu/address/logic/executors/person/PersonDeleteExecutor.java b/src/main/java/seedu/notor/logic/executors/person/PersonDeleteExecutor.java similarity index 66% rename from src/main/java/seedu/address/logic/executors/person/PersonDeleteExecutor.java rename to src/main/java/seedu/notor/logic/executors/person/PersonDeleteExecutor.java index 30b7cb58ca0..39238154514 100644 --- a/src/main/java/seedu/address/logic/executors/person/PersonDeleteExecutor.java +++ b/src/main/java/seedu/notor/logic/executors/person/PersonDeleteExecutor.java @@ -1,9 +1,9 @@ -package seedu.address.logic.executors.person; +package seedu.notor.logic.executors.person; -import seedu.address.commons.core.index.Index; -import seedu.address.logic.commands.CommandResult; -import seedu.address.logic.executors.exceptions.ExecuteException; -import seedu.address.model.person.Person; +import seedu.notor.commons.core.index.Index; +import seedu.notor.logic.commands.CommandResult; +import seedu.notor.logic.executors.exceptions.ExecuteException; +import seedu.notor.model.person.Person; public class PersonDeleteExecutor extends PersonExecutor { public static final String MESSAGE_DELETE_PERSON_SUCCESS = "Deleted Person: %1$s"; diff --git a/src/main/java/seedu/address/logic/executors/person/PersonEditExecutor.java b/src/main/java/seedu/notor/logic/executors/person/PersonEditExecutor.java similarity index 90% rename from src/main/java/seedu/address/logic/executors/person/PersonEditExecutor.java rename to src/main/java/seedu/notor/logic/executors/person/PersonEditExecutor.java index aca501dec5d..0d7bd4bfb3d 100644 --- a/src/main/java/seedu/address/logic/executors/person/PersonEditExecutor.java +++ b/src/main/java/seedu/notor/logic/executors/person/PersonEditExecutor.java @@ -1,23 +1,23 @@ -package seedu.address.logic.executors.person; +package seedu.notor.logic.executors.person; -import static seedu.address.commons.util.CollectionUtil.requireAllNonNull; -import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS; +import static seedu.notor.commons.util.CollectionUtil.requireAllNonNull; +import static seedu.notor.model.Model.PREDICATE_SHOW_ALL_PERSONS; import java.util.Collections; import java.util.HashSet; import java.util.Optional; import java.util.Set; -import seedu.address.commons.core.index.Index; -import seedu.address.commons.util.CollectionUtil; -import seedu.address.logic.commands.CommandResult; -import seedu.address.logic.executors.exceptions.ExecuteException; -import seedu.address.model.person.Email; -import seedu.address.model.person.Name; -import seedu.address.model.person.Note; -import seedu.address.model.person.Person; -import seedu.address.model.person.Phone; -import seedu.address.model.tag.Tag; +import seedu.notor.commons.core.index.Index; +import seedu.notor.commons.util.CollectionUtil; +import seedu.notor.logic.commands.CommandResult; +import seedu.notor.logic.executors.exceptions.ExecuteException; +import seedu.notor.model.person.Email; +import seedu.notor.model.person.Name; +import seedu.notor.model.person.Note; +import seedu.notor.model.person.Person; +import seedu.notor.model.person.Phone; +import seedu.notor.model.tag.Tag; /** * Executor for a PersonEditCommand. diff --git a/src/main/java/seedu/address/logic/executors/person/PersonExecutor.java b/src/main/java/seedu/notor/logic/executors/person/PersonExecutor.java similarity index 77% rename from src/main/java/seedu/address/logic/executors/person/PersonExecutor.java rename to src/main/java/seedu/notor/logic/executors/person/PersonExecutor.java index 1a883abdcc0..415674b4c29 100644 --- a/src/main/java/seedu/address/logic/executors/person/PersonExecutor.java +++ b/src/main/java/seedu/notor/logic/executors/person/PersonExecutor.java @@ -1,12 +1,12 @@ -package seedu.address.logic.executors.person; +package seedu.notor.logic.executors.person; import java.util.List; -import seedu.address.commons.core.Messages; -import seedu.address.commons.core.index.Index; -import seedu.address.logic.executors.Executor; -import seedu.address.logic.executors.exceptions.ExecuteException; -import seedu.address.model.person.Person; +import seedu.notor.commons.core.Messages; +import seedu.notor.commons.core.index.Index; +import seedu.notor.logic.executors.Executor; +import seedu.notor.logic.executors.exceptions.ExecuteException; +import seedu.notor.model.person.Person; public abstract class PersonExecutor extends Executor { protected final Index index; diff --git a/src/main/java/seedu/address/logic/executors/person/PersonNoteExecutor.java b/src/main/java/seedu/notor/logic/executors/person/PersonNoteExecutor.java similarity index 81% rename from src/main/java/seedu/address/logic/executors/person/PersonNoteExecutor.java rename to src/main/java/seedu/notor/logic/executors/person/PersonNoteExecutor.java index ba0c1973bdf..63ac7c0af0c 100644 --- a/src/main/java/seedu/address/logic/executors/person/PersonNoteExecutor.java +++ b/src/main/java/seedu/notor/logic/executors/person/PersonNoteExecutor.java @@ -1,12 +1,12 @@ -package seedu.address.logic.executors.person; +package seedu.notor.logic.executors.person; -import static seedu.address.commons.util.CollectionUtil.requireAllNonNull; -import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS; +import static seedu.notor.commons.util.CollectionUtil.requireAllNonNull; +import static seedu.notor.model.Model.PREDICATE_SHOW_ALL_PERSONS; -import seedu.address.commons.core.index.Index; -import seedu.address.logic.commands.CommandResult; -import seedu.address.logic.executors.exceptions.ExecuteException; -import seedu.address.model.person.Person; +import seedu.notor.commons.core.index.Index; +import seedu.notor.logic.commands.CommandResult; +import seedu.notor.logic.executors.exceptions.ExecuteException; +import seedu.notor.model.person.Person; /** * Executor for a PersonNoteCommand. diff --git a/src/main/java/seedu/address/logic/parser/AddressBookParser.java b/src/main/java/seedu/notor/logic/parser/AddressBookParser.java similarity index 66% rename from src/main/java/seedu/address/logic/parser/AddressBookParser.java rename to src/main/java/seedu/notor/logic/parser/AddressBookParser.java index 9f8a979434a..2a5bf24830f 100644 --- a/src/main/java/seedu/address/logic/parser/AddressBookParser.java +++ b/src/main/java/seedu/notor/logic/parser/AddressBookParser.java @@ -1,31 +1,31 @@ -package seedu.address.logic.parser; +package seedu.notor.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.notor.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.notor.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND; import java.util.regex.Matcher; import java.util.regex.Pattern; -import seedu.address.logic.commands.ClearCommand; -import seedu.address.logic.commands.Command; -import seedu.address.logic.commands.ExitCommand; -import seedu.address.logic.commands.FindCommand; -import seedu.address.logic.commands.GroupCreateCommand; -import seedu.address.logic.commands.HelpCommand; -import seedu.address.logic.commands.ListCommand; -import seedu.address.logic.commands.PersonAddGroupCommand; -import seedu.address.logic.commands.PersonAddSubGroupCommand; -import seedu.address.logic.commands.PersonRemoveGroupCommand; -import seedu.address.logic.commands.PersonRemoveSubGroupCommand; -import seedu.address.logic.commands.person.PersonCreateCommand; -import seedu.address.logic.commands.person.PersonDeleteCommand; -import seedu.address.logic.commands.person.PersonEditCommand; -import seedu.address.logic.commands.person.PersonNoteCommand; -import seedu.address.logic.parser.exceptions.ParseException; -import seedu.address.logic.parser.person.PersonCreateCommandParser; -import seedu.address.logic.parser.person.PersonDeleteCommandParser; -import seedu.address.logic.parser.person.PersonEditCommandParser; -import seedu.address.logic.parser.person.PersonNoteCommandParser; +import seedu.notor.logic.commands.ClearCommand; +import seedu.notor.logic.commands.Command; +import seedu.notor.logic.commands.ExitCommand; +import seedu.notor.logic.commands.FindCommand; +import seedu.notor.logic.commands.GroupCreateCommand; +import seedu.notor.logic.commands.HelpCommand; +import seedu.notor.logic.commands.ListCommand; +import seedu.notor.logic.commands.PersonAddGroupCommand; +import seedu.notor.logic.commands.PersonAddSubGroupCommand; +import seedu.notor.logic.commands.PersonRemoveGroupCommand; +import seedu.notor.logic.commands.PersonRemoveSubGroupCommand; +import seedu.notor.logic.commands.person.PersonCreateCommand; +import seedu.notor.logic.commands.person.PersonDeleteCommand; +import seedu.notor.logic.commands.person.PersonEditCommand; +import seedu.notor.logic.commands.person.PersonNoteCommand; +import seedu.notor.logic.parser.exceptions.ParseException; +import seedu.notor.logic.parser.person.PersonCreateCommandParser; +import seedu.notor.logic.parser.person.PersonDeleteCommandParser; +import seedu.notor.logic.parser.person.PersonEditCommandParser; +import seedu.notor.logic.parser.person.PersonNoteCommandParser; /** * Parses user input. diff --git a/src/main/java/seedu/address/logic/parser/ArgumentMultimap.java b/src/main/java/seedu/notor/logic/parser/ArgumentMultimap.java similarity index 98% rename from src/main/java/seedu/address/logic/parser/ArgumentMultimap.java rename to src/main/java/seedu/notor/logic/parser/ArgumentMultimap.java index 0a150cc5a7c..628c0313d97 100644 --- a/src/main/java/seedu/address/logic/parser/ArgumentMultimap.java +++ b/src/main/java/seedu/notor/logic/parser/ArgumentMultimap.java @@ -1,4 +1,4 @@ -package seedu.address.logic.parser; +package seedu.notor.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/notor/logic/parser/ArgumentTokenizer.java similarity index 99% rename from src/main/java/seedu/address/logic/parser/ArgumentTokenizer.java rename to src/main/java/seedu/notor/logic/parser/ArgumentTokenizer.java index 7f6cbece258..691e4ef9d09 100644 --- a/src/main/java/seedu/address/logic/parser/ArgumentTokenizer.java +++ b/src/main/java/seedu/notor/logic/parser/ArgumentTokenizer.java @@ -1,4 +1,4 @@ -package seedu.address.logic.parser; +package seedu.notor.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/notor/logic/parser/CliSyntax.java similarity index 94% rename from src/main/java/seedu/address/logic/parser/CliSyntax.java rename to src/main/java/seedu/notor/logic/parser/CliSyntax.java index 89ee2e804fa..831e1fca71d 100644 --- a/src/main/java/seedu/address/logic/parser/CliSyntax.java +++ b/src/main/java/seedu/notor/logic/parser/CliSyntax.java @@ -1,4 +1,4 @@ -package seedu.address.logic.parser; +package seedu.notor.logic.parser; /** * Contains Command Line Interface (CLI) syntax definitions common to multiple commands diff --git a/src/main/java/seedu/address/logic/parser/FindCommandParser.java b/src/main/java/seedu/notor/logic/parser/FindCommandParser.java similarity index 74% rename from src/main/java/seedu/address/logic/parser/FindCommandParser.java rename to src/main/java/seedu/notor/logic/parser/FindCommandParser.java index 212cdd7cf7d..1f4c614c5bd 100644 --- a/src/main/java/seedu/address/logic/parser/FindCommandParser.java +++ b/src/main/java/seedu/notor/logic/parser/FindCommandParser.java @@ -1,12 +1,12 @@ -package seedu.address.logic.parser; +package seedu.notor.logic.parser; -import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.notor.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.person.NameContainsKeywordsPredicate; +import seedu.notor.logic.commands.FindCommand; +import seedu.notor.logic.parser.exceptions.ParseException; +import seedu.notor.model.person.NameContainsKeywordsPredicate; /** * Parses input arguments and creates a new FindCommand object diff --git a/src/main/java/seedu/address/logic/parser/GroupCreateCommandParser.java b/src/main/java/seedu/notor/logic/parser/GroupCreateCommandParser.java similarity index 79% rename from src/main/java/seedu/address/logic/parser/GroupCreateCommandParser.java rename to src/main/java/seedu/notor/logic/parser/GroupCreateCommandParser.java index 9f7422c391d..3cda941d8d8 100644 --- a/src/main/java/seedu/address/logic/parser/GroupCreateCommandParser.java +++ b/src/main/java/seedu/notor/logic/parser/GroupCreateCommandParser.java @@ -1,14 +1,14 @@ -package seedu.address.logic.parser; +package seedu.notor.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_GROUP; +import static seedu.notor.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_GROUP; import java.util.stream.Stream; -import seedu.address.logic.commands.GroupCreateCommand; -import seedu.address.logic.parser.exceptions.ParseException; -import seedu.address.model.group.SuperGroup; +import seedu.notor.logic.commands.GroupCreateCommand; +import seedu.notor.logic.parser.exceptions.ParseException; +import seedu.notor.model.group.SuperGroup; /** * Parses input arguments to create a group command. diff --git a/src/main/java/seedu/address/logic/parser/Parser.java b/src/main/java/seedu/notor/logic/parser/Parser.java similarity index 73% rename from src/main/java/seedu/address/logic/parser/Parser.java rename to src/main/java/seedu/notor/logic/parser/Parser.java index 6baf173c261..fe9f560fe41 100644 --- a/src/main/java/seedu/address/logic/parser/Parser.java +++ b/src/main/java/seedu/notor/logic/parser/Parser.java @@ -1,7 +1,7 @@ -package seedu.address.logic.parser; +package seedu.notor.logic.parser; -import seedu.address.logic.commands.Command; -import seedu.address.logic.parser.exceptions.ParseException; +import seedu.notor.logic.commands.Command; +import seedu.notor.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/notor/logic/parser/ParserUtil.java similarity index 90% rename from src/main/java/seedu/address/logic/parser/ParserUtil.java rename to src/main/java/seedu/notor/logic/parser/ParserUtil.java index 59467cd3118..0cb0b906f16 100644 --- a/src/main/java/seedu/address/logic/parser/ParserUtil.java +++ b/src/main/java/seedu/notor/logic/parser/ParserUtil.java @@ -1,4 +1,4 @@ -package seedu.address.logic.parser; +package seedu.notor.logic.parser; import static java.util.Objects.requireNonNull; @@ -6,15 +6,15 @@ 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.group.Group; -import seedu.address.model.group.SuperGroup; -import seedu.address.model.person.Email; -import seedu.address.model.person.Name; -import seedu.address.model.person.Phone; -import seedu.address.model.tag.Tag; +import seedu.notor.commons.core.index.Index; +import seedu.notor.commons.util.StringUtil; +import seedu.notor.logic.parser.exceptions.ParseException; +import seedu.notor.model.group.Group; +import seedu.notor.model.group.SuperGroup; +import seedu.notor.model.person.Email; +import seedu.notor.model.person.Name; +import seedu.notor.model.person.Phone; +import seedu.notor.model.tag.Tag; /** * Contains utility methods used for parsing strings in the various *Parser classes. diff --git a/src/main/java/seedu/address/logic/parser/PersonAddGroupCommandParser.java b/src/main/java/seedu/notor/logic/parser/PersonAddGroupCommandParser.java similarity index 80% rename from src/main/java/seedu/address/logic/parser/PersonAddGroupCommandParser.java rename to src/main/java/seedu/notor/logic/parser/PersonAddGroupCommandParser.java index 0b12ed0ad04..e4057dc0af2 100644 --- a/src/main/java/seedu/address/logic/parser/PersonAddGroupCommandParser.java +++ b/src/main/java/seedu/notor/logic/parser/PersonAddGroupCommandParser.java @@ -1,14 +1,14 @@ -package seedu.address.logic.parser; +package seedu.notor.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_GROUP; -import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME; +import static seedu.notor.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_GROUP; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_NAME; import java.util.stream.Stream; -import seedu.address.logic.commands.PersonAddGroupCommand; -import seedu.address.logic.parser.exceptions.ParseException; +import seedu.notor.logic.commands.PersonAddGroupCommand; +import seedu.notor.logic.parser.exceptions.ParseException; /** * Parses input arguments to create a person command. diff --git a/src/main/java/seedu/address/logic/parser/PersonAddSubGroupCommandParser.java b/src/main/java/seedu/notor/logic/parser/PersonAddSubGroupCommandParser.java similarity index 79% rename from src/main/java/seedu/address/logic/parser/PersonAddSubGroupCommandParser.java rename to src/main/java/seedu/notor/logic/parser/PersonAddSubGroupCommandParser.java index eb791681a71..5368dc7af77 100644 --- a/src/main/java/seedu/address/logic/parser/PersonAddSubGroupCommandParser.java +++ b/src/main/java/seedu/notor/logic/parser/PersonAddSubGroupCommandParser.java @@ -1,15 +1,15 @@ -package seedu.address.logic.parser; +package seedu.notor.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_GROUP; -import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME; -import static seedu.address.logic.parser.CliSyntax.PREFIX_SUBGROUP; +import static seedu.notor.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_GROUP; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_NAME; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_SUBGROUP; import java.util.stream.Stream; -import seedu.address.logic.commands.PersonAddSubGroupCommand; -import seedu.address.logic.parser.exceptions.ParseException; +import seedu.notor.logic.commands.PersonAddSubGroupCommand; +import seedu.notor.logic.parser.exceptions.ParseException; /** * Parses input arguments to create a person command. diff --git a/src/main/java/seedu/address/logic/parser/PersonRemoveGroupCommandParser.java b/src/main/java/seedu/notor/logic/parser/PersonRemoveGroupCommandParser.java similarity index 78% rename from src/main/java/seedu/address/logic/parser/PersonRemoveGroupCommandParser.java rename to src/main/java/seedu/notor/logic/parser/PersonRemoveGroupCommandParser.java index 102c83809e7..2d853923118 100644 --- a/src/main/java/seedu/address/logic/parser/PersonRemoveGroupCommandParser.java +++ b/src/main/java/seedu/notor/logic/parser/PersonRemoveGroupCommandParser.java @@ -1,15 +1,15 @@ -package seedu.address.logic.parser; +package seedu.notor.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_GROUP; -import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME; +import static seedu.notor.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_GROUP; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_NAME; import java.util.stream.Stream; -import seedu.address.logic.commands.PersonAddGroupCommand; -import seedu.address.logic.commands.PersonRemoveGroupCommand; -import seedu.address.logic.parser.exceptions.ParseException; +import seedu.notor.logic.commands.PersonAddGroupCommand; +import seedu.notor.logic.commands.PersonRemoveGroupCommand; +import seedu.notor.logic.parser.exceptions.ParseException; /** * Parses input arguments to create a person command. diff --git a/src/main/java/seedu/address/logic/parser/PersonRemoveSubGroupCommandParser.java b/src/main/java/seedu/notor/logic/parser/PersonRemoveSubGroupCommandParser.java similarity index 77% rename from src/main/java/seedu/address/logic/parser/PersonRemoveSubGroupCommandParser.java rename to src/main/java/seedu/notor/logic/parser/PersonRemoveSubGroupCommandParser.java index 4fa527f8418..98d9587ed4a 100644 --- a/src/main/java/seedu/address/logic/parser/PersonRemoveSubGroupCommandParser.java +++ b/src/main/java/seedu/notor/logic/parser/PersonRemoveSubGroupCommandParser.java @@ -1,16 +1,16 @@ -package seedu.address.logic.parser; +package seedu.notor.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_GROUP; -import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME; -import static seedu.address.logic.parser.CliSyntax.PREFIX_SUBGROUP; +import static seedu.notor.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_GROUP; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_NAME; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_SUBGROUP; import java.util.stream.Stream; -import seedu.address.logic.commands.PersonAddSubGroupCommand; -import seedu.address.logic.commands.PersonRemoveSubGroupCommand; -import seedu.address.logic.parser.exceptions.ParseException; +import seedu.notor.logic.commands.PersonAddSubGroupCommand; +import seedu.notor.logic.commands.PersonRemoveSubGroupCommand; +import seedu.notor.logic.parser.exceptions.ParseException; /** * Parses input arguments to create a person command. diff --git a/src/main/java/seedu/address/logic/parser/Prefix.java b/src/main/java/seedu/notor/logic/parser/Prefix.java similarity index 95% rename from src/main/java/seedu/address/logic/parser/Prefix.java rename to src/main/java/seedu/notor/logic/parser/Prefix.java index c859d5fa5db..a21bc939b13 100644 --- a/src/main/java/seedu/address/logic/parser/Prefix.java +++ b/src/main/java/seedu/notor/logic/parser/Prefix.java @@ -1,4 +1,4 @@ -package seedu.address.logic.parser; +package seedu.notor.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/exceptions/ParseException.java b/src/main/java/seedu/notor/logic/parser/exceptions/ParseException.java similarity index 73% rename from src/main/java/seedu/address/logic/parser/exceptions/ParseException.java rename to src/main/java/seedu/notor/logic/parser/exceptions/ParseException.java index 158a1a54c1c..775ad733a38 100644 --- a/src/main/java/seedu/address/logic/parser/exceptions/ParseException.java +++ b/src/main/java/seedu/notor/logic/parser/exceptions/ParseException.java @@ -1,6 +1,6 @@ -package seedu.address.logic.parser.exceptions; +package seedu.notor.logic.parser.exceptions; -import seedu.address.commons.exceptions.IllegalValueException; +import seedu.notor.commons.exceptions.IllegalValueException; /** * Represents a parse error encountered by a parser. diff --git a/src/main/java/seedu/address/logic/parser/group/GroupCommandParser.java b/src/main/java/seedu/notor/logic/parser/group/GroupCommandParser.java similarity index 67% rename from src/main/java/seedu/address/logic/parser/group/GroupCommandParser.java rename to src/main/java/seedu/notor/logic/parser/group/GroupCommandParser.java index 5a5c8eb62b4..759d0e76d43 100644 --- a/src/main/java/seedu/address/logic/parser/group/GroupCommandParser.java +++ b/src/main/java/seedu/notor/logic/parser/group/GroupCommandParser.java @@ -1,9 +1,9 @@ -package seedu.address.logic.parser.group; +package seedu.notor.logic.parser.group; -import seedu.address.commons.core.index.Index; -import seedu.address.logic.commands.group.GroupCommand; -import seedu.address.logic.parser.Parser; -import seedu.address.model.group.Group; +import seedu.notor.commons.core.index.Index; +import seedu.notor.logic.commands.group.GroupCommand; +import seedu.notor.logic.parser.Parser; +import seedu.notor.model.group.Group; public abstract class GroupCommandParser extends Parser { /** diff --git a/src/main/java/seedu/address/logic/parser/person/PersonCommandParser.java b/src/main/java/seedu/notor/logic/parser/person/PersonCommandParser.java similarity index 63% rename from src/main/java/seedu/address/logic/parser/person/PersonCommandParser.java rename to src/main/java/seedu/notor/logic/parser/person/PersonCommandParser.java index 376c43b54c2..f84de769628 100644 --- a/src/main/java/seedu/address/logic/parser/person/PersonCommandParser.java +++ b/src/main/java/seedu/notor/logic/parser/person/PersonCommandParser.java @@ -1,14 +1,14 @@ -package seedu.address.logic.parser.person; +package seedu.notor.logic.parser.person; -import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.notor.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; -import seedu.address.commons.core.index.Index; -import seedu.address.logic.commands.person.PersonCommand; -import seedu.address.logic.commands.person.PersonEditCommand; -import seedu.address.logic.parser.ArgumentMultimap; -import seedu.address.logic.parser.Parser; -import seedu.address.logic.parser.ParserUtil; -import seedu.address.logic.parser.exceptions.ParseException; +import seedu.notor.commons.core.index.Index; +import seedu.notor.logic.commands.person.PersonCommand; +import seedu.notor.logic.commands.person.PersonEditCommand; +import seedu.notor.logic.parser.ArgumentMultimap; +import seedu.notor.logic.parser.Parser; +import seedu.notor.logic.parser.ParserUtil; +import seedu.notor.logic.parser.exceptions.ParseException; public abstract class PersonCommandParser extends Parser { protected Index parseIndex(ArgumentMultimap argMultimap) throws ParseException { diff --git a/src/main/java/seedu/address/logic/parser/person/PersonCreateCommandParser.java b/src/main/java/seedu/notor/logic/parser/person/PersonCreateCommandParser.java similarity index 65% rename from src/main/java/seedu/address/logic/parser/person/PersonCreateCommandParser.java rename to src/main/java/seedu/notor/logic/parser/person/PersonCreateCommandParser.java index c6a88fdee0f..2c294e104ff 100644 --- a/src/main/java/seedu/address/logic/parser/person/PersonCreateCommandParser.java +++ b/src/main/java/seedu/notor/logic/parser/person/PersonCreateCommandParser.java @@ -1,28 +1,28 @@ -package seedu.address.logic.parser.person; +package seedu.notor.logic.parser.person; -import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; -import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL; -import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME; -import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE; -import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG; +import static seedu.notor.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_EMAIL; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_NAME; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_PHONE; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_TAG; import java.util.Set; import java.util.stream.Stream; -import seedu.address.logic.commands.person.PersonCommand; -import seedu.address.logic.commands.person.PersonCreateCommand; -import seedu.address.logic.parser.ArgumentMultimap; -import seedu.address.logic.parser.ArgumentTokenizer; -import seedu.address.logic.parser.Parser; -import seedu.address.logic.parser.ParserUtil; -import seedu.address.logic.parser.Prefix; -import seedu.address.logic.parser.exceptions.ParseException; -import seedu.address.model.person.Email; -import seedu.address.model.person.Name; -import seedu.address.model.person.Note; -import seedu.address.model.person.Person; -import seedu.address.model.person.Phone; -import seedu.address.model.tag.Tag; +import seedu.notor.logic.commands.person.PersonCommand; +import seedu.notor.logic.commands.person.PersonCreateCommand; +import seedu.notor.logic.parser.ArgumentMultimap; +import seedu.notor.logic.parser.ArgumentTokenizer; +import seedu.notor.logic.parser.Parser; +import seedu.notor.logic.parser.ParserUtil; +import seedu.notor.logic.parser.Prefix; +import seedu.notor.logic.parser.exceptions.ParseException; +import seedu.notor.model.person.Email; +import seedu.notor.model.person.Name; +import seedu.notor.model.person.Note; +import seedu.notor.model.person.Person; +import seedu.notor.model.person.Phone; +import seedu.notor.model.tag.Tag; public class PersonCreateCommandParser extends Parser { /** diff --git a/src/main/java/seedu/address/logic/parser/person/PersonDeleteCommandParser.java b/src/main/java/seedu/notor/logic/parser/person/PersonDeleteCommandParser.java similarity index 73% rename from src/main/java/seedu/address/logic/parser/person/PersonDeleteCommandParser.java rename to src/main/java/seedu/notor/logic/parser/person/PersonDeleteCommandParser.java index 1bfad7ee2ae..d65459d1c9d 100644 --- a/src/main/java/seedu/address/logic/parser/person/PersonDeleteCommandParser.java +++ b/src/main/java/seedu/notor/logic/parser/person/PersonDeleteCommandParser.java @@ -1,9 +1,9 @@ -package seedu.address.logic.parser.person; +package seedu.notor.logic.parser.person; -import seedu.address.commons.core.Messages; -import seedu.address.commons.core.index.Index; -import seedu.address.logic.commands.person.PersonDeleteCommand; -import seedu.address.logic.parser.exceptions.ParseException; +import seedu.notor.commons.core.Messages; +import seedu.notor.commons.core.index.Index; +import seedu.notor.logic.commands.person.PersonDeleteCommand; +import seedu.notor.logic.parser.exceptions.ParseException; public class PersonDeleteCommandParser extends PersonCommandParser { /** diff --git a/src/main/java/seedu/address/logic/parser/person/PersonEditCommandParser.java b/src/main/java/seedu/notor/logic/parser/person/PersonEditCommandParser.java similarity index 77% rename from src/main/java/seedu/address/logic/parser/person/PersonEditCommandParser.java rename to src/main/java/seedu/notor/logic/parser/person/PersonEditCommandParser.java index adcfefab76f..ba70faa22e6 100644 --- a/src/main/java/seedu/address/logic/parser/person/PersonEditCommandParser.java +++ b/src/main/java/seedu/notor/logic/parser/person/PersonEditCommandParser.java @@ -1,25 +1,25 @@ -package seedu.address.logic.parser.person; +package seedu.notor.logic.parser.person; import static java.util.Objects.requireNonNull; -import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL; -import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME; -import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE; -import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_EMAIL; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_NAME; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_PHONE; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_TAG; import java.util.Collection; import java.util.Collections; import java.util.Optional; import java.util.Set; -import seedu.address.commons.core.Messages; -import seedu.address.commons.core.index.Index; -import seedu.address.logic.commands.person.PersonEditCommand; -import seedu.address.logic.executors.person.PersonEditExecutor; -import seedu.address.logic.parser.ArgumentMultimap; -import seedu.address.logic.parser.ArgumentTokenizer; -import seedu.address.logic.parser.ParserUtil; -import seedu.address.logic.parser.exceptions.ParseException; -import seedu.address.model.tag.Tag; +import seedu.notor.commons.core.Messages; +import seedu.notor.commons.core.index.Index; +import seedu.notor.logic.commands.person.PersonEditCommand; +import seedu.notor.logic.executors.person.PersonEditExecutor; +import seedu.notor.logic.parser.ArgumentMultimap; +import seedu.notor.logic.parser.ArgumentTokenizer; +import seedu.notor.logic.parser.ParserUtil; +import seedu.notor.logic.parser.exceptions.ParseException; +import seedu.notor.model.tag.Tag; public class PersonEditCommandParser extends PersonCommandParser { /** diff --git a/src/main/java/seedu/address/logic/parser/person/PersonNoteCommandParser.java b/src/main/java/seedu/notor/logic/parser/person/PersonNoteCommandParser.java similarity index 68% rename from src/main/java/seedu/address/logic/parser/person/PersonNoteCommandParser.java rename to src/main/java/seedu/notor/logic/parser/person/PersonNoteCommandParser.java index af31cd36eed..e1eb0773bbe 100644 --- a/src/main/java/seedu/address/logic/parser/person/PersonNoteCommandParser.java +++ b/src/main/java/seedu/notor/logic/parser/person/PersonNoteCommandParser.java @@ -1,14 +1,14 @@ -package seedu.address.logic.parser.person; +package seedu.notor.logic.parser.person; import static java.util.Objects.requireNonNull; -import seedu.address.commons.core.Messages; -import seedu.address.commons.core.index.Index; -import seedu.address.commons.exceptions.IllegalValueException; -import seedu.address.logic.commands.person.PersonNoteCommand; -import seedu.address.logic.parser.ArgumentMultimap; -import seedu.address.logic.parser.ArgumentTokenizer; -import seedu.address.logic.parser.exceptions.ParseException; +import seedu.notor.commons.core.Messages; +import seedu.notor.commons.core.index.Index; +import seedu.notor.commons.exceptions.IllegalValueException; +import seedu.notor.logic.commands.person.PersonNoteCommand; +import seedu.notor.logic.parser.ArgumentMultimap; +import seedu.notor.logic.parser.ArgumentTokenizer; +import seedu.notor.logic.parser.exceptions.ParseException; public class PersonNoteCommandParser extends PersonCommandParser { /** diff --git a/src/main/java/seedu/address/model/AddressBook.java b/src/main/java/seedu/notor/model/AddressBook.java similarity index 96% rename from src/main/java/seedu/address/model/AddressBook.java rename to src/main/java/seedu/notor/model/AddressBook.java index a1e4cfafa54..9f17cbfb2ba 100644 --- a/src/main/java/seedu/address/model/AddressBook.java +++ b/src/main/java/seedu/notor/model/AddressBook.java @@ -1,4 +1,4 @@ -package seedu.address.model; +package seedu.notor.model; import static java.util.Objects.requireNonNull; @@ -6,10 +6,10 @@ import java.util.List; import javafx.collections.ObservableList; -import seedu.address.model.group.SubGroup; -import seedu.address.model.group.SuperGroup; -import seedu.address.model.person.Person; -import seedu.address.model.util.UniqueList; +import seedu.notor.model.group.SubGroup; +import seedu.notor.model.group.SuperGroup; +import seedu.notor.model.person.Person; +import seedu.notor.model.util.UniqueList; /** * Wraps all data at the address-book level diff --git a/src/main/java/seedu/address/model/Model.java b/src/main/java/seedu/notor/model/Model.java similarity index 93% rename from src/main/java/seedu/address/model/Model.java rename to src/main/java/seedu/notor/model/Model.java index e3b6a30fbc3..717b10a0465 100644 --- a/src/main/java/seedu/address/model/Model.java +++ b/src/main/java/seedu/notor/model/Model.java @@ -1,13 +1,13 @@ -package seedu.address.model; +package seedu.notor.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.group.SubGroup; -import seedu.address.model.group.SuperGroup; -import seedu.address.model.person.Person; +import seedu.notor.commons.core.GuiSettings; +import seedu.notor.model.group.SubGroup; +import seedu.notor.model.group.SuperGroup; +import seedu.notor.model.person.Person; /** * The API of the Model component. diff --git a/src/main/java/seedu/address/model/ModelManager.java b/src/main/java/seedu/notor/model/ModelManager.java similarity index 94% rename from src/main/java/seedu/address/model/ModelManager.java rename to src/main/java/seedu/notor/model/ModelManager.java index bd4b76e8778..32e36fd0aef 100644 --- a/src/main/java/seedu/address/model/ModelManager.java +++ b/src/main/java/seedu/notor/model/ModelManager.java @@ -1,7 +1,7 @@ -package seedu.address.model; +package seedu.notor.model; import static java.util.Objects.requireNonNull; -import static seedu.address.commons.util.CollectionUtil.requireAllNonNull; +import static seedu.notor.commons.util.CollectionUtil.requireAllNonNull; import java.nio.file.Path; import java.util.function.Predicate; @@ -9,11 +9,11 @@ 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.group.SubGroup; -import seedu.address.model.group.SuperGroup; -import seedu.address.model.person.Person; +import seedu.notor.commons.core.GuiSettings; +import seedu.notor.commons.core.LogsCenter; +import seedu.notor.model.group.SubGroup; +import seedu.notor.model.group.SuperGroup; +import seedu.notor.model.person.Person; /** * Represents the in-memory model of the address book data. diff --git a/src/main/java/seedu/address/model/ReadOnlyAddressBook.java b/src/main/java/seedu/notor/model/ReadOnlyAddressBook.java similarity index 73% rename from src/main/java/seedu/address/model/ReadOnlyAddressBook.java rename to src/main/java/seedu/notor/model/ReadOnlyAddressBook.java index 48bc8050955..9183f6111d4 100644 --- a/src/main/java/seedu/address/model/ReadOnlyAddressBook.java +++ b/src/main/java/seedu/notor/model/ReadOnlyAddressBook.java @@ -1,11 +1,11 @@ -package seedu.address.model; +package seedu.notor.model; import java.util.HashMap; import javafx.collections.ObservableList; -import seedu.address.model.group.SubGroup; -import seedu.address.model.group.SuperGroup; -import seedu.address.model.person.Person; +import seedu.notor.model.group.SubGroup; +import seedu.notor.model.group.SuperGroup; +import seedu.notor.model.person.Person; /** * Unmodifiable view of an address book diff --git a/src/main/java/seedu/address/model/ReadOnlyUserPrefs.java b/src/main/java/seedu/notor/model/ReadOnlyUserPrefs.java similarity index 70% rename from src/main/java/seedu/address/model/ReadOnlyUserPrefs.java rename to src/main/java/seedu/notor/model/ReadOnlyUserPrefs.java index befd58a4c73..16b16be5768 100644 --- a/src/main/java/seedu/address/model/ReadOnlyUserPrefs.java +++ b/src/main/java/seedu/notor/model/ReadOnlyUserPrefs.java @@ -1,8 +1,8 @@ -package seedu.address.model; +package seedu.notor.model; import java.nio.file.Path; -import seedu.address.commons.core.GuiSettings; +import seedu.notor.commons.core.GuiSettings; /** * Unmodifiable view of user prefs. diff --git a/src/main/java/seedu/address/model/UserPrefs.java b/src/main/java/seedu/notor/model/UserPrefs.java similarity index 96% rename from src/main/java/seedu/address/model/UserPrefs.java rename to src/main/java/seedu/notor/model/UserPrefs.java index 0bff4393cf0..02ecfe5616e 100644 --- a/src/main/java/seedu/address/model/UserPrefs.java +++ b/src/main/java/seedu/notor/model/UserPrefs.java @@ -1,4 +1,4 @@ -package seedu.address.model; +package seedu.notor.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.notor.commons.core.GuiSettings; /** * Represents User's preferences. diff --git a/src/main/java/seedu/address/model/exceptions/DuplicateItemException.java b/src/main/java/seedu/notor/model/exceptions/DuplicateItemException.java similarity index 89% rename from src/main/java/seedu/address/model/exceptions/DuplicateItemException.java rename to src/main/java/seedu/notor/model/exceptions/DuplicateItemException.java index 47170e71cf4..c9d221bb210 100644 --- a/src/main/java/seedu/address/model/exceptions/DuplicateItemException.java +++ b/src/main/java/seedu/notor/model/exceptions/DuplicateItemException.java @@ -1,4 +1,4 @@ -package seedu.address.model.exceptions; +package seedu.notor.model.exceptions; /** * Signals that the operation will result in duplicate Persons/Groups (Persons/Groups are considered duplicates if they diff --git a/src/main/java/seedu/address/model/exceptions/ItemNotFoundException.java b/src/main/java/seedu/notor/model/exceptions/ItemNotFoundException.java similarity index 78% rename from src/main/java/seedu/address/model/exceptions/ItemNotFoundException.java rename to src/main/java/seedu/notor/model/exceptions/ItemNotFoundException.java index 939fa4a52a1..1040bc7e9eb 100644 --- a/src/main/java/seedu/address/model/exceptions/ItemNotFoundException.java +++ b/src/main/java/seedu/notor/model/exceptions/ItemNotFoundException.java @@ -1,4 +1,4 @@ -package seedu.address.model.exceptions; +package seedu.notor.model.exceptions; /** * Signals that the operation is unable to find the specified person/group. diff --git a/src/main/java/seedu/address/model/group/Group.java b/src/main/java/seedu/notor/model/group/Group.java similarity index 94% rename from src/main/java/seedu/address/model/group/Group.java rename to src/main/java/seedu/notor/model/group/Group.java index 76b168dd617..396acb9065e 100644 --- a/src/main/java/seedu/address/model/group/Group.java +++ b/src/main/java/seedu/notor/model/group/Group.java @@ -1,9 +1,9 @@ -package seedu.address.model.group; +package seedu.notor.model.group; import java.util.HashMap; import java.util.Objects; -import seedu.address.model.person.Person; +import seedu.notor.model.person.Person; /** * Represents a group which a person can belong to. diff --git a/src/main/java/seedu/address/model/group/SubGroup.java b/src/main/java/seedu/notor/model/group/SubGroup.java similarity index 95% rename from src/main/java/seedu/address/model/group/SubGroup.java rename to src/main/java/seedu/notor/model/group/SubGroup.java index c122917a182..fde0a40b6a3 100644 --- a/src/main/java/seedu/address/model/group/SubGroup.java +++ b/src/main/java/seedu/notor/model/group/SubGroup.java @@ -1,4 +1,4 @@ -package seedu.address.model.group; +package seedu.notor.model.group; import java.util.Objects; diff --git a/src/main/java/seedu/address/model/group/SuperGroup.java b/src/main/java/seedu/notor/model/group/SuperGroup.java similarity index 96% rename from src/main/java/seedu/address/model/group/SuperGroup.java rename to src/main/java/seedu/notor/model/group/SuperGroup.java index 2e89ac959c1..bfede2dc1e7 100644 --- a/src/main/java/seedu/address/model/group/SuperGroup.java +++ b/src/main/java/seedu/notor/model/group/SuperGroup.java @@ -1,4 +1,4 @@ -package seedu.address.model.group; +package seedu.notor.model.group; import static java.util.Objects.requireNonNull; diff --git a/src/main/java/seedu/address/model/person/Email.java b/src/main/java/seedu/notor/model/person/Email.java similarity index 96% rename from src/main/java/seedu/address/model/person/Email.java rename to src/main/java/seedu/notor/model/person/Email.java index f866e7133de..c90f3a3f3d4 100644 --- a/src/main/java/seedu/address/model/person/Email.java +++ b/src/main/java/seedu/notor/model/person/Email.java @@ -1,7 +1,7 @@ -package seedu.address.model.person; +package seedu.notor.model.person; import static java.util.Objects.requireNonNull; -import static seedu.address.commons.util.AppUtil.checkArgument; +import static seedu.notor.commons.util.AppUtil.checkArgument; /** * Represents a Person's email in the address book. diff --git a/src/main/java/seedu/address/model/person/Name.java b/src/main/java/seedu/notor/model/person/Name.java similarity index 93% rename from src/main/java/seedu/address/model/person/Name.java rename to src/main/java/seedu/notor/model/person/Name.java index 79244d71cf7..284eec56afc 100644 --- a/src/main/java/seedu/address/model/person/Name.java +++ b/src/main/java/seedu/notor/model/person/Name.java @@ -1,7 +1,7 @@ -package seedu.address.model.person; +package seedu.notor.model.person; import static java.util.Objects.requireNonNull; -import static seedu.address.commons.util.AppUtil.checkArgument; +import static seedu.notor.commons.util.AppUtil.checkArgument; /** * Represents a Person's name in the address book. diff --git a/src/main/java/seedu/address/model/person/NameContainsKeywordsPredicate.java b/src/main/java/seedu/notor/model/person/NameContainsKeywordsPredicate.java similarity index 91% rename from src/main/java/seedu/address/model/person/NameContainsKeywordsPredicate.java rename to src/main/java/seedu/notor/model/person/NameContainsKeywordsPredicate.java index c9b5868427c..cf5f02965ed 100644 --- a/src/main/java/seedu/address/model/person/NameContainsKeywordsPredicate.java +++ b/src/main/java/seedu/notor/model/person/NameContainsKeywordsPredicate.java @@ -1,9 +1,9 @@ -package seedu.address.model.person; +package seedu.notor.model.person; import java.util.List; import java.util.function.Predicate; -import seedu.address.commons.util.StringUtil; +import seedu.notor.commons.util.StringUtil; /** * Tests that a {@code Person}'s {@code Name} matches any of the keywords given. diff --git a/src/main/java/seedu/address/model/person/Note.java b/src/main/java/seedu/notor/model/person/Note.java similarity index 97% rename from src/main/java/seedu/address/model/person/Note.java rename to src/main/java/seedu/notor/model/person/Note.java index 8e74eb46f74..a69d824189f 100644 --- a/src/main/java/seedu/address/model/person/Note.java +++ b/src/main/java/seedu/notor/model/person/Note.java @@ -1,4 +1,4 @@ -package seedu.address.model.person; +package seedu.notor.model.person; import static java.util.Objects.requireNonNull; diff --git a/src/main/java/seedu/address/model/person/Person.java b/src/main/java/seedu/notor/model/person/Person.java similarity index 93% rename from src/main/java/seedu/address/model/person/Person.java rename to src/main/java/seedu/notor/model/person/Person.java index 359893ac59e..1ae99302dfd 100644 --- a/src/main/java/seedu/address/model/person/Person.java +++ b/src/main/java/seedu/notor/model/person/Person.java @@ -1,16 +1,16 @@ -package seedu.address.model.person; +package seedu.notor.model.person; -import static seedu.address.commons.util.CollectionUtil.requireAllNonNull; +import static seedu.notor.commons.util.CollectionUtil.requireAllNonNull; import java.util.Collections; import java.util.HashSet; import java.util.Objects; import java.util.Set; -import seedu.address.model.group.SubGroup; -import seedu.address.model.group.SuperGroup; -import seedu.address.model.tag.Tag; -import seedu.address.model.util.Unique; +import seedu.notor.model.group.SubGroup; +import seedu.notor.model.group.SuperGroup; +import seedu.notor.model.tag.Tag; +import seedu.notor.model.util.Unique; /** * Represents a Person in the address book. diff --git a/src/main/java/seedu/address/model/person/Phone.java b/src/main/java/seedu/notor/model/person/Phone.java similarity index 93% rename from src/main/java/seedu/address/model/person/Phone.java rename to src/main/java/seedu/notor/model/person/Phone.java index 872c76b382f..4309445c995 100644 --- a/src/main/java/seedu/address/model/person/Phone.java +++ b/src/main/java/seedu/notor/model/person/Phone.java @@ -1,7 +1,7 @@ -package seedu.address.model.person; +package seedu.notor.model.person; import static java.util.Objects.requireNonNull; -import static seedu.address.commons.util.AppUtil.checkArgument; +import static seedu.notor.commons.util.AppUtil.checkArgument; /** * Represents a Person's phone number in the address book. diff --git a/src/main/java/seedu/address/model/tag/Tag.java b/src/main/java/seedu/notor/model/tag/Tag.java similarity index 93% rename from src/main/java/seedu/address/model/tag/Tag.java rename to src/main/java/seedu/notor/model/tag/Tag.java index b0ea7e7dad7..88bbd067712 100644 --- a/src/main/java/seedu/address/model/tag/Tag.java +++ b/src/main/java/seedu/notor/model/tag/Tag.java @@ -1,7 +1,7 @@ -package seedu.address.model.tag; +package seedu.notor.model.tag; import static java.util.Objects.requireNonNull; -import static seedu.address.commons.util.AppUtil.checkArgument; +import static seedu.notor.commons.util.AppUtil.checkArgument; /** * Represents a Tag in the address book. diff --git a/src/main/java/seedu/address/model/util/SampleDataUtil.java b/src/main/java/seedu/notor/model/util/SampleDataUtil.java similarity index 83% rename from src/main/java/seedu/address/model/util/SampleDataUtil.java rename to src/main/java/seedu/notor/model/util/SampleDataUtil.java index 7cb479f6f96..b47cee84589 100644 --- a/src/main/java/seedu/address/model/util/SampleDataUtil.java +++ b/src/main/java/seedu/notor/model/util/SampleDataUtil.java @@ -1,17 +1,17 @@ -package seedu.address.model.util; +package seedu.notor.model.util; import java.util.Arrays; import java.util.Set; import java.util.stream.Collectors; -import seedu.address.model.AddressBook; -import seedu.address.model.ReadOnlyAddressBook; -import seedu.address.model.person.Email; -import seedu.address.model.person.Name; -import seedu.address.model.person.Note; -import seedu.address.model.person.Person; -import seedu.address.model.person.Phone; -import seedu.address.model.tag.Tag; +import seedu.notor.model.AddressBook; +import seedu.notor.model.ReadOnlyAddressBook; +import seedu.notor.model.person.Email; +import seedu.notor.model.person.Name; +import seedu.notor.model.person.Note; +import seedu.notor.model.person.Person; +import seedu.notor.model.person.Phone; +import seedu.notor.model.tag.Tag; /** * Contains utility methods for populating {@code AddressBook} with sample data. diff --git a/src/main/java/seedu/address/model/util/Unique.java b/src/main/java/seedu/notor/model/util/Unique.java similarity index 64% rename from src/main/java/seedu/address/model/util/Unique.java rename to src/main/java/seedu/notor/model/util/Unique.java index 706ba7b78fe..cab79849849 100644 --- a/src/main/java/seedu/address/model/util/Unique.java +++ b/src/main/java/seedu/notor/model/util/Unique.java @@ -1,4 +1,4 @@ -package seedu.address.model.util; +package seedu.notor.model.util; public interface Unique { boolean isSame(T other); diff --git a/src/main/java/seedu/address/model/util/UniqueList.java b/src/main/java/seedu/notor/model/util/UniqueList.java similarity index 93% rename from src/main/java/seedu/address/model/util/UniqueList.java rename to src/main/java/seedu/notor/model/util/UniqueList.java index 86d3aba4113..87428c4743a 100644 --- a/src/main/java/seedu/address/model/util/UniqueList.java +++ b/src/main/java/seedu/notor/model/util/UniqueList.java @@ -1,15 +1,15 @@ -package seedu.address.model.util; +package seedu.notor.model.util; import static java.util.Objects.requireNonNull; -import static seedu.address.commons.util.CollectionUtil.requireAllNonNull; +import static seedu.notor.commons.util.CollectionUtil.requireAllNonNull; import java.util.Iterator; import java.util.List; import javafx.collections.FXCollections; import javafx.collections.ObservableList; -import seedu.address.model.exceptions.DuplicateItemException; -import seedu.address.model.exceptions.ItemNotFoundException; +import seedu.notor.model.exceptions.DuplicateItemException; +import seedu.notor.model.exceptions.ItemNotFoundException; public class UniqueList> implements Iterable { private final ObservableList internalList = FXCollections.observableArrayList(); diff --git a/src/main/java/seedu/address/storage/AddressBookStorage.java b/src/main/java/seedu/notor/storage/AddressBookStorage.java similarity index 85% rename from src/main/java/seedu/address/storage/AddressBookStorage.java rename to src/main/java/seedu/notor/storage/AddressBookStorage.java index ee4cf2c0e74..0ab54d81afb 100644 --- a/src/main/java/seedu/address/storage/AddressBookStorage.java +++ b/src/main/java/seedu/notor/storage/AddressBookStorage.java @@ -1,14 +1,14 @@ -package seedu.address.storage; +package seedu.notor.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.notor.commons.exceptions.DataConversionException; +import seedu.notor.model.ReadOnlyAddressBook; /** - * Represents a storage for {@link seedu.address.model.AddressBook}. + * Represents a storage for {@link seedu.notor.model.AddressBook}. */ public interface AddressBookStorage { diff --git a/src/main/java/seedu/address/storage/JsonAdaptedPerson.java b/src/main/java/seedu/notor/storage/JsonAdaptedPerson.java similarity index 90% rename from src/main/java/seedu/address/storage/JsonAdaptedPerson.java rename to src/main/java/seedu/notor/storage/JsonAdaptedPerson.java index eb3d650ef11..29edfac3059 100644 --- a/src/main/java/seedu/address/storage/JsonAdaptedPerson.java +++ b/src/main/java/seedu/notor/storage/JsonAdaptedPerson.java @@ -1,4 +1,4 @@ -package seedu.address.storage; +package seedu.notor.storage; import java.util.ArrayList; import java.util.HashSet; import java.util.List; @@ -8,16 +8,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import seedu.address.commons.exceptions.IllegalValueException; -import seedu.address.model.group.Group; -import seedu.address.model.group.SubGroup; -import seedu.address.model.group.SuperGroup; -import seedu.address.model.person.Email; -import seedu.address.model.person.Name; -import seedu.address.model.person.Note; -import seedu.address.model.person.Person; -import seedu.address.model.person.Phone; -import seedu.address.model.tag.Tag; +import seedu.notor.commons.exceptions.IllegalValueException; +import seedu.notor.model.group.Group; +import seedu.notor.model.group.SubGroup; +import seedu.notor.model.group.SuperGroup; +import seedu.notor.model.person.Email; +import seedu.notor.model.person.Name; +import seedu.notor.model.person.Note; +import seedu.notor.model.person.Person; +import seedu.notor.model.person.Phone; +import seedu.notor.model.tag.Tag; /** * Jackson-friendly version of {@link Person}. diff --git a/src/main/java/seedu/address/storage/JsonAdaptedSubGroup.java b/src/main/java/seedu/notor/storage/JsonAdaptedSubGroup.java similarity index 89% rename from src/main/java/seedu/address/storage/JsonAdaptedSubGroup.java rename to src/main/java/seedu/notor/storage/JsonAdaptedSubGroup.java index e342179b010..f573997d66a 100644 --- a/src/main/java/seedu/address/storage/JsonAdaptedSubGroup.java +++ b/src/main/java/seedu/notor/storage/JsonAdaptedSubGroup.java @@ -1,9 +1,9 @@ -package seedu.address.storage; +package seedu.notor.storage; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import seedu.address.commons.exceptions.IllegalValueException; -import seedu.address.model.group.SubGroup; +import seedu.notor.commons.exceptions.IllegalValueException; +import seedu.notor.model.group.SubGroup; public class JsonAdaptedSubGroup { public static final String MISSING_FIELD_MESSAGE_FORMAT = "Group's format is wrong!"; diff --git a/src/main/java/seedu/address/storage/JsonAdaptedSuperGroup.java b/src/main/java/seedu/notor/storage/JsonAdaptedSuperGroup.java similarity index 88% rename from src/main/java/seedu/address/storage/JsonAdaptedSuperGroup.java rename to src/main/java/seedu/notor/storage/JsonAdaptedSuperGroup.java index 51f9e2a7192..f53bf03a2db 100644 --- a/src/main/java/seedu/address/storage/JsonAdaptedSuperGroup.java +++ b/src/main/java/seedu/notor/storage/JsonAdaptedSuperGroup.java @@ -1,12 +1,12 @@ -package seedu.address.storage; +package seedu.notor.storage; import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import seedu.address.commons.exceptions.IllegalValueException; -import seedu.address.model.group.SubGroup; -import seedu.address.model.group.SuperGroup; +import seedu.notor.commons.exceptions.IllegalValueException; +import seedu.notor.model.group.SubGroup; +import seedu.notor.model.group.SuperGroup; public class JsonAdaptedSuperGroup { public static final String MISSING_FIELD_MESSAGE_FORMAT = "Group's format is wrong!"; diff --git a/src/main/java/seedu/address/storage/JsonAdaptedTag.java b/src/main/java/seedu/notor/storage/JsonAdaptedTag.java similarity index 89% rename from src/main/java/seedu/address/storage/JsonAdaptedTag.java rename to src/main/java/seedu/notor/storage/JsonAdaptedTag.java index 0df22bdb754..3b36c2242f9 100644 --- a/src/main/java/seedu/address/storage/JsonAdaptedTag.java +++ b/src/main/java/seedu/notor/storage/JsonAdaptedTag.java @@ -1,10 +1,10 @@ -package seedu.address.storage; +package seedu.notor.storage; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -import seedu.address.commons.exceptions.IllegalValueException; -import seedu.address.model.tag.Tag; +import seedu.notor.commons.exceptions.IllegalValueException; +import seedu.notor.model.tag.Tag; /** * Jackson-friendly version of {@link Tag}. diff --git a/src/main/java/seedu/address/storage/JsonAddressBookStorage.java b/src/main/java/seedu/notor/storage/JsonAddressBookStorage.java similarity index 86% rename from src/main/java/seedu/address/storage/JsonAddressBookStorage.java rename to src/main/java/seedu/notor/storage/JsonAddressBookStorage.java index 7f8aea8891d..050bef08808 100644 --- a/src/main/java/seedu/address/storage/JsonAddressBookStorage.java +++ b/src/main/java/seedu/notor/storage/JsonAddressBookStorage.java @@ -1,4 +1,4 @@ -package seedu.address.storage; +package seedu.notor.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.notor.commons.core.LogsCenter; +import seedu.notor.commons.exceptions.DataConversionException; +import seedu.notor.commons.exceptions.IllegalValueException; +import seedu.notor.commons.util.FileUtil; +import seedu.notor.commons.util.JsonUtil; +import seedu.notor.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/notor/storage/JsonSerializableAddressBook.java similarity index 91% rename from src/main/java/seedu/address/storage/JsonSerializableAddressBook.java rename to src/main/java/seedu/notor/storage/JsonSerializableAddressBook.java index 2c9f42efa04..c76974c0b73 100644 --- a/src/main/java/seedu/address/storage/JsonSerializableAddressBook.java +++ b/src/main/java/seedu/notor/storage/JsonSerializableAddressBook.java @@ -1,4 +1,4 @@ -package seedu.address.storage; +package seedu.notor.storage; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; @@ -7,12 +7,12 @@ 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.group.SubGroup; -import seedu.address.model.group.SuperGroup; -import seedu.address.model.person.Person; +import seedu.notor.commons.exceptions.IllegalValueException; +import seedu.notor.model.AddressBook; +import seedu.notor.model.ReadOnlyAddressBook; +import seedu.notor.model.group.SubGroup; +import seedu.notor.model.group.SuperGroup; +import seedu.notor.model.person.Person; /** * An Immutable AddressBook that is serializable to JSON format. diff --git a/src/main/java/seedu/address/storage/JsonUserPrefsStorage.java b/src/main/java/seedu/notor/storage/JsonUserPrefsStorage.java similarity index 83% rename from src/main/java/seedu/address/storage/JsonUserPrefsStorage.java rename to src/main/java/seedu/notor/storage/JsonUserPrefsStorage.java index 40f48a3fbe9..44010650a53 100644 --- a/src/main/java/seedu/address/storage/JsonUserPrefsStorage.java +++ b/src/main/java/seedu/notor/storage/JsonUserPrefsStorage.java @@ -1,13 +1,13 @@ -package seedu.address.storage; +package seedu.notor.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.notor.commons.exceptions.DataConversionException; +import seedu.notor.commons.util.JsonUtil; +import seedu.notor.model.ReadOnlyUserPrefs; +import seedu.notor.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/notor/storage/Storage.java similarity index 73% rename from src/main/java/seedu/address/storage/Storage.java rename to src/main/java/seedu/notor/storage/Storage.java index beda8bd9f11..32e90eb6683 100644 --- a/src/main/java/seedu/address/storage/Storage.java +++ b/src/main/java/seedu/notor/storage/Storage.java @@ -1,13 +1,13 @@ -package seedu.address.storage; +package seedu.notor.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.notor.commons.exceptions.DataConversionException; +import seedu.notor.model.ReadOnlyAddressBook; +import seedu.notor.model.ReadOnlyUserPrefs; +import seedu.notor.model.UserPrefs; /** * API of the Storage component diff --git a/src/main/java/seedu/address/storage/StorageManager.java b/src/main/java/seedu/notor/storage/StorageManager.java similarity index 89% rename from src/main/java/seedu/address/storage/StorageManager.java rename to src/main/java/seedu/notor/storage/StorageManager.java index 08602c1f8bb..1a0a01b5851 100644 --- a/src/main/java/seedu/address/storage/StorageManager.java +++ b/src/main/java/seedu/notor/storage/StorageManager.java @@ -1,15 +1,15 @@ -package seedu.address.storage; +package seedu.notor.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.notor.commons.core.LogsCenter; +import seedu.notor.commons.exceptions.DataConversionException; +import seedu.notor.model.ReadOnlyAddressBook; +import seedu.notor.model.ReadOnlyUserPrefs; +import seedu.notor.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/notor/storage/UserPrefsStorage.java similarity index 71% rename from src/main/java/seedu/address/storage/UserPrefsStorage.java rename to src/main/java/seedu/notor/storage/UserPrefsStorage.java index 1eb07ff2880..f6b882a9e8f 100644 --- a/src/main/java/seedu/address/storage/UserPrefsStorage.java +++ b/src/main/java/seedu/notor/storage/UserPrefsStorage.java @@ -1,15 +1,15 @@ -package seedu.address.storage; +package seedu.notor.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.notor.commons.exceptions.DataConversionException; +import seedu.notor.model.ReadOnlyUserPrefs; +import seedu.notor.model.UserPrefs; /** - * Represents a storage for {@link seedu.address.model.UserPrefs}. + * Represents a storage for {@link seedu.notor.model.UserPrefs}. */ public interface UserPrefsStorage { @@ -28,7 +28,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.notor.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/CommandBox.java b/src/main/java/seedu/notor/ui/CommandBox.java similarity index 87% rename from src/main/java/seedu/address/ui/CommandBox.java rename to src/main/java/seedu/notor/ui/CommandBox.java index 1f4ccfe9fde..e364c3edf2d 100644 --- a/src/main/java/seedu/address/ui/CommandBox.java +++ b/src/main/java/seedu/notor/ui/CommandBox.java @@ -1,13 +1,13 @@ -package seedu.address.ui; +package seedu.notor.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.executors.exceptions.ExecuteException; -import seedu.address.logic.parser.exceptions.ParseException; +import seedu.notor.logic.commands.CommandResult; +import seedu.notor.logic.commands.exceptions.CommandException; +import seedu.notor.logic.executors.exceptions.ExecuteException; +import seedu.notor.logic.parser.exceptions.ParseException; /** * The UI component that is responsible for receiving user command inputs. @@ -78,7 +78,7 @@ public interface CommandExecutor { /** * Executes the command and returns the result. * - * @see seedu.address.logic.Logic#execute(String) + * @see seedu.notor.logic.Logic#execute(String) */ CommandResult execute(String commandText) throws CommandException, ParseException, ExecuteException; } diff --git a/src/main/java/seedu/address/ui/HelpWindow.java b/src/main/java/seedu/notor/ui/HelpWindow.java similarity index 97% rename from src/main/java/seedu/address/ui/HelpWindow.java rename to src/main/java/seedu/notor/ui/HelpWindow.java index e5ea7399918..5cf220faed0 100644 --- a/src/main/java/seedu/address/ui/HelpWindow.java +++ b/src/main/java/seedu/notor/ui/HelpWindow.java @@ -1,4 +1,4 @@ -package seedu.address.ui; +package seedu.notor.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.notor.commons.core.LogsCenter; /** * Controller for a help page diff --git a/src/main/java/seedu/address/ui/MainWindow.java b/src/main/java/seedu/notor/ui/MainWindow.java similarity index 93% rename from src/main/java/seedu/address/ui/MainWindow.java rename to src/main/java/seedu/notor/ui/MainWindow.java index 6bea9eb06f8..aa48dadff6c 100644 --- a/src/main/java/seedu/address/ui/MainWindow.java +++ b/src/main/java/seedu/notor/ui/MainWindow.java @@ -1,4 +1,4 @@ -package seedu.address.ui; +package seedu.notor.ui; import java.util.logging.Logger; @@ -10,14 +10,14 @@ 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.executors.exceptions.ExecuteException; -import seedu.address.logic.parser.exceptions.ParseException; -import seedu.address.model.person.Person; +import seedu.notor.commons.core.GuiSettings; +import seedu.notor.commons.core.LogsCenter; +import seedu.notor.logic.Logic; +import seedu.notor.logic.commands.CommandResult; +import seedu.notor.logic.commands.exceptions.CommandException; +import seedu.notor.logic.executors.exceptions.ExecuteException; +import seedu.notor.logic.parser.exceptions.ParseException; +import seedu.notor.model.person.Person; /** * The Main Window. Provides the basic application layout containing @@ -189,7 +189,7 @@ public PersonListPanel getPersonListPanel() { /** * Executes the command and returns the result. * - * @see seedu.address.logic.Logic#execute(String) + * @see seedu.notor.logic.Logic#execute(String) */ private CommandResult executeCommand(String commandText) throws CommandException, ParseException, ExecuteException { try { diff --git a/src/main/java/seedu/address/ui/NoteWindow.java b/src/main/java/seedu/notor/ui/NoteWindow.java similarity index 94% rename from src/main/java/seedu/address/ui/NoteWindow.java rename to src/main/java/seedu/notor/ui/NoteWindow.java index 724cbbf4b8b..5ffc94747b4 100644 --- a/src/main/java/seedu/address/ui/NoteWindow.java +++ b/src/main/java/seedu/notor/ui/NoteWindow.java @@ -1,4 +1,4 @@ -package seedu.address.ui; +package seedu.notor.ui; import java.awt.Toolkit; import java.util.ArrayList; @@ -11,11 +11,11 @@ import javafx.scene.input.KeyCombination.Modifier; import javafx.scene.input.KeyEvent; import javafx.stage.Stage; -import seedu.address.commons.util.DateUtil; -import seedu.address.logic.Logic; -import seedu.address.logic.commands.exceptions.CommandException; -import seedu.address.model.person.Note; -import seedu.address.model.person.Person; +import seedu.notor.commons.util.DateUtil; +import seedu.notor.logic.Logic; +import seedu.notor.logic.commands.exceptions.CommandException; +import seedu.notor.model.person.Note; +import seedu.notor.model.person.Person; @@ -135,7 +135,7 @@ private void timeStampNote() { * Reads user key event. Saves on pressing CTRL + S. Exits on pressing CTRL + W. Exits and saves on pressing * CTRL + Q. TimeStamps on the current line when CTRL + T is pressed. * @param event User key Event - * @see seedu.address.logic.Logic#executeSaveNote(Person, Person) + * @see seedu.notor.logic.Logic#executeSaveNote(Person, Person) */ @FXML public void handleOnKeyPressed(KeyEvent event) throws CommandException { diff --git a/src/main/java/seedu/address/ui/PersonCard.java b/src/main/java/seedu/notor/ui/PersonCard.java similarity index 97% rename from src/main/java/seedu/address/ui/PersonCard.java rename to src/main/java/seedu/notor/ui/PersonCard.java index 2b1666cdaa7..5ac2986f67b 100644 --- a/src/main/java/seedu/address/ui/PersonCard.java +++ b/src/main/java/seedu/notor/ui/PersonCard.java @@ -1,4 +1,4 @@ -package seedu.address.ui; +package seedu.notor.ui; import java.util.Arrays; import java.util.Comparator; @@ -8,7 +8,7 @@ import javafx.scene.layout.FlowPane; import javafx.scene.layout.HBox; import javafx.scene.layout.Region; -import seedu.address.model.person.Person; +import seedu.notor.model.person.Person; /** * An UI component that displays information of a {@code Person}. diff --git a/src/main/java/seedu/address/ui/PersonListPanel.java b/src/main/java/seedu/notor/ui/PersonListPanel.java similarity index 92% rename from src/main/java/seedu/address/ui/PersonListPanel.java rename to src/main/java/seedu/notor/ui/PersonListPanel.java index f4c501a897b..64bae9db2b6 100644 --- a/src/main/java/seedu/address/ui/PersonListPanel.java +++ b/src/main/java/seedu/notor/ui/PersonListPanel.java @@ -1,4 +1,4 @@ -package seedu.address.ui; +package seedu.notor.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.person.Person; +import seedu.notor.commons.core.LogsCenter; +import seedu.notor.model.person.Person; /** * Panel containing the list of persons. diff --git a/src/main/java/seedu/address/ui/ResultDisplay.java b/src/main/java/seedu/notor/ui/ResultDisplay.java similarity index 95% rename from src/main/java/seedu/address/ui/ResultDisplay.java rename to src/main/java/seedu/notor/ui/ResultDisplay.java index 7d98e84eedf..bf86b4720c3 100644 --- a/src/main/java/seedu/address/ui/ResultDisplay.java +++ b/src/main/java/seedu/notor/ui/ResultDisplay.java @@ -1,4 +1,4 @@ -package seedu.address.ui; +package seedu.notor.ui; import static java.util.Objects.requireNonNull; diff --git a/src/main/java/seedu/address/ui/StatusBarFooter.java b/src/main/java/seedu/notor/ui/StatusBarFooter.java similarity index 96% rename from src/main/java/seedu/address/ui/StatusBarFooter.java rename to src/main/java/seedu/notor/ui/StatusBarFooter.java index b577f829423..e141097be80 100644 --- a/src/main/java/seedu/address/ui/StatusBarFooter.java +++ b/src/main/java/seedu/notor/ui/StatusBarFooter.java @@ -1,4 +1,4 @@ -package seedu.address.ui; +package seedu.notor.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/notor/ui/Ui.java similarity index 87% rename from src/main/java/seedu/address/ui/Ui.java rename to src/main/java/seedu/notor/ui/Ui.java index e28dae7e990..af2c3ec2b71 100644 --- a/src/main/java/seedu/address/ui/Ui.java +++ b/src/main/java/seedu/notor/ui/Ui.java @@ -1,4 +1,4 @@ -package seedu.address.ui; +package seedu.notor.ui; import javafx.stage.Stage; diff --git a/src/main/java/seedu/address/ui/UiManager.java b/src/main/java/seedu/notor/ui/UiManager.java similarity index 94% rename from src/main/java/seedu/address/ui/UiManager.java rename to src/main/java/seedu/notor/ui/UiManager.java index beb1d21b108..b5a97f5d066 100644 --- a/src/main/java/seedu/address/ui/UiManager.java +++ b/src/main/java/seedu/notor/ui/UiManager.java @@ -1,4 +1,4 @@ -package seedu.address.ui; +package seedu.notor.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.notor.MainApp; +import seedu.notor.commons.core.LogsCenter; +import seedu.notor.commons.util.StringUtil; +import seedu.notor.logic.Logic; /** * The manager of the UI component. diff --git a/src/main/java/seedu/address/ui/UiPart.java b/src/main/java/seedu/notor/ui/UiPart.java similarity index 97% rename from src/main/java/seedu/address/ui/UiPart.java rename to src/main/java/seedu/notor/ui/UiPart.java index 2231075051b..ffa13659e85 100644 --- a/src/main/java/seedu/address/ui/UiPart.java +++ b/src/main/java/seedu/notor/ui/UiPart.java @@ -1,4 +1,4 @@ -package seedu.address.ui; +package seedu.notor.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.notor.MainApp; /** * Represents a distinct part of the UI. e.g. Windows, dialogs, panels, status bars, etc. diff --git a/src/test/java/seedu/address/AppParametersTest.java b/src/test/java/seedu/notor/AppParametersTest.java similarity index 98% rename from src/test/java/seedu/address/AppParametersTest.java rename to src/test/java/seedu/notor/AppParametersTest.java index 6df4b0aa838..1f59e4816cc 100644 --- a/src/test/java/seedu/address/AppParametersTest.java +++ b/src/test/java/seedu/notor/AppParametersTest.java @@ -1,4 +1,4 @@ -package seedu.address; +package seedu.notor; 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/notor/commons/core/ConfigTest.java similarity index 94% rename from src/test/java/seedu/address/commons/core/ConfigTest.java rename to src/test/java/seedu/notor/commons/core/ConfigTest.java index e50f2c76d71..f2accdd7ad1 100644 --- a/src/test/java/seedu/address/commons/core/ConfigTest.java +++ b/src/test/java/seedu/notor/commons/core/ConfigTest.java @@ -1,4 +1,4 @@ -package seedu.address.commons.core; +package seedu.notor.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/notor/commons/core/VersionTest.java similarity index 98% rename from src/test/java/seedu/address/commons/core/VersionTest.java rename to src/test/java/seedu/notor/commons/core/VersionTest.java index ec6b932f7d1..af29b8bda89 100644 --- a/src/test/java/seedu/address/commons/core/VersionTest.java +++ b/src/test/java/seedu/notor/commons/core/VersionTest.java @@ -1,8 +1,8 @@ -package seedu.address.commons.core; +package seedu.notor.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.notor.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/notor/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/notor/commons/core/index/IndexTest.java index 296794c2be4..06b1c8389b3 100644 --- a/src/test/java/seedu/address/commons/core/index/IndexTest.java +++ b/src/test/java/seedu/notor/commons/core/index/IndexTest.java @@ -1,8 +1,8 @@ -package seedu.address.commons.core.index; +package seedu.notor.commons.core.index; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; -import static seedu.address.testutil.Assert.assertThrows; +import static seedu.notor.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/notor/commons/util/AppUtilTest.java similarity index 91% rename from src/test/java/seedu/address/commons/util/AppUtilTest.java rename to src/test/java/seedu/notor/commons/util/AppUtilTest.java index 594de1e6365..ef2406d4d2e 100644 --- a/src/test/java/seedu/address/commons/util/AppUtilTest.java +++ b/src/test/java/seedu/notor/commons/util/AppUtilTest.java @@ -1,7 +1,7 @@ -package seedu.address.commons.util; +package seedu.notor.commons.util; import static org.junit.jupiter.api.Assertions.assertNotNull; -import static seedu.address.testutil.Assert.assertThrows; +import static seedu.notor.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/notor/commons/util/CollectionUtilTest.java similarity index 96% rename from src/test/java/seedu/address/commons/util/CollectionUtilTest.java rename to src/test/java/seedu/notor/commons/util/CollectionUtilTest.java index 8028949f53b..9770448a2ac 100644 --- a/src/test/java/seedu/address/commons/util/CollectionUtilTest.java +++ b/src/test/java/seedu/notor/commons/util/CollectionUtilTest.java @@ -1,9 +1,9 @@ -package seedu.address.commons.util; +package seedu.notor.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.notor.commons.util.CollectionUtil.requireAllNonNull; +import static seedu.notor.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/notor/commons/util/ConfigUtilTest.java similarity index 94% rename from src/test/java/seedu/address/commons/util/ConfigUtilTest.java rename to src/test/java/seedu/notor/commons/util/ConfigUtilTest.java index 535abdb270f..b21e39c7989 100644 --- a/src/test/java/seedu/address/commons/util/ConfigUtilTest.java +++ b/src/test/java/seedu/notor/commons/util/ConfigUtilTest.java @@ -1,8 +1,8 @@ -package seedu.address.commons.util; +package seedu.notor.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.notor.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.notor.commons.core.Config; +import seedu.notor.commons.exceptions.DataConversionException; public class ConfigUtilTest { diff --git a/src/test/java/seedu/address/commons/util/FileUtilTest.java b/src/test/java/seedu/notor/commons/util/FileUtilTest.java similarity index 84% rename from src/test/java/seedu/address/commons/util/FileUtilTest.java rename to src/test/java/seedu/notor/commons/util/FileUtilTest.java index 1fe5478c756..5785b79cca3 100644 --- a/src/test/java/seedu/address/commons/util/FileUtilTest.java +++ b/src/test/java/seedu/notor/commons/util/FileUtilTest.java @@ -1,8 +1,8 @@ -package seedu.address.commons.util; +package seedu.notor.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.notor.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/notor/commons/util/JsonUtilTest.java similarity index 92% rename from src/test/java/seedu/address/commons/util/JsonUtilTest.java rename to src/test/java/seedu/notor/commons/util/JsonUtilTest.java index d4907539dee..075ed9c0369 100644 --- a/src/test/java/seedu/address/commons/util/JsonUtilTest.java +++ b/src/test/java/seedu/notor/commons/util/JsonUtilTest.java @@ -1,4 +1,4 @@ -package seedu.address.commons.util; +package seedu.notor.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.notor.testutil.SerializableTestClass; +import seedu.notor.testutil.TestUtil; /** * Tests JSON Read and Write diff --git a/src/test/java/seedu/address/commons/util/StringUtilTest.java b/src/test/java/seedu/notor/commons/util/StringUtilTest.java similarity index 98% rename from src/test/java/seedu/address/commons/util/StringUtilTest.java rename to src/test/java/seedu/notor/commons/util/StringUtilTest.java index 4cdd1fcd82e..b84fa8fff93 100644 --- a/src/test/java/seedu/address/commons/util/StringUtilTest.java +++ b/src/test/java/seedu/notor/commons/util/StringUtilTest.java @@ -1,8 +1,8 @@ -package seedu.address.commons.util; +package seedu.notor.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.notor.testutil.Assert.assertThrows; import java.io.FileNotFoundException; diff --git a/src/test/java/seedu/address/logic/LogicManagerTest.java b/src/test/java/seedu/notor/logic/LogicManagerTest.java similarity index 82% rename from src/test/java/seedu/address/logic/LogicManagerTest.java rename to src/test/java/seedu/notor/logic/LogicManagerTest.java index d28479a77ec..424115b8010 100644 --- a/src/test/java/seedu/address/logic/LogicManagerTest.java +++ b/src/test/java/seedu/notor/logic/LogicManagerTest.java @@ -1,13 +1,13 @@ -package seedu.address.logic; +package seedu.notor.logic; import static org.junit.jupiter.api.Assertions.assertEquals; -import static seedu.address.commons.core.Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX; -import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND; -import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY; -import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY; -import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY; -import static seedu.address.testutil.Assert.assertThrows; -import static seedu.address.testutil.TypicalPersons.AMY; +import static seedu.notor.commons.core.Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX; +import static seedu.notor.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND; +import static seedu.notor.logic.commands.CommandTestUtil.EMAIL_DESC_AMY; +import static seedu.notor.logic.commands.CommandTestUtil.NAME_DESC_AMY; +import static seedu.notor.logic.commands.CommandTestUtil.PHONE_DESC_AMY; +import static seedu.notor.testutil.Assert.assertThrows; +import static seedu.notor.testutil.TypicalPersons.AMY; import java.io.IOException; import java.nio.file.Path; @@ -16,22 +16,22 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; -import seedu.address.logic.commands.CommandResult; -import seedu.address.logic.commands.ListCommand; -import seedu.address.logic.commands.exceptions.CommandException; -import seedu.address.logic.commands.person.PersonCreateCommand; -import seedu.address.logic.executors.Executor; -import seedu.address.logic.executors.exceptions.ExecuteException; -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.person.Person; -import seedu.address.storage.JsonAddressBookStorage; -import seedu.address.storage.JsonUserPrefsStorage; -import seedu.address.storage.StorageManager; -import seedu.address.testutil.PersonBuilder; +import seedu.notor.logic.commands.CommandResult; +import seedu.notor.logic.commands.ListCommand; +import seedu.notor.logic.commands.exceptions.CommandException; +import seedu.notor.logic.commands.person.PersonCreateCommand; +import seedu.notor.logic.executors.Executor; +import seedu.notor.logic.executors.exceptions.ExecuteException; +import seedu.notor.logic.parser.exceptions.ParseException; +import seedu.notor.model.Model; +import seedu.notor.model.ModelManager; +import seedu.notor.model.ReadOnlyAddressBook; +import seedu.notor.model.UserPrefs; +import seedu.notor.model.person.Person; +import seedu.notor.storage.JsonAddressBookStorage; +import seedu.notor.storage.JsonUserPrefsStorage; +import seedu.notor.storage.StorageManager; +import seedu.notor.testutil.PersonBuilder; public class LogicManagerTest { private static final IOException DUMMY_IO_EXCEPTION = new IOException("dummy exception"); diff --git a/src/test/java/seedu/address/logic/commands/ClearCommandTest.java b/src/test/java/seedu/notor/logic/commands/ClearCommandTest.java similarity index 74% rename from src/test/java/seedu/address/logic/commands/ClearCommandTest.java rename to src/test/java/seedu/notor/logic/commands/ClearCommandTest.java index be1b3881b43..9fbd66e1489 100644 --- a/src/test/java/seedu/address/logic/commands/ClearCommandTest.java +++ b/src/test/java/seedu/notor/logic/commands/ClearCommandTest.java @@ -1,13 +1,13 @@ -package seedu.address.logic.commands; +package seedu.notor.logic.commands; -import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook; +import static seedu.notor.testutil.TypicalPersons.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.notor.model.AddressBook; +import seedu.notor.model.Model; +import seedu.notor.model.ModelManager; +import seedu.notor.model.UserPrefs; public class ClearCommandTest { diff --git a/src/test/java/seedu/address/logic/commands/CommandResultTest.java b/src/test/java/seedu/notor/logic/commands/CommandResultTest.java similarity index 98% rename from src/test/java/seedu/address/logic/commands/CommandResultTest.java rename to src/test/java/seedu/notor/logic/commands/CommandResultTest.java index 16c0f0e4868..500d837801f 100644 --- a/src/test/java/seedu/address/logic/commands/CommandResultTest.java +++ b/src/test/java/seedu/notor/logic/commands/CommandResultTest.java @@ -1,4 +1,4 @@ -package seedu.address.logic.commands; +package seedu.notor.logic.commands; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; diff --git a/src/test/java/seedu/address/logic/commands/CommandTestUtil.java b/src/test/java/seedu/notor/logic/commands/CommandTestUtil.java similarity index 87% rename from src/test/java/seedu/address/logic/commands/CommandTestUtil.java rename to src/test/java/seedu/notor/logic/commands/CommandTestUtil.java index f25f2d74ff6..8641ee75e39 100644 --- a/src/test/java/seedu/address/logic/commands/CommandTestUtil.java +++ b/src/test/java/seedu/notor/logic/commands/CommandTestUtil.java @@ -1,25 +1,25 @@ -package seedu.address.logic.commands; +package seedu.notor.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_EMAIL; -import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME; -import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE; -import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG; -import static seedu.address.testutil.Assert.assertThrows; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_EMAIL; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_NAME; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_PHONE; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_TAG; +import static seedu.notor.testutil.Assert.assertThrows; import java.util.ArrayList; import java.util.List; -import seedu.address.commons.core.index.Index; -import seedu.address.logic.commands.exceptions.CommandException; -import seedu.address.logic.executors.exceptions.ExecuteException; -import seedu.address.logic.executors.person.PersonEditExecutor; -import seedu.address.model.AddressBook; -import seedu.address.model.Model; -import seedu.address.model.person.NameContainsKeywordsPredicate; -import seedu.address.model.person.Person; -import seedu.address.testutil.PersonEditDescriptorBuilder; +import seedu.notor.commons.core.index.Index; +import seedu.notor.logic.commands.exceptions.CommandException; +import seedu.notor.logic.executors.exceptions.ExecuteException; +import seedu.notor.logic.executors.person.PersonEditExecutor; +import seedu.notor.model.AddressBook; +import seedu.notor.model.Model; +import seedu.notor.model.person.NameContainsKeywordsPredicate; +import seedu.notor.model.person.Person; +import seedu.notor.testutil.PersonEditDescriptorBuilder; /** * Contains helper methods for testing commands. diff --git a/src/test/java/seedu/address/logic/commands/ExitCommandTest.java b/src/test/java/seedu/notor/logic/commands/ExitCommandTest.java similarity index 62% rename from src/test/java/seedu/address/logic/commands/ExitCommandTest.java rename to src/test/java/seedu/notor/logic/commands/ExitCommandTest.java index 4050c362b7e..fbbfec88e75 100644 --- a/src/test/java/seedu/address/logic/commands/ExitCommandTest.java +++ b/src/test/java/seedu/notor/logic/commands/ExitCommandTest.java @@ -1,12 +1,12 @@ -package seedu.address.logic.commands; +package seedu.notor.logic.commands; -import static seedu.address.logic.commands.CommandTestUtil.assertExecuteSuccess; -import static seedu.address.logic.commands.ExitCommand.MESSAGE_EXIT_ACKNOWLEDGEMENT; +import static seedu.notor.logic.commands.CommandTestUtil.assertExecuteSuccess; +import static seedu.notor.logic.commands.ExitCommand.MESSAGE_EXIT_ACKNOWLEDGEMENT; import org.junit.jupiter.api.Test; -import seedu.address.model.Model; -import seedu.address.model.ModelManager; +import seedu.notor.model.Model; +import seedu.notor.model.ModelManager; public class ExitCommandTest { private final Model model = new ModelManager(); diff --git a/src/test/java/seedu/address/logic/commands/FindCommandTest.java b/src/test/java/seedu/notor/logic/commands/FindCommandTest.java similarity index 84% rename from src/test/java/seedu/address/logic/commands/FindCommandTest.java rename to src/test/java/seedu/notor/logic/commands/FindCommandTest.java index 67acdfb421c..4186e859dfe 100644 --- a/src/test/java/seedu/address/logic/commands/FindCommandTest.java +++ b/src/test/java/seedu/notor/logic/commands/FindCommandTest.java @@ -1,22 +1,22 @@ -package seedu.address.logic.commands; +package seedu.notor.logic.commands; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; -import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW; -import static seedu.address.testutil.TypicalPersons.CARL; -import static seedu.address.testutil.TypicalPersons.ELLE; -import static seedu.address.testutil.TypicalPersons.FIONA; -import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook; +import static seedu.notor.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW; +import static seedu.notor.testutil.TypicalPersons.CARL; +import static seedu.notor.testutil.TypicalPersons.ELLE; +import static seedu.notor.testutil.TypicalPersons.FIONA; +import static seedu.notor.testutil.TypicalPersons.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.person.NameContainsKeywordsPredicate; +import seedu.notor.model.Model; +import seedu.notor.model.ModelManager; +import seedu.notor.model.UserPrefs; +import seedu.notor.model.person.NameContainsKeywordsPredicate; /** * 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/notor/logic/commands/HelpCommandTest.java similarity index 62% rename from src/test/java/seedu/address/logic/commands/HelpCommandTest.java rename to src/test/java/seedu/notor/logic/commands/HelpCommandTest.java index 338f718a307..bdb8c74ecc2 100644 --- a/src/test/java/seedu/address/logic/commands/HelpCommandTest.java +++ b/src/test/java/seedu/notor/logic/commands/HelpCommandTest.java @@ -1,12 +1,12 @@ -package seedu.address.logic.commands; +package seedu.notor.logic.commands; -import static seedu.address.logic.commands.CommandTestUtil.assertExecuteSuccess; -import static seedu.address.logic.commands.HelpCommand.SHOWING_HELP_MESSAGE; +import static seedu.notor.logic.commands.CommandTestUtil.assertExecuteSuccess; +import static seedu.notor.logic.commands.HelpCommand.SHOWING_HELP_MESSAGE; import org.junit.jupiter.api.Test; -import seedu.address.model.Model; -import seedu.address.model.ModelManager; +import seedu.notor.model.Model; +import seedu.notor.model.ModelManager; public class HelpCommandTest { private final Model model = new ModelManager(); diff --git a/src/test/java/seedu/address/logic/commands/ListCommandTest.java b/src/test/java/seedu/notor/logic/commands/ListCommandTest.java similarity index 70% rename from src/test/java/seedu/address/logic/commands/ListCommandTest.java rename to src/test/java/seedu/notor/logic/commands/ListCommandTest.java index cbe3f731e69..0abadfd9b7f 100644 --- a/src/test/java/seedu/address/logic/commands/ListCommandTest.java +++ b/src/test/java/seedu/notor/logic/commands/ListCommandTest.java @@ -1,15 +1,15 @@ -package seedu.address.logic.commands; +package seedu.notor.logic.commands; -import static seedu.address.logic.commands.CommandTestUtil.showPersonAtIndex; -import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON; -import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook; +import static seedu.notor.logic.commands.CommandTestUtil.showPersonAtIndex; +import static seedu.notor.testutil.TypicalIndexes.INDEX_FIRST_PERSON; +import static seedu.notor.testutil.TypicalPersons.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.notor.model.Model; +import seedu.notor.model.ModelManager; +import seedu.notor.model.UserPrefs; /** * Contains integration tests (interaction with the Model) and unit tests for ListCommand. diff --git a/src/test/java/seedu/address/logic/commands/PersonCreateCommandIntegrationTest.java b/src/test/java/seedu/notor/logic/commands/PersonCreateCommandIntegrationTest.java similarity index 65% rename from src/test/java/seedu/address/logic/commands/PersonCreateCommandIntegrationTest.java rename to src/test/java/seedu/notor/logic/commands/PersonCreateCommandIntegrationTest.java index 1efb917b5e1..2a6f6d57479 100644 --- a/src/test/java/seedu/address/logic/commands/PersonCreateCommandIntegrationTest.java +++ b/src/test/java/seedu/notor/logic/commands/PersonCreateCommandIntegrationTest.java @@ -1,20 +1,20 @@ -package seedu.address.logic.commands; +package seedu.notor.logic.commands; -import static seedu.address.logic.commands.CommandTestUtil.assertExecuteFailure; -import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook; +import static seedu.notor.logic.commands.CommandTestUtil.assertExecuteFailure; +import static seedu.notor.testutil.TypicalPersons.getTypicalAddressBook; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import seedu.address.logic.commands.person.PersonCreateCommand; -import seedu.address.logic.executors.Executor; -import seedu.address.logic.executors.person.PersonCreateExecutor; -import seedu.address.logic.parser.exceptions.ParseException; -import seedu.address.model.Model; -import seedu.address.model.ModelManager; -import seedu.address.model.UserPrefs; -import seedu.address.model.person.Person; -import seedu.address.testutil.PersonBuilder; +import seedu.notor.logic.commands.person.PersonCreateCommand; +import seedu.notor.logic.executors.Executor; +import seedu.notor.logic.executors.person.PersonCreateExecutor; +import seedu.notor.logic.parser.exceptions.ParseException; +import seedu.notor.model.Model; +import seedu.notor.model.ModelManager; +import seedu.notor.model.UserPrefs; +import seedu.notor.model.person.Person; +import seedu.notor.testutil.PersonBuilder; /** * Contains integration tests (interaction with the Model) for {@code AddCommand}. diff --git a/src/test/java/seedu/address/logic/commands/PersonCreateCommandTest.java b/src/test/java/seedu/notor/logic/commands/PersonCreateCommandTest.java similarity index 89% rename from src/test/java/seedu/address/logic/commands/PersonCreateCommandTest.java rename to src/test/java/seedu/notor/logic/commands/PersonCreateCommandTest.java index e92a7e8e620..96d82732856 100644 --- a/src/test/java/seedu/address/logic/commands/PersonCreateCommandTest.java +++ b/src/test/java/seedu/notor/logic/commands/PersonCreateCommandTest.java @@ -1,10 +1,10 @@ -package seedu.address.logic.commands; +package seedu.notor.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.notor.testutil.Assert.assertThrows; import java.nio.file.Path; import java.util.ArrayList; @@ -14,20 +14,20 @@ import org.junit.jupiter.api.Test; import javafx.collections.ObservableList; -import seedu.address.commons.core.GuiSettings; -import seedu.address.logic.commands.person.PersonCreateCommand; -import seedu.address.logic.executors.Executor; -import seedu.address.logic.executors.exceptions.ExecuteException; -import seedu.address.logic.executors.person.PersonCreateExecutor; -import seedu.address.logic.parser.exceptions.ParseException; -import seedu.address.model.AddressBook; -import seedu.address.model.Model; -import seedu.address.model.ReadOnlyAddressBook; -import seedu.address.model.ReadOnlyUserPrefs; -import seedu.address.model.group.SubGroup; -import seedu.address.model.group.SuperGroup; -import seedu.address.model.person.Person; -import seedu.address.testutil.PersonBuilder; +import seedu.notor.commons.core.GuiSettings; +import seedu.notor.logic.commands.person.PersonCreateCommand; +import seedu.notor.logic.executors.Executor; +import seedu.notor.logic.executors.exceptions.ExecuteException; +import seedu.notor.logic.executors.person.PersonCreateExecutor; +import seedu.notor.logic.parser.exceptions.ParseException; +import seedu.notor.model.AddressBook; +import seedu.notor.model.Model; +import seedu.notor.model.ReadOnlyAddressBook; +import seedu.notor.model.ReadOnlyUserPrefs; +import seedu.notor.model.group.SubGroup; +import seedu.notor.model.group.SuperGroup; +import seedu.notor.model.person.Person; +import seedu.notor.testutil.PersonBuilder; public class PersonCreateCommandTest { diff --git a/src/test/java/seedu/address/logic/commands/PersonDeleteCommandTest.java b/src/test/java/seedu/notor/logic/commands/PersonDeleteCommandTest.java similarity index 81% rename from src/test/java/seedu/address/logic/commands/PersonDeleteCommandTest.java rename to src/test/java/seedu/notor/logic/commands/PersonDeleteCommandTest.java index 995f4828b00..ca94121487d 100644 --- a/src/test/java/seedu/address/logic/commands/PersonDeleteCommandTest.java +++ b/src/test/java/seedu/notor/logic/commands/PersonDeleteCommandTest.java @@ -1,27 +1,27 @@ -package seedu.address.logic.commands; +package seedu.notor.logic.commands; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -import static seedu.address.logic.commands.CommandTestUtil.assertExecuteFailure; -import static seedu.address.logic.commands.CommandTestUtil.assertExecuteSuccess; -import static seedu.address.logic.commands.CommandTestUtil.showPersonAtIndex; -import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON; -import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON; -import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook; +import static seedu.notor.logic.commands.CommandTestUtil.assertExecuteFailure; +import static seedu.notor.logic.commands.CommandTestUtil.assertExecuteSuccess; +import static seedu.notor.logic.commands.CommandTestUtil.showPersonAtIndex; +import static seedu.notor.testutil.TypicalIndexes.INDEX_FIRST_PERSON; +import static seedu.notor.testutil.TypicalIndexes.INDEX_SECOND_PERSON; +import static seedu.notor.testutil.TypicalPersons.getTypicalAddressBook; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import seedu.address.commons.core.Messages; -import seedu.address.commons.core.index.Index; -import seedu.address.logic.commands.person.PersonDeleteCommand; -import seedu.address.logic.executors.Executor; -import seedu.address.logic.executors.person.PersonDeleteExecutor; -import seedu.address.model.Model; -import seedu.address.model.ModelManager; -import seedu.address.model.UserPrefs; -import seedu.address.model.person.Person; +import seedu.notor.commons.core.Messages; +import seedu.notor.commons.core.index.Index; +import seedu.notor.logic.commands.person.PersonDeleteCommand; +import seedu.notor.logic.executors.Executor; +import seedu.notor.logic.executors.person.PersonDeleteExecutor; +import seedu.notor.model.Model; +import seedu.notor.model.ModelManager; +import seedu.notor.model.UserPrefs; +import seedu.notor.model.person.Person; /** * Contains integration tests (interaction with the Model) and unit tests for diff --git a/src/test/java/seedu/address/logic/commands/PersonEditCommandTest.java b/src/test/java/seedu/notor/logic/commands/PersonEditCommandTest.java similarity index 83% rename from src/test/java/seedu/address/logic/commands/PersonEditCommandTest.java rename to src/test/java/seedu/notor/logic/commands/PersonEditCommandTest.java index a8284fa9c9d..9e333a2bdd5 100644 --- a/src/test/java/seedu/address/logic/commands/PersonEditCommandTest.java +++ b/src/test/java/seedu/notor/logic/commands/PersonEditCommandTest.java @@ -1,35 +1,35 @@ -package seedu.address.logic.commands; +package seedu.notor.logic.commands; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY; -import static seedu.address.logic.commands.CommandTestUtil.DESC_BOB; -import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB; -import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB; -import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND; -import static seedu.address.logic.commands.CommandTestUtil.assertExecuteFailure; -import static seedu.address.logic.commands.CommandTestUtil.showPersonAtIndex; -import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON; -import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON; -import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook; +import static seedu.notor.logic.commands.CommandTestUtil.DESC_AMY; +import static seedu.notor.logic.commands.CommandTestUtil.DESC_BOB; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_NAME_BOB; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_PHONE_BOB; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND; +import static seedu.notor.logic.commands.CommandTestUtil.assertExecuteFailure; +import static seedu.notor.logic.commands.CommandTestUtil.showPersonAtIndex; +import static seedu.notor.testutil.TypicalIndexes.INDEX_FIRST_PERSON; +import static seedu.notor.testutil.TypicalIndexes.INDEX_SECOND_PERSON; +import static seedu.notor.testutil.TypicalPersons.getTypicalAddressBook; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import seedu.address.commons.core.Messages; -import seedu.address.commons.core.index.Index; -import seedu.address.logic.commands.person.PersonEditCommand; -import seedu.address.logic.executors.Executor; -import seedu.address.logic.executors.person.PersonEditExecutor; -import seedu.address.logic.executors.person.PersonEditExecutor.PersonEditDescriptor; -import seedu.address.model.AddressBook; -import seedu.address.model.Model; -import seedu.address.model.ModelManager; -import seedu.address.model.UserPrefs; -import seedu.address.model.person.Person; -import seedu.address.testutil.PersonBuilder; -import seedu.address.testutil.PersonEditDescriptorBuilder; +import seedu.notor.commons.core.Messages; +import seedu.notor.commons.core.index.Index; +import seedu.notor.logic.commands.person.PersonEditCommand; +import seedu.notor.logic.executors.Executor; +import seedu.notor.logic.executors.person.PersonEditExecutor; +import seedu.notor.logic.executors.person.PersonEditExecutor.PersonEditDescriptor; +import seedu.notor.model.AddressBook; +import seedu.notor.model.Model; +import seedu.notor.model.ModelManager; +import seedu.notor.model.UserPrefs; +import seedu.notor.model.person.Person; +import seedu.notor.testutil.PersonBuilder; +import seedu.notor.testutil.PersonEditDescriptorBuilder; /** * Contains integration tests (interaction with the Model) and unit tests for EditCommand. diff --git a/src/test/java/seedu/address/logic/commands/PersonEditDescriptorTest.java b/src/test/java/seedu/notor/logic/commands/PersonEditDescriptorTest.java similarity index 71% rename from src/test/java/seedu/address/logic/commands/PersonEditDescriptorTest.java rename to src/test/java/seedu/notor/logic/commands/PersonEditDescriptorTest.java index 0720bcd2708..cee18df4ecf 100644 --- a/src/test/java/seedu/address/logic/commands/PersonEditDescriptorTest.java +++ b/src/test/java/seedu/notor/logic/commands/PersonEditDescriptorTest.java @@ -1,18 +1,18 @@ -package seedu.address.logic.commands; +package seedu.notor.logic.commands; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; -import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY; -import static seedu.address.logic.commands.CommandTestUtil.DESC_BOB; -import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB; -import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB; -import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB; -import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND; +import static seedu.notor.logic.commands.CommandTestUtil.DESC_AMY; +import static seedu.notor.logic.commands.CommandTestUtil.DESC_BOB; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_EMAIL_BOB; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_NAME_BOB; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_PHONE_BOB; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND; import org.junit.jupiter.api.Test; -import seedu.address.logic.executors.person.PersonEditExecutor.PersonEditDescriptor; -import seedu.address.testutil.PersonEditDescriptorBuilder; +import seedu.notor.logic.executors.person.PersonEditExecutor.PersonEditDescriptor; +import seedu.notor.testutil.PersonEditDescriptorBuilder; public class PersonEditDescriptorTest { diff --git a/src/test/java/seedu/address/logic/parser/AddressBookParserTest.java b/src/test/java/seedu/notor/logic/parser/AddressBookParserTest.java similarity index 74% rename from src/test/java/seedu/address/logic/parser/AddressBookParserTest.java rename to src/test/java/seedu/notor/logic/parser/AddressBookParserTest.java index 3dcbc661c28..86941f423e5 100644 --- a/src/test/java/seedu/address/logic/parser/AddressBookParserTest.java +++ b/src/test/java/seedu/notor/logic/parser/AddressBookParserTest.java @@ -1,34 +1,34 @@ -package seedu.address.logic.parser; +package seedu.notor.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_PERSON; +import static seedu.notor.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.notor.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND; +import static seedu.notor.testutil.Assert.assertThrows; +import static seedu.notor.testutil.TypicalIndexes.INDEX_FIRST_PERSON; import java.util.Arrays; import java.util.List; import org.junit.jupiter.api.Test; -import seedu.address.logic.commands.ClearCommand; -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.commands.person.PersonCreateCommand; -import seedu.address.logic.commands.person.PersonDeleteCommand; -import seedu.address.logic.commands.person.PersonEditCommand; -import seedu.address.logic.commands.person.PersonNoteCommand; -import seedu.address.logic.executors.person.PersonEditExecutor.PersonEditDescriptor; -import seedu.address.logic.parser.exceptions.ParseException; -import seedu.address.model.person.NameContainsKeywordsPredicate; -import seedu.address.model.person.Note; -import seedu.address.model.person.Person; -import seedu.address.testutil.PersonBuilder; -import seedu.address.testutil.PersonEditDescriptorBuilder; -import seedu.address.testutil.PersonUtil; +import seedu.notor.logic.commands.ClearCommand; +import seedu.notor.logic.commands.ExitCommand; +import seedu.notor.logic.commands.FindCommand; +import seedu.notor.logic.commands.HelpCommand; +import seedu.notor.logic.commands.ListCommand; +import seedu.notor.logic.commands.person.PersonCreateCommand; +import seedu.notor.logic.commands.person.PersonDeleteCommand; +import seedu.notor.logic.commands.person.PersonEditCommand; +import seedu.notor.logic.commands.person.PersonNoteCommand; +import seedu.notor.logic.executors.person.PersonEditExecutor.PersonEditDescriptor; +import seedu.notor.logic.parser.exceptions.ParseException; +import seedu.notor.model.person.NameContainsKeywordsPredicate; +import seedu.notor.model.person.Note; +import seedu.notor.model.person.Person; +import seedu.notor.testutil.PersonBuilder; +import seedu.notor.testutil.PersonEditDescriptorBuilder; +import seedu.notor.testutil.PersonUtil; public class AddressBookParserTest { private final AddressBookParser parser = new AddressBookParser(); diff --git a/src/test/java/seedu/address/logic/parser/ArgumentTokenizerTest.java b/src/test/java/seedu/notor/logic/parser/ArgumentTokenizerTest.java similarity index 99% rename from src/test/java/seedu/address/logic/parser/ArgumentTokenizerTest.java rename to src/test/java/seedu/notor/logic/parser/ArgumentTokenizerTest.java index e1c1a715f71..61b44b8dd35 100644 --- a/src/test/java/seedu/address/logic/parser/ArgumentTokenizerTest.java +++ b/src/test/java/seedu/notor/logic/parser/ArgumentTokenizerTest.java @@ -1,4 +1,4 @@ -package seedu.address.logic.parser; +package seedu.notor.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/notor/logic/parser/CommandParserTestUtil.java similarity index 89% rename from src/test/java/seedu/address/logic/parser/CommandParserTestUtil.java rename to src/test/java/seedu/notor/logic/parser/CommandParserTestUtil.java index e4c33515768..0b40d9761ee 100644 --- a/src/test/java/seedu/address/logic/parser/CommandParserTestUtil.java +++ b/src/test/java/seedu/notor/logic/parser/CommandParserTestUtil.java @@ -1,9 +1,9 @@ -package seedu.address.logic.parser; +package seedu.notor.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.notor.logic.commands.Command; +import seedu.notor.logic.parser.exceptions.ParseException; /** * Contains helper methods for testing command parsers. diff --git a/src/test/java/seedu/address/logic/parser/FindCommandParserTest.java b/src/test/java/seedu/notor/logic/parser/FindCommandParserTest.java similarity index 67% rename from src/test/java/seedu/address/logic/parser/FindCommandParserTest.java rename to src/test/java/seedu/notor/logic/parser/FindCommandParserTest.java index 24b0e95d581..c5cdb6d7fb9 100644 --- a/src/test/java/seedu/address/logic/parser/FindCommandParserTest.java +++ b/src/test/java/seedu/notor/logic/parser/FindCommandParserTest.java @@ -1,15 +1,15 @@ -package seedu.address.logic.parser; +package seedu.notor.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.notor.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.notor.logic.parser.CommandParserTestUtil.assertParseFailure; +import static seedu.notor.logic.parser.CommandParserTestUtil.assertParseSuccess; import java.util.Arrays; import org.junit.jupiter.api.Test; -import seedu.address.logic.commands.FindCommand; -import seedu.address.model.person.NameContainsKeywordsPredicate; +import seedu.notor.logic.commands.FindCommand; +import seedu.notor.model.person.NameContainsKeywordsPredicate; public class FindCommandParserTest { diff --git a/src/test/java/seedu/address/logic/parser/ParserUtilTest.java b/src/test/java/seedu/notor/logic/parser/ParserUtilTest.java similarity index 92% rename from src/test/java/seedu/address/logic/parser/ParserUtilTest.java rename to src/test/java/seedu/notor/logic/parser/ParserUtilTest.java index 74a53d03492..e36ce4a32e4 100644 --- a/src/test/java/seedu/address/logic/parser/ParserUtilTest.java +++ b/src/test/java/seedu/notor/logic/parser/ParserUtilTest.java @@ -1,10 +1,10 @@ -package seedu.address.logic.parser; +package seedu.notor.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_PERSON; +import static seedu.notor.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX; +import static seedu.notor.testutil.Assert.assertThrows; +import static seedu.notor.testutil.TypicalIndexes.INDEX_FIRST_PERSON; import java.util.Arrays; import java.util.Collections; @@ -13,11 +13,11 @@ import org.junit.jupiter.api.Test; -import seedu.address.logic.parser.exceptions.ParseException; -import seedu.address.model.person.Email; -import seedu.address.model.person.Name; -import seedu.address.model.person.Phone; -import seedu.address.model.tag.Tag; +import seedu.notor.logic.parser.exceptions.ParseException; +import seedu.notor.model.person.Email; +import seedu.notor.model.person.Name; +import seedu.notor.model.person.Phone; +import seedu.notor.model.tag.Tag; @SuppressWarnings("NumericOverflow") public class ParserUtilTest { diff --git a/src/test/java/seedu/address/logic/parser/PersonCreateCommandParserTest.java b/src/test/java/seedu/notor/logic/parser/PersonCreateCommandParserTest.java similarity index 63% rename from src/test/java/seedu/address/logic/parser/PersonCreateCommandParserTest.java rename to src/test/java/seedu/notor/logic/parser/PersonCreateCommandParserTest.java index ff51ddcabcf..f24628d20f0 100644 --- a/src/test/java/seedu/address/logic/parser/PersonCreateCommandParserTest.java +++ b/src/test/java/seedu/notor/logic/parser/PersonCreateCommandParserTest.java @@ -1,41 +1,41 @@ -package seedu.address.logic.parser; - -import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; -import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY; -import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB; -import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC; -import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC; -import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC; -import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC; -import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY; -import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB; -import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY; -import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB; -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.TAG_DESC_FRIEND; -import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND; -import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB; -import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB; -import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB; -import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND; -import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND; -import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure; -import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess; -import static seedu.address.testutil.TypicalPersons.AMY; -import static seedu.address.testutil.TypicalPersons.BOB; +package seedu.notor.logic.parser; + +import static seedu.notor.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.notor.logic.commands.CommandTestUtil.EMAIL_DESC_AMY; +import static seedu.notor.logic.commands.CommandTestUtil.EMAIL_DESC_BOB; +import static seedu.notor.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC; +import static seedu.notor.logic.commands.CommandTestUtil.INVALID_NAME_DESC; +import static seedu.notor.logic.commands.CommandTestUtil.INVALID_PHONE_DESC; +import static seedu.notor.logic.commands.CommandTestUtil.INVALID_TAG_DESC; +import static seedu.notor.logic.commands.CommandTestUtil.NAME_DESC_AMY; +import static seedu.notor.logic.commands.CommandTestUtil.NAME_DESC_BOB; +import static seedu.notor.logic.commands.CommandTestUtil.PHONE_DESC_AMY; +import static seedu.notor.logic.commands.CommandTestUtil.PHONE_DESC_BOB; +import static seedu.notor.logic.commands.CommandTestUtil.PREAMBLE_NON_EMPTY; +import static seedu.notor.logic.commands.CommandTestUtil.PREAMBLE_WHITESPACE; +import static seedu.notor.logic.commands.CommandTestUtil.TAG_DESC_FRIEND; +import static seedu.notor.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_EMAIL_BOB; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_NAME_BOB; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_PHONE_BOB; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_TAG_FRIEND; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND; +import static seedu.notor.logic.parser.CommandParserTestUtil.assertParseFailure; +import static seedu.notor.logic.parser.CommandParserTestUtil.assertParseSuccess; +import static seedu.notor.testutil.TypicalPersons.AMY; +import static seedu.notor.testutil.TypicalPersons.BOB; import org.junit.jupiter.api.Test; -import seedu.address.logic.commands.person.PersonCreateCommand; -import seedu.address.logic.parser.exceptions.ParseException; -import seedu.address.logic.parser.person.PersonCreateCommandParser; -import seedu.address.model.person.Email; -import seedu.address.model.person.Name; -import seedu.address.model.person.Person; -import seedu.address.model.person.Phone; -import seedu.address.model.tag.Tag; -import seedu.address.testutil.PersonBuilder; +import seedu.notor.logic.commands.person.PersonCreateCommand; +import seedu.notor.logic.parser.exceptions.ParseException; +import seedu.notor.logic.parser.person.PersonCreateCommandParser; +import seedu.notor.model.person.Email; +import seedu.notor.model.person.Name; +import seedu.notor.model.person.Person; +import seedu.notor.model.person.Phone; +import seedu.notor.model.tag.Tag; +import seedu.notor.testutil.PersonBuilder; public class PersonCreateCommandParserTest { private final PersonCreateCommandParser parser = new PersonCreateCommandParser(); diff --git a/src/test/java/seedu/address/logic/parser/PersonDeleteCommandParserTest.java b/src/test/java/seedu/notor/logic/parser/PersonDeleteCommandParserTest.java similarity index 65% rename from src/test/java/seedu/address/logic/parser/PersonDeleteCommandParserTest.java rename to src/test/java/seedu/notor/logic/parser/PersonDeleteCommandParserTest.java index 3733a6075b8..0aafa6b54fb 100644 --- a/src/test/java/seedu/address/logic/parser/PersonDeleteCommandParserTest.java +++ b/src/test/java/seedu/notor/logic/parser/PersonDeleteCommandParserTest.java @@ -1,14 +1,14 @@ -package seedu.address.logic.parser; +package seedu.notor.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_PERSON; +import static seedu.notor.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.notor.logic.parser.CommandParserTestUtil.assertParseFailure; +import static seedu.notor.logic.parser.CommandParserTestUtil.assertParseSuccess; +import static seedu.notor.testutil.TypicalIndexes.INDEX_FIRST_PERSON; import org.junit.jupiter.api.Test; -import seedu.address.logic.commands.person.PersonDeleteCommand; -import seedu.address.logic.parser.person.PersonDeleteCommandParser; +import seedu.notor.logic.commands.person.PersonDeleteCommand; +import seedu.notor.logic.parser.person.PersonDeleteCommandParser; /** * 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/PersonEditCommandParserTest.java b/src/test/java/seedu/notor/logic/parser/PersonEditCommandParserTest.java similarity index 76% rename from src/test/java/seedu/address/logic/parser/PersonEditCommandParserTest.java rename to src/test/java/seedu/notor/logic/parser/PersonEditCommandParserTest.java index 4eb9125f958..b6b314ccb40 100644 --- a/src/test/java/seedu/address/logic/parser/PersonEditCommandParserTest.java +++ b/src/test/java/seedu/notor/logic/parser/PersonEditCommandParserTest.java @@ -1,42 +1,42 @@ -package seedu.address.logic.parser; - -import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; -import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY; -import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB; -import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC; -import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC; -import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC; -import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC; -import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY; -import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY; -import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB; -import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND; -import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND; -import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY; -import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB; -import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY; -import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY; -import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB; -import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND; -import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND; -import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG; -import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure; -import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess; -import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON; -import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON; -import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON; +package seedu.notor.logic.parser; + +import static seedu.notor.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.notor.logic.commands.CommandTestUtil.EMAIL_DESC_AMY; +import static seedu.notor.logic.commands.CommandTestUtil.EMAIL_DESC_BOB; +import static seedu.notor.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC; +import static seedu.notor.logic.commands.CommandTestUtil.INVALID_NAME_DESC; +import static seedu.notor.logic.commands.CommandTestUtil.INVALID_PHONE_DESC; +import static seedu.notor.logic.commands.CommandTestUtil.INVALID_TAG_DESC; +import static seedu.notor.logic.commands.CommandTestUtil.NAME_DESC_AMY; +import static seedu.notor.logic.commands.CommandTestUtil.PHONE_DESC_AMY; +import static seedu.notor.logic.commands.CommandTestUtil.PHONE_DESC_BOB; +import static seedu.notor.logic.commands.CommandTestUtil.TAG_DESC_FRIEND; +import static seedu.notor.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_EMAIL_AMY; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_EMAIL_BOB; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_NAME_AMY; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_PHONE_AMY; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_PHONE_BOB; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_TAG_FRIEND; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_TAG; +import static seedu.notor.logic.parser.CommandParserTestUtil.assertParseFailure; +import static seedu.notor.logic.parser.CommandParserTestUtil.assertParseSuccess; +import static seedu.notor.testutil.TypicalIndexes.INDEX_FIRST_PERSON; +import static seedu.notor.testutil.TypicalIndexes.INDEX_SECOND_PERSON; +import static seedu.notor.testutil.TypicalIndexes.INDEX_THIRD_PERSON; import org.junit.jupiter.api.Test; -import seedu.address.commons.core.index.Index; -import seedu.address.logic.commands.person.PersonEditCommand; -import seedu.address.logic.executors.person.PersonEditExecutor.PersonEditDescriptor; -import seedu.address.logic.parser.person.PersonEditCommandParser; -import seedu.address.model.person.Email; -import seedu.address.model.person.Name; -import seedu.address.model.person.Phone; -import seedu.address.model.tag.Tag; -import seedu.address.testutil.PersonEditDescriptorBuilder; +import seedu.notor.commons.core.index.Index; +import seedu.notor.logic.commands.person.PersonEditCommand; +import seedu.notor.logic.executors.person.PersonEditExecutor.PersonEditDescriptor; +import seedu.notor.logic.parser.person.PersonEditCommandParser; +import seedu.notor.model.person.Email; +import seedu.notor.model.person.Name; +import seedu.notor.model.person.Phone; +import seedu.notor.model.tag.Tag; +import seedu.notor.testutil.PersonEditDescriptorBuilder; public class PersonEditCommandParserTest { diff --git a/src/test/java/seedu/address/logic/parser/PersonNoteCommandParserTest.java b/src/test/java/seedu/notor/logic/parser/PersonNoteCommandParserTest.java similarity index 56% rename from src/test/java/seedu/address/logic/parser/PersonNoteCommandParserTest.java rename to src/test/java/seedu/notor/logic/parser/PersonNoteCommandParserTest.java index 8d53ff598ae..9ce39c4fcf7 100644 --- a/src/test/java/seedu/address/logic/parser/PersonNoteCommandParserTest.java +++ b/src/test/java/seedu/notor/logic/parser/PersonNoteCommandParserTest.java @@ -1,13 +1,13 @@ -package seedu.address.logic.parser; +package seedu.notor.logic.parser; -import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess; -import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON; +import static seedu.notor.logic.parser.CommandParserTestUtil.assertParseSuccess; +import static seedu.notor.testutil.TypicalIndexes.INDEX_FIRST_PERSON; import org.junit.jupiter.api.Test; -import seedu.address.commons.core.index.Index; -import seedu.address.logic.commands.person.PersonNoteCommand; -import seedu.address.logic.parser.person.PersonNoteCommandParser; +import seedu.notor.commons.core.index.Index; +import seedu.notor.logic.commands.person.PersonNoteCommand; +import seedu.notor.logic.parser.person.PersonNoteCommandParser; public class PersonNoteCommandParserTest { private final PersonNoteCommandParser parser = new PersonNoteCommandParser(); diff --git a/src/test/java/seedu/address/model/AddressBookTest.java b/src/test/java/seedu/notor/model/AddressBookTest.java similarity index 85% rename from src/test/java/seedu/address/model/AddressBookTest.java rename to src/test/java/seedu/notor/model/AddressBookTest.java index 59175dbb5a7..e4bdd4c9e02 100644 --- a/src/test/java/seedu/address/model/AddressBookTest.java +++ b/src/test/java/seedu/notor/model/AddressBookTest.java @@ -1,12 +1,12 @@ -package seedu.address.model; +package seedu.notor.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_TAG_HUSBAND; -import static seedu.address.testutil.Assert.assertThrows; -import static seedu.address.testutil.TypicalPersons.ALICE; -import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND; +import static seedu.notor.testutil.Assert.assertThrows; +import static seedu.notor.testutil.TypicalPersons.ALICE; +import static seedu.notor.testutil.TypicalPersons.getTypicalAddressBook; import java.util.Collection; import java.util.Collections; @@ -16,10 +16,10 @@ import javafx.collections.FXCollections; import javafx.collections.ObservableList; -import seedu.address.model.group.SubGroup; -import seedu.address.model.group.SuperGroup; -import seedu.address.model.person.Person; -import seedu.address.testutil.PersonBuilder; +import seedu.notor.model.group.SubGroup; +import seedu.notor.model.group.SuperGroup; +import seedu.notor.model.person.Person; +import seedu.notor.testutil.PersonBuilder; public class AddressBookTest { diff --git a/src/test/java/seedu/address/model/ModelManagerTest.java b/src/test/java/seedu/notor/model/ModelManagerTest.java similarity index 91% rename from src/test/java/seedu/address/model/ModelManagerTest.java rename to src/test/java/seedu/notor/model/ModelManagerTest.java index f864437db71..4761fd30b73 100644 --- a/src/test/java/seedu/address/model/ModelManagerTest.java +++ b/src/test/java/seedu/notor/model/ModelManagerTest.java @@ -1,13 +1,13 @@ -package seedu.address.model; +package seedu.notor.model; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS; -import static seedu.address.testutil.Assert.assertThrows; -import static seedu.address.testutil.TypicalPersons.ALICE; -import static seedu.address.testutil.TypicalPersons.BENSON; +import static seedu.notor.model.Model.PREDICATE_SHOW_ALL_PERSONS; +import static seedu.notor.testutil.Assert.assertThrows; +import static seedu.notor.testutil.TypicalPersons.ALICE; +import static seedu.notor.testutil.TypicalPersons.BENSON; import java.nio.file.Path; import java.nio.file.Paths; @@ -15,9 +15,9 @@ import org.junit.jupiter.api.Test; -import seedu.address.commons.core.GuiSettings; -import seedu.address.model.person.NameContainsKeywordsPredicate; -import seedu.address.testutil.AddressBookBuilder; +import seedu.notor.commons.core.GuiSettings; +import seedu.notor.model.person.NameContainsKeywordsPredicate; +import seedu.notor.testutil.AddressBookBuilder; public class ModelManagerTest { diff --git a/src/test/java/seedu/address/model/UserPrefsTest.java b/src/test/java/seedu/notor/model/UserPrefsTest.java similarity index 86% rename from src/test/java/seedu/address/model/UserPrefsTest.java rename to src/test/java/seedu/notor/model/UserPrefsTest.java index b1307a70d52..375f357e43c 100644 --- a/src/test/java/seedu/address/model/UserPrefsTest.java +++ b/src/test/java/seedu/notor/model/UserPrefsTest.java @@ -1,6 +1,6 @@ -package seedu.address.model; +package seedu.notor.model; -import static seedu.address.testutil.Assert.assertThrows; +import static seedu.notor.testutil.Assert.assertThrows; import org.junit.jupiter.api.Test; diff --git a/src/test/java/seedu/address/model/person/EmailTest.java b/src/test/java/seedu/notor/model/person/EmailTest.java similarity index 97% rename from src/test/java/seedu/address/model/person/EmailTest.java rename to src/test/java/seedu/notor/model/person/EmailTest.java index bbcc6c8c98e..e9a58202394 100644 --- a/src/test/java/seedu/address/model/person/EmailTest.java +++ b/src/test/java/seedu/notor/model/person/EmailTest.java @@ -1,8 +1,8 @@ -package seedu.address.model.person; +package seedu.notor.model.person; 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.notor.testutil.Assert.assertThrows; import org.junit.jupiter.api.Test; diff --git a/src/test/java/seedu/address/model/person/NameContainsKeywordsPredicateTest.java b/src/test/java/seedu/notor/model/person/NameContainsKeywordsPredicateTest.java similarity index 97% rename from src/test/java/seedu/address/model/person/NameContainsKeywordsPredicateTest.java rename to src/test/java/seedu/notor/model/person/NameContainsKeywordsPredicateTest.java index 72e4212154a..f40b4de4b1e 100644 --- a/src/test/java/seedu/address/model/person/NameContainsKeywordsPredicateTest.java +++ b/src/test/java/seedu/notor/model/person/NameContainsKeywordsPredicateTest.java @@ -1,4 +1,4 @@ -package seedu.address.model.person; +package seedu.notor.model.person; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -11,7 +11,7 @@ import org.junit.jupiter.api.Test; -import seedu.address.testutil.PersonBuilder; +import seedu.notor.testutil.PersonBuilder; public class NameContainsKeywordsPredicateTest { diff --git a/src/test/java/seedu/address/model/person/NameTest.java b/src/test/java/seedu/notor/model/person/NameTest.java similarity index 93% rename from src/test/java/seedu/address/model/person/NameTest.java rename to src/test/java/seedu/notor/model/person/NameTest.java index c9801392874..54485962370 100644 --- a/src/test/java/seedu/address/model/person/NameTest.java +++ b/src/test/java/seedu/notor/model/person/NameTest.java @@ -1,8 +1,8 @@ -package seedu.address.model.person; +package seedu.notor.model.person; 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.notor.testutil.Assert.assertThrows; import org.junit.jupiter.api.Test; diff --git a/src/test/java/seedu/address/model/person/PersonTest.java b/src/test/java/seedu/notor/model/person/PersonTest.java similarity index 83% rename from src/test/java/seedu/address/model/person/PersonTest.java rename to src/test/java/seedu/notor/model/person/PersonTest.java index 578c4f79c11..ac981b0a9c4 100644 --- a/src/test/java/seedu/address/model/person/PersonTest.java +++ b/src/test/java/seedu/notor/model/person/PersonTest.java @@ -1,20 +1,20 @@ -package seedu.address.model.person; +package seedu.notor.model.person; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB; -import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB; -import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB; -import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND; -import static seedu.address.testutil.Assert.assertThrows; -import static seedu.address.testutil.TypicalPersons.ALICE; -import static seedu.address.testutil.TypicalPersons.BOB; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_EMAIL_BOB; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_NAME_BOB; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_PHONE_BOB; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND; +import static seedu.notor.testutil.Assert.assertThrows; +import static seedu.notor.testutil.TypicalPersons.ALICE; +import static seedu.notor.testutil.TypicalPersons.BOB; import org.junit.jupiter.api.Test; -import seedu.address.testutil.PersonBuilder; +import seedu.notor.testutil.PersonBuilder; public class PersonTest { diff --git a/src/test/java/seedu/address/model/person/PhoneTest.java b/src/test/java/seedu/notor/model/person/PhoneTest.java similarity index 93% rename from src/test/java/seedu/address/model/person/PhoneTest.java rename to src/test/java/seedu/notor/model/person/PhoneTest.java index 8dd52766a5f..0ebb71d038b 100644 --- a/src/test/java/seedu/address/model/person/PhoneTest.java +++ b/src/test/java/seedu/notor/model/person/PhoneTest.java @@ -1,8 +1,8 @@ -package seedu.address.model.person; +package seedu.notor.model.person; 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.notor.testutil.Assert.assertThrows; import org.junit.jupiter.api.Test; diff --git a/src/test/java/seedu/address/model/person/UniquePersonListTest.java b/src/test/java/seedu/notor/model/person/UniquePersonListTest.java similarity index 92% rename from src/test/java/seedu/address/model/person/UniquePersonListTest.java rename to src/test/java/seedu/notor/model/person/UniquePersonListTest.java index edb3da7959a..527a056a231 100644 --- a/src/test/java/seedu/address/model/person/UniquePersonListTest.java +++ b/src/test/java/seedu/notor/model/person/UniquePersonListTest.java @@ -1,12 +1,12 @@ -package seedu.address.model.person; +package seedu.notor.model.person; 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_TAG_HUSBAND; -import static seedu.address.testutil.Assert.assertThrows; -import static seedu.address.testutil.TypicalPersons.ALICE; -import static seedu.address.testutil.TypicalPersons.BOB; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND; +import static seedu.notor.testutil.Assert.assertThrows; +import static seedu.notor.testutil.TypicalPersons.ALICE; +import static seedu.notor.testutil.TypicalPersons.BOB; import java.util.Arrays; import java.util.Collections; @@ -14,10 +14,10 @@ import org.junit.jupiter.api.Test; -import seedu.address.model.exceptions.DuplicateItemException; -import seedu.address.model.exceptions.ItemNotFoundException; -import seedu.address.model.util.UniqueList; -import seedu.address.testutil.PersonBuilder; +import seedu.notor.model.exceptions.DuplicateItemException; +import seedu.notor.model.exceptions.ItemNotFoundException; +import seedu.notor.model.util.UniqueList; +import seedu.notor.testutil.PersonBuilder; public class UniquePersonListTest { diff --git a/src/test/java/seedu/address/model/tag/TagTest.java b/src/test/java/seedu/notor/model/tag/TagTest.java similarity index 86% rename from src/test/java/seedu/address/model/tag/TagTest.java rename to src/test/java/seedu/notor/model/tag/TagTest.java index 64d07d79ee2..d8705389f7a 100644 --- a/src/test/java/seedu/address/model/tag/TagTest.java +++ b/src/test/java/seedu/notor/model/tag/TagTest.java @@ -1,6 +1,6 @@ -package seedu.address.model.tag; +package seedu.notor.model.tag; -import static seedu.address.testutil.Assert.assertThrows; +import static seedu.notor.testutil.Assert.assertThrows; import org.junit.jupiter.api.Test; diff --git a/src/test/java/seedu/address/storage/JsonAdaptedPersonTest.java b/src/test/java/seedu/notor/storage/JsonAdaptedPersonTest.java similarity index 92% rename from src/test/java/seedu/address/storage/JsonAdaptedPersonTest.java rename to src/test/java/seedu/notor/storage/JsonAdaptedPersonTest.java index 5bbbf66da63..f62b223cc59 100644 --- a/src/test/java/seedu/address/storage/JsonAdaptedPersonTest.java +++ b/src/test/java/seedu/notor/storage/JsonAdaptedPersonTest.java @@ -1,9 +1,9 @@ -package seedu.address.storage; +package seedu.notor.storage; import static org.junit.jupiter.api.Assertions.assertEquals; -import static seedu.address.storage.JsonAdaptedPerson.MISSING_FIELD_MESSAGE_FORMAT; -import static seedu.address.testutil.Assert.assertThrows; -import static seedu.address.testutil.TypicalPersons.BENSON; +import static seedu.notor.storage.JsonAdaptedPerson.MISSING_FIELD_MESSAGE_FORMAT; +import static seedu.notor.testutil.Assert.assertThrows; +import static seedu.notor.testutil.TypicalPersons.BENSON; import java.util.ArrayList; import java.util.List; @@ -11,10 +11,10 @@ import org.junit.jupiter.api.Test; -import seedu.address.commons.exceptions.IllegalValueException; -import seedu.address.model.person.Email; -import seedu.address.model.person.Name; -import seedu.address.model.person.Phone; +import seedu.notor.commons.exceptions.IllegalValueException; +import seedu.notor.model.person.Email; +import seedu.notor.model.person.Name; +import seedu.notor.model.person.Phone; public class JsonAdaptedPersonTest { private static final String INVALID_NAME = "R@chel"; diff --git a/src/test/java/seedu/address/storage/JsonAddressBookStorageTest.java b/src/test/java/seedu/notor/storage/JsonAddressBookStorageTest.java similarity index 89% rename from src/test/java/seedu/address/storage/JsonAddressBookStorageTest.java rename to src/test/java/seedu/notor/storage/JsonAddressBookStorageTest.java index ac3c3af9566..4b866db04fc 100644 --- a/src/test/java/seedu/address/storage/JsonAddressBookStorageTest.java +++ b/src/test/java/seedu/notor/storage/JsonAddressBookStorageTest.java @@ -1,12 +1,12 @@ -package seedu.address.storage; +package seedu.notor.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.TypicalPersons.ALICE; -import static seedu.address.testutil.TypicalPersons.HOON; -import static seedu.address.testutil.TypicalPersons.IDA; -import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook; +import static seedu.notor.testutil.Assert.assertThrows; +import static seedu.notor.testutil.TypicalPersons.ALICE; +import static seedu.notor.testutil.TypicalPersons.HOON; +import static seedu.notor.testutil.TypicalPersons.IDA; +import static seedu.notor.testutil.TypicalPersons.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.notor.commons.exceptions.DataConversionException; +import seedu.notor.model.AddressBook; +import seedu.notor.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/notor/storage/JsonSerializableAddressBookTest.java similarity index 87% rename from src/test/java/seedu/address/storage/JsonSerializableAddressBookTest.java rename to src/test/java/seedu/notor/storage/JsonSerializableAddressBookTest.java index 188c9058d20..3dd200b0488 100644 --- a/src/test/java/seedu/address/storage/JsonSerializableAddressBookTest.java +++ b/src/test/java/seedu/notor/storage/JsonSerializableAddressBookTest.java @@ -1,17 +1,17 @@ -package seedu.address.storage; +package seedu.notor.storage; import static org.junit.jupiter.api.Assertions.assertEquals; -import static seedu.address.testutil.Assert.assertThrows; +import static seedu.notor.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.TypicalPersons; +import seedu.notor.commons.exceptions.IllegalValueException; +import seedu.notor.commons.util.JsonUtil; +import seedu.notor.model.AddressBook; +import seedu.notor.testutil.TypicalPersons; public class JsonSerializableAddressBookTest { diff --git a/src/test/java/seedu/address/storage/JsonUserPrefsStorageTest.java b/src/test/java/seedu/notor/storage/JsonUserPrefsStorageTest.java similarity index 94% rename from src/test/java/seedu/address/storage/JsonUserPrefsStorageTest.java rename to src/test/java/seedu/notor/storage/JsonUserPrefsStorageTest.java index 57a63f1a5de..e962d750d11 100644 --- a/src/test/java/seedu/address/storage/JsonUserPrefsStorageTest.java +++ b/src/test/java/seedu/notor/storage/JsonUserPrefsStorageTest.java @@ -1,8 +1,8 @@ -package seedu.address.storage; +package seedu.notor.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.notor.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.notor.commons.core.GuiSettings; +import seedu.notor.commons.exceptions.DataConversionException; +import seedu.notor.model.UserPrefs; public class JsonUserPrefsStorageTest { diff --git a/src/test/java/seedu/address/storage/StorageManagerTest.java b/src/test/java/seedu/notor/storage/StorageManagerTest.java similarity index 88% rename from src/test/java/seedu/address/storage/StorageManagerTest.java rename to src/test/java/seedu/notor/storage/StorageManagerTest.java index 99a16548970..84461cb7aeb 100644 --- a/src/test/java/seedu/address/storage/StorageManagerTest.java +++ b/src/test/java/seedu/notor/storage/StorageManagerTest.java @@ -1,8 +1,8 @@ -package seedu.address.storage; +package seedu.notor.storage; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; -import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook; +import static seedu.notor.testutil.TypicalPersons.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.notor.commons.core.GuiSettings; +import seedu.notor.model.AddressBook; +import seedu.notor.model.ReadOnlyAddressBook; +import seedu.notor.model.UserPrefs; public class StorageManagerTest { diff --git a/src/test/java/seedu/address/testutil/AddressBookBuilder.java b/src/test/java/seedu/notor/testutil/AddressBookBuilder.java similarity index 86% rename from src/test/java/seedu/address/testutil/AddressBookBuilder.java rename to src/test/java/seedu/notor/testutil/AddressBookBuilder.java index 08fd74654af..081ac6889e5 100644 --- a/src/test/java/seedu/address/testutil/AddressBookBuilder.java +++ b/src/test/java/seedu/notor/testutil/AddressBookBuilder.java @@ -1,7 +1,7 @@ -package seedu.address.testutil; +package seedu.notor.testutil; -import seedu.address.model.AddressBook; -import seedu.address.model.person.Person; +import seedu.notor.model.AddressBook; +import seedu.notor.model.person.Person; /** * A utility class to help with building Addressbook objects. diff --git a/src/test/java/seedu/address/testutil/Assert.java b/src/test/java/seedu/notor/testutil/Assert.java similarity index 97% rename from src/test/java/seedu/address/testutil/Assert.java rename to src/test/java/seedu/notor/testutil/Assert.java index 9863093bd6e..9bfffe327bf 100644 --- a/src/test/java/seedu/address/testutil/Assert.java +++ b/src/test/java/seedu/notor/testutil/Assert.java @@ -1,4 +1,4 @@ -package seedu.address.testutil; +package seedu.notor.testutil; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.function.Executable; diff --git a/src/test/java/seedu/address/testutil/PersonBuilder.java b/src/test/java/seedu/notor/testutil/PersonBuilder.java similarity index 91% rename from src/test/java/seedu/address/testutil/PersonBuilder.java rename to src/test/java/seedu/notor/testutil/PersonBuilder.java index 4980264ad45..0adfae8411f 100644 --- a/src/test/java/seedu/address/testutil/PersonBuilder.java +++ b/src/test/java/seedu/notor/testutil/PersonBuilder.java @@ -1,16 +1,16 @@ -package seedu.address.testutil; +package seedu.notor.testutil; import java.util.Arrays; import java.util.HashSet; import java.util.Set; -import seedu.address.model.person.Email; -import seedu.address.model.person.Name; -import seedu.address.model.person.Note; -import seedu.address.model.person.Person; -import seedu.address.model.person.Phone; -import seedu.address.model.tag.Tag; -import seedu.address.model.util.SampleDataUtil; +import seedu.notor.model.person.Email; +import seedu.notor.model.person.Name; +import seedu.notor.model.person.Note; +import seedu.notor.model.person.Person; +import seedu.notor.model.person.Phone; +import seedu.notor.model.tag.Tag; +import seedu.notor.model.util.SampleDataUtil; /** * A utility class to help with building Person objects. diff --git a/src/test/java/seedu/address/testutil/PersonEditDescriptorBuilder.java b/src/test/java/seedu/notor/testutil/PersonEditDescriptorBuilder.java similarity index 87% rename from src/test/java/seedu/address/testutil/PersonEditDescriptorBuilder.java rename to src/test/java/seedu/notor/testutil/PersonEditDescriptorBuilder.java index d75ddb8e4a9..b8d450b081e 100644 --- a/src/test/java/seedu/address/testutil/PersonEditDescriptorBuilder.java +++ b/src/test/java/seedu/notor/testutil/PersonEditDescriptorBuilder.java @@ -1,15 +1,15 @@ -package seedu.address.testutil; +package seedu.notor.testutil; import java.util.Set; import java.util.stream.Collectors; import java.util.stream.Stream; -import seedu.address.logic.executors.person.PersonEditExecutor.PersonEditDescriptor; -import seedu.address.model.person.Email; -import seedu.address.model.person.Name; -import seedu.address.model.person.Person; -import seedu.address.model.person.Phone; -import seedu.address.model.tag.Tag; +import seedu.notor.logic.executors.person.PersonEditExecutor.PersonEditDescriptor; +import seedu.notor.model.person.Email; +import seedu.notor.model.person.Name; +import seedu.notor.model.person.Person; +import seedu.notor.model.person.Phone; +import seedu.notor.model.tag.Tag; /** * A utility class to help with building EditPersonDescriptor objects. diff --git a/src/test/java/seedu/address/testutil/PersonUtil.java b/src/test/java/seedu/notor/testutil/PersonUtil.java similarity index 79% rename from src/test/java/seedu/address/testutil/PersonUtil.java rename to src/test/java/seedu/notor/testutil/PersonUtil.java index b5dfb02c0d1..5ef321bf9f2 100644 --- a/src/test/java/seedu/address/testutil/PersonUtil.java +++ b/src/test/java/seedu/notor/testutil/PersonUtil.java @@ -1,16 +1,16 @@ -package seedu.address.testutil; +package seedu.notor.testutil; -import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL; -import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME; -import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE; -import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_EMAIL; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_NAME; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_PHONE; +import static seedu.notor.logic.parser.CliSyntax.PREFIX_TAG; import java.util.Set; -import seedu.address.logic.commands.person.PersonCreateCommand; -import seedu.address.logic.executors.person.PersonEditExecutor; -import seedu.address.model.person.Person; -import seedu.address.model.tag.Tag; +import seedu.notor.logic.commands.person.PersonCreateCommand; +import seedu.notor.logic.executors.person.PersonEditExecutor; +import seedu.notor.model.person.Person; +import seedu.notor.model.tag.Tag; /** * A utility class for Person. diff --git a/src/test/java/seedu/address/testutil/SerializableTestClass.java b/src/test/java/seedu/notor/testutil/SerializableTestClass.java similarity index 98% rename from src/test/java/seedu/address/testutil/SerializableTestClass.java rename to src/test/java/seedu/notor/testutil/SerializableTestClass.java index f5a66340489..3bb915c31b2 100644 --- a/src/test/java/seedu/address/testutil/SerializableTestClass.java +++ b/src/test/java/seedu/notor/testutil/SerializableTestClass.java @@ -1,4 +1,4 @@ -package seedu.address.testutil; +package seedu.notor.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/notor/testutil/TestUtil.java similarity index 90% rename from src/test/java/seedu/address/testutil/TestUtil.java rename to src/test/java/seedu/notor/testutil/TestUtil.java index 896d103eb0b..c09644ae556 100644 --- a/src/test/java/seedu/address/testutil/TestUtil.java +++ b/src/test/java/seedu/notor/testutil/TestUtil.java @@ -1,13 +1,13 @@ -package seedu.address.testutil; +package seedu.notor.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.person.Person; +import seedu.notor.commons.core.index.Index; +import seedu.notor.model.Model; +import seedu.notor.model.person.Person; /** * A utility class for test cases. diff --git a/src/test/java/seedu/address/testutil/TypicalGroups.java b/src/test/java/seedu/notor/testutil/TypicalGroups.java similarity index 86% rename from src/test/java/seedu/address/testutil/TypicalGroups.java rename to src/test/java/seedu/notor/testutil/TypicalGroups.java index 2b89c8294fb..69d892f7eb3 100644 --- a/src/test/java/seedu/address/testutil/TypicalGroups.java +++ b/src/test/java/seedu/notor/testutil/TypicalGroups.java @@ -1,9 +1,9 @@ -package seedu.address.testutil; +package seedu.notor.testutil; import java.util.ArrayList; import java.util.List; -import seedu.address.model.group.SuperGroup; +import seedu.notor.model.group.SuperGroup; public class TypicalGroups { public static final SuperGroup ORBITAL = new SuperGroup("Orbital"); diff --git a/src/test/java/seedu/address/testutil/TypicalIndexes.java b/src/test/java/seedu/notor/testutil/TypicalIndexes.java similarity index 81% rename from src/test/java/seedu/address/testutil/TypicalIndexes.java rename to src/test/java/seedu/notor/testutil/TypicalIndexes.java index 1e613937657..5c6fa12967c 100644 --- a/src/test/java/seedu/address/testutil/TypicalIndexes.java +++ b/src/test/java/seedu/notor/testutil/TypicalIndexes.java @@ -1,6 +1,6 @@ -package seedu.address.testutil; +package seedu.notor.testutil; -import seedu.address.commons.core.index.Index; +import seedu.notor.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/testutil/TypicalPersons.java b/src/test/java/seedu/notor/testutil/TypicalPersons.java similarity index 81% rename from src/test/java/seedu/address/testutil/TypicalPersons.java rename to src/test/java/seedu/notor/testutil/TypicalPersons.java index 870aac7bcb2..6e4d87aa191 100644 --- a/src/test/java/seedu/address/testutil/TypicalPersons.java +++ b/src/test/java/seedu/notor/testutil/TypicalPersons.java @@ -1,22 +1,22 @@ -package seedu.address.testutil; +package seedu.notor.testutil; -import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY; -import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB; -import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY; -import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB; -import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY; -import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB; -import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND; -import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_EMAIL_AMY; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_EMAIL_BOB; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_NAME_AMY; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_NAME_BOB; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_PHONE_AMY; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_PHONE_BOB; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_TAG_FRIEND; +import static seedu.notor.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import seedu.address.model.AddressBook; -import seedu.address.model.group.SubGroup; -import seedu.address.model.group.SuperGroup; -import seedu.address.model.person.Person; +import seedu.notor.model.AddressBook; +import seedu.notor.model.group.SubGroup; +import seedu.notor.model.group.SuperGroup; +import seedu.notor.model.person.Person; /** * A utility class containing a list of {@code Person} objects to be used in tests. diff --git a/src/test/java/seedu/address/testutil/TypicalSubGroups.java b/src/test/java/seedu/notor/testutil/TypicalSubGroups.java similarity index 82% rename from src/test/java/seedu/address/testutil/TypicalSubGroups.java rename to src/test/java/seedu/notor/testutil/TypicalSubGroups.java index 731240fa9af..08f7d2d9182 100644 --- a/src/test/java/seedu/address/testutil/TypicalSubGroups.java +++ b/src/test/java/seedu/notor/testutil/TypicalSubGroups.java @@ -1,9 +1,9 @@ -package seedu.address.testutil; +package seedu.notor.testutil; import java.util.ArrayList; import java.util.List; -import seedu.address.model.group.SubGroup; +import seedu.notor.model.group.SubGroup; public class TypicalSubGroups { public static final SubGroup ORBITAL_GROUP1 = new SubGroup("Group1", "Orbital"); diff --git a/src/test/java/seedu/address/ui/TestFxmlObject.java b/src/test/java/seedu/notor/ui/TestFxmlObject.java similarity index 96% rename from src/test/java/seedu/address/ui/TestFxmlObject.java rename to src/test/java/seedu/notor/ui/TestFxmlObject.java index 34685f7e6c4..a7227eb6ec6 100644 --- a/src/test/java/seedu/address/ui/TestFxmlObject.java +++ b/src/test/java/seedu/notor/ui/TestFxmlObject.java @@ -1,4 +1,4 @@ -package seedu.address.ui; +package seedu.notor.ui; import javafx.beans.DefaultProperty; diff --git a/src/test/java/seedu/address/ui/UiPartTest.java b/src/test/java/seedu/notor/ui/UiPartTest.java similarity index 97% rename from src/test/java/seedu/address/ui/UiPartTest.java rename to src/test/java/seedu/notor/ui/UiPartTest.java index 206f0507b36..315bf34a3a0 100644 --- a/src/test/java/seedu/address/ui/UiPartTest.java +++ b/src/test/java/seedu/notor/ui/UiPartTest.java @@ -1,8 +1,8 @@ -package seedu.address.ui; +package seedu.notor.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.notor.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.notor.MainApp; public class UiPartTest { diff --git a/src/test/resources/view/UiPartTest/validFile.fxml b/src/test/resources/view/UiPartTest/validFile.fxml index bab836af0db..98327db14ed 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 08deefc5583..3e1070458cd 100644 --- a/src/test/resources/view/UiPartTest/validFileWithFxRoot.fxml +++ b/src/test/resources/view/UiPartTest/validFileWithFxRoot.fxml @@ -1,7 +1,7 @@ - - + Hello World! From 962704d65b162f8534dbcf0dcc8f2b58da22bf9a Mon Sep 17 00:00:00 2001 From: Hannah Chia Date: Wed, 13 Oct 2021 16:11:38 +0800 Subject: [PATCH 3/6] Fix: Control Key on Mac Shortcut for Taking Notes --- src/main/java/seedu/notor/ui/NoteWindow.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/seedu/notor/ui/NoteWindow.java b/src/main/java/seedu/notor/ui/NoteWindow.java index 5ffc94747b4..444bfc07940 100644 --- a/src/main/java/seedu/notor/ui/NoteWindow.java +++ b/src/main/java/seedu/notor/ui/NoteWindow.java @@ -30,7 +30,7 @@ public class NoteWindow extends UiPart { private static final int CENTER_X = (SCREEN_X - WIDTH) / 2; private static final int CENTER_Y = (SCREEN_Y - HEIGHT) / 2; private static final String FXML = "NoteWindow.fxml"; - private static final Modifier CTRL = KeyCombination.SHORTCUT_DOWN; + private static final Modifier CTRL = KeyCombination.CONTROL_DOWN; private static final KeyCombination SAVE_KEY = new KeyCodeCombination(KeyCode.S, CTRL); private static final KeyCombination EXIT_AND_SAVE_KEY = new KeyCodeCombination(KeyCode.Q, CTRL); private static final KeyCombination EXIT_KEY = new KeyCodeCombination(KeyCode.W, CTRL); From ae5a650783013cfab3ac08a0d1bdaeaf5767fcc8 Mon Sep 17 00:00:00 2001 From: Hannah Chia Date: Wed, 13 Oct 2021 20:52:12 +0800 Subject: [PATCH 4/6] Revert "Fix: Control Key on Mac Shortcut for Taking Notes" This reverts commit 962704d65b162f8534dbcf0dcc8f2b58da22bf9a. --- src/main/java/seedu/notor/ui/NoteWindow.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/seedu/notor/ui/NoteWindow.java b/src/main/java/seedu/notor/ui/NoteWindow.java index 444bfc07940..5ffc94747b4 100644 --- a/src/main/java/seedu/notor/ui/NoteWindow.java +++ b/src/main/java/seedu/notor/ui/NoteWindow.java @@ -30,7 +30,7 @@ public class NoteWindow extends UiPart { private static final int CENTER_X = (SCREEN_X - WIDTH) / 2; private static final int CENTER_Y = (SCREEN_Y - HEIGHT) / 2; private static final String FXML = "NoteWindow.fxml"; - private static final Modifier CTRL = KeyCombination.CONTROL_DOWN; + private static final Modifier CTRL = KeyCombination.SHORTCUT_DOWN; private static final KeyCombination SAVE_KEY = new KeyCodeCombination(KeyCode.S, CTRL); private static final KeyCombination EXIT_AND_SAVE_KEY = new KeyCodeCombination(KeyCode.Q, CTRL); private static final KeyCombination EXIT_KEY = new KeyCodeCombination(KeyCode.W, CTRL); From 0c01b64343e0bfc56218777b729cca702b47e940 Mon Sep 17 00:00:00 2001 From: Hannah Chia Date: Thu, 14 Oct 2021 15:04:36 +0800 Subject: [PATCH 5/6] Refactor: Rename classes + fix tests --- .../diagrams/ArchitectureSequenceDiagram.puml | 2 +- src/main/java/seedu/notor/MainApp.java | 30 ++--- .../seedu/notor/commons/core/LogsCenter.java | 2 +- src/main/java/seedu/notor/logic/Logic.java | 12 +- .../java/seedu/notor/logic/LogicManager.java | 22 ++-- .../notor/logic/commands/ClearCommand.java | 4 +- .../commands/person/PersonEditCommand.java | 2 +- ...ddressBookParser.java => NotorParser.java} | 2 +- src/main/java/seedu/notor/model/Model.java | 25 ++-- .../java/seedu/notor/model/ModelManager.java | 64 +++++----- .../model/{AddressBook.java => Notor.java} | 26 ++--- ...nlyAddressBook.java => ReadOnlyNotor.java} | 5 +- .../seedu/notor/model/ReadOnlyUserPrefs.java | 2 +- .../java/seedu/notor/model/UserPrefs.java | 20 ++-- .../notor/model/util/SampleDataUtil.java | 10 +- .../notor/storage/AddressBookStorage.java | 47 -------- ...BookStorage.java => JsonNotorStorage.java} | 40 +++---- ...ssBook.java => JsonSerializableNotor.java} | 44 +++---- .../seedu/notor/storage/NotorStorage.java | 48 ++++++++ .../java/seedu/notor/storage/Storage.java | 10 +- .../seedu/notor/storage/StorageManager.java | 34 +++--- src/main/java/seedu/notor/ui/HelpWindow.java | 2 +- src/main/java/seedu/notor/ui/MainWindow.java | 2 +- .../invalidAndValidPersonNotor.json} | 0 .../invalidPersonNotor.json} | 0 .../notJsonFormatNotor.json} | 0 .../duplicatePersonNotor.json} | 0 .../invalidPersonNotor.json} | 0 .../typicalPersonsNotor.json} | 27 +++-- .../ExtraValuesUserPref.json | 2 +- .../TypicalUserPref.json | 2 +- .../seedu/notor/logic/LogicManagerTest.java | 26 ++--- .../logic/commands/ClearCommandTest.java | 14 +-- .../notor/logic/commands/CommandTestUtil.java | 10 +- .../notor/logic/commands/FindCommandTest.java | 6 +- .../notor/logic/commands/ListCommandTest.java | 6 +- .../PersonCreateCommandIntegrationTest.java | 8 +- .../commands/PersonCreateCommandTest.java | 16 +-- .../commands/PersonDeleteCommandTest.java | 12 +- .../logic/commands/PersonEditCommandTest.java | 24 ++-- ...okParserTest.java => NotorParserTest.java} | 4 +- .../seedu/notor/model/ModelManagerTest.java | 40 +++---- .../{AddressBookTest.java => NotorTest.java} | 44 +++---- .../java/seedu/notor/model/UserPrefsTest.java | 4 +- .../storage/JsonAddressBookStorageTest.java | 110 ------------------ .../notor/storage/JsonNotorStorageTest.java | 110 ++++++++++++++++++ ...st.java => JsonSerializableNotorTest.java} | 32 ++--- .../storage/JsonUserPrefsStorageTest.java | 2 +- .../notor/storage/StorageManagerTest.java | 28 ++--- .../notor/testutil/AddressBookBuilder.java | 34 ------ .../seedu/notor/testutil/NotorBuilder.java | 34 ++++++ .../seedu/notor/testutil/TypicalPersons.java | 8 +- 52 files changed, 536 insertions(+), 522 deletions(-) rename src/main/java/seedu/notor/logic/parser/{AddressBookParser.java => NotorParser.java} (99%) rename src/main/java/seedu/notor/model/{AddressBook.java => Notor.java} (87%) rename src/main/java/seedu/notor/model/{ReadOnlyAddressBook.java => ReadOnlyNotor.java} (86%) delete mode 100644 src/main/java/seedu/notor/storage/AddressBookStorage.java rename src/main/java/seedu/notor/storage/{JsonAddressBookStorage.java => JsonNotorStorage.java} (50%) rename src/main/java/seedu/notor/storage/{JsonSerializableAddressBook.java => JsonSerializableNotor.java} (65%) create mode 100644 src/main/java/seedu/notor/storage/NotorStorage.java rename src/test/data/{JsonAddressBookStorageTest/invalidAndValidPersonAddressBook.json => JsonNotorStorageTest/invalidAndValidPersonNotor.json} (100%) rename src/test/data/{JsonAddressBookStorageTest/invalidPersonAddressBook.json => JsonNotorStorageTest/invalidPersonNotor.json} (100%) rename src/test/data/{JsonAddressBookStorageTest/notJsonFormatAddressBook.json => JsonNotorStorageTest/notJsonFormatNotor.json} (100%) rename src/test/data/{JsonSerializableAddressBookTest/duplicatePersonAddressBook.json => JsonSerializableNotorTest/duplicatePersonNotor.json} (100%) rename src/test/data/{JsonSerializableAddressBookTest/invalidPersonAddressBook.json => JsonSerializableNotorTest/invalidPersonNotor.json} (100%) rename src/test/data/{JsonSerializableAddressBookTest/typicalPersonsAddressBook.json => JsonSerializableNotorTest/typicalPersonsNotor.json} (72%) rename src/test/java/seedu/notor/logic/parser/{AddressBookParserTest.java => NotorParserTest.java} (97%) rename src/test/java/seedu/notor/model/{AddressBookTest.java => NotorTest.java} (58%) delete mode 100644 src/test/java/seedu/notor/storage/JsonAddressBookStorageTest.java create mode 100644 src/test/java/seedu/notor/storage/JsonNotorStorageTest.java rename src/test/java/seedu/notor/storage/{JsonSerializableAddressBookTest.java => JsonSerializableNotorTest.java} (53%) delete mode 100644 src/test/java/seedu/notor/testutil/AddressBookBuilder.java create mode 100644 src/test/java/seedu/notor/testutil/NotorBuilder.java diff --git a/docs/diagrams/ArchitectureSequenceDiagram.puml b/docs/diagrams/ArchitectureSequenceDiagram.puml index ef81d18c337..3df0ce5e8a0 100644 --- a/docs/diagrams/ArchitectureSequenceDiagram.puml +++ b/docs/diagrams/ArchitectureSequenceDiagram.puml @@ -19,7 +19,7 @@ activate model MODEL_COLOR model -[MODEL_COLOR]-> logic deactivate model -logic -[LOGIC_COLOR]> storage : saveAddressBook(addressBook) +logic -[LOGIC_COLOR]> storage : saveAddressBook(notor) activate storage STORAGE_COLOR storage -[STORAGE_COLOR]> storage : Save to file diff --git a/src/main/java/seedu/notor/MainApp.java b/src/main/java/seedu/notor/MainApp.java index aa357b1307e..b02c2472b33 100644 --- a/src/main/java/seedu/notor/MainApp.java +++ b/src/main/java/seedu/notor/MainApp.java @@ -17,15 +17,15 @@ import seedu.notor.logic.Logic; import seedu.notor.logic.LogicManager; import seedu.notor.logic.executors.Executor; -import seedu.notor.model.AddressBook; +import seedu.notor.model.Notor; import seedu.notor.model.Model; import seedu.notor.model.ModelManager; -import seedu.notor.model.ReadOnlyAddressBook; +import seedu.notor.model.ReadOnlyNotor; import seedu.notor.model.ReadOnlyUserPrefs; import seedu.notor.model.UserPrefs; import seedu.notor.model.util.SampleDataUtil; -import seedu.notor.storage.AddressBookStorage; -import seedu.notor.storage.JsonAddressBookStorage; +import seedu.notor.storage.JsonNotorStorage; +import seedu.notor.storage.NotorStorage; import seedu.notor.storage.JsonUserPrefsStorage; import seedu.notor.storage.Storage; import seedu.notor.storage.StorageManager; @@ -61,8 +61,8 @@ public void init() throws Exception { UserPrefsStorage userPrefsStorage = new JsonUserPrefsStorage(config.getUserPrefsFilePath()); UserPrefs userPrefs = initPrefs(userPrefsStorage); - AddressBookStorage addressBookStorage = new JsonAddressBookStorage(userPrefs.getAddressBookFilePath()); - storage = new StorageManager(addressBookStorage, userPrefsStorage); + NotorStorage notorStorage = new JsonNotorStorage(userPrefs.getNotorFilePath()); + storage = new StorageManager(notorStorage, userPrefsStorage); initLogging(config); @@ -77,24 +77,24 @@ 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. + * The data from the sample Notor will be used instead if {@code storage}'s notor is not found, + * or an empty Notor will be used instead if errors occur when reading {@code storage}'s notor. */ private Model initModelManager(Storage storage, ReadOnlyUserPrefs userPrefs) { - Optional addressBookOptional; - ReadOnlyAddressBook initialData; + Optional notorOptional; + ReadOnlyNotor initialData; try { - addressBookOptional = storage.readAddressBook(); - if (addressBookOptional.isEmpty()) { + notorOptional = storage.readNotor(); + if (notorOptional.isEmpty()) { logger.info("Data file not found. Will be starting with a sample Notor"); } - initialData = addressBookOptional.orElseGet(SampleDataUtil::getSampleAddressBook); + initialData = notorOptional.orElseGet(SampleDataUtil::getSampleNotor); } catch (DataConversionException e) { logger.warning("Data file not in the correct format. Will be starting with an empty Notor"); - initialData = new AddressBook(); + initialData = new Notor(); } catch (IOException e) { logger.warning("Problem while reading from the file. Will be starting with an empty Notor"); - initialData = new AddressBook(); + initialData = new Notor(); } return new ModelManager(initialData, userPrefs); diff --git a/src/main/java/seedu/notor/commons/core/LogsCenter.java b/src/main/java/seedu/notor/commons/core/LogsCenter.java index 32b5a8aa5b7..3cdc7854a7f 100644 --- a/src/main/java/seedu/notor/commons/core/LogsCenter.java +++ b/src/main/java/seedu/notor/commons/core/LogsCenter.java @@ -18,7 +18,7 @@ public class LogsCenter { private static final int MAX_FILE_COUNT = 5; private static final int MAX_FILE_SIZE_IN_BYTES = (int) (Math.pow(2, 20) * 5); // 5MB - private static final String LOG_FILE = "addressbook.log"; + private static final String LOG_FILE = "notor.log"; private static Level currentLogLevel = Level.INFO; private static final Logger logger = LogsCenter.getLogger(LogsCenter.class); private static FileHandler fileHandler; diff --git a/src/main/java/seedu/notor/logic/Logic.java b/src/main/java/seedu/notor/logic/Logic.java index 2fdeae7bc33..ac2b7808459 100644 --- a/src/main/java/seedu/notor/logic/Logic.java +++ b/src/main/java/seedu/notor/logic/Logic.java @@ -8,7 +8,7 @@ import seedu.notor.logic.commands.exceptions.CommandException; import seedu.notor.logic.executors.exceptions.ExecuteException; import seedu.notor.logic.parser.exceptions.ParseException; -import seedu.notor.model.ReadOnlyAddressBook; +import seedu.notor.model.ReadOnlyNotor; import seedu.notor.model.person.Person; /** @@ -35,11 +35,11 @@ public interface Logic { */ void executeSaveNote(Person person, Person editedPerson) throws CommandException; /** - * Returns the AddressBook. + * Returns the Notor. * - * @see seedu.notor.model.Model#getAddressBook() + * @see seedu.notor.model.Model#getNotor() */ - ReadOnlyAddressBook getAddressBook(); + ReadOnlyNotor getNotor(); /** * Returns an unmodifiable view of the filtered list of persons @@ -47,9 +47,9 @@ public interface Logic { ObservableList getFilteredPersonList(); /** - * Returns the user prefs' address book file path. + * Returns the user prefs' Notor file path. */ - Path getAddressBookFilePath(); + Path getNotorFilePath(); /** * Returns the user prefs' GUI settings. diff --git a/src/main/java/seedu/notor/logic/LogicManager.java b/src/main/java/seedu/notor/logic/LogicManager.java index 42445f5a143..f582fbdeae8 100644 --- a/src/main/java/seedu/notor/logic/LogicManager.java +++ b/src/main/java/seedu/notor/logic/LogicManager.java @@ -11,10 +11,10 @@ import seedu.notor.logic.commands.CommandResult; import seedu.notor.logic.commands.exceptions.CommandException; import seedu.notor.logic.executors.exceptions.ExecuteException; -import seedu.notor.logic.parser.AddressBookParser; +import seedu.notor.logic.parser.NotorParser; import seedu.notor.logic.parser.exceptions.ParseException; import seedu.notor.model.Model; -import seedu.notor.model.ReadOnlyAddressBook; +import seedu.notor.model.ReadOnlyNotor; import seedu.notor.model.person.Person; import seedu.notor.storage.Storage; @@ -27,7 +27,7 @@ public class LogicManager implements Logic { private final Model model; private final Storage storage; - private final AddressBookParser addressBookParser; + private final NotorParser notorParser; /** * Constructs a {@code LogicManager} with the given {@code Model} and {@code Storage}. @@ -35,7 +35,7 @@ public class LogicManager implements Logic { public LogicManager(Model model, Storage storage) { this.model = model; this.storage = storage; - addressBookParser = new AddressBookParser(); + notorParser = new NotorParser(); } @Override @@ -43,11 +43,11 @@ public CommandResult execute(String commandText) throws CommandException, ParseE logger.info("----------------[USER COMMAND][" + commandText + "]"); CommandResult commandResult; - Command command = addressBookParser.parseCommand(commandText); + Command command = notorParser.parseCommand(commandText); commandResult = command.execute(model); try { - storage.saveAddressBook(model.getAddressBook()); + storage.saveNotor(model.getNotor()); } catch (IOException ioe) { throw new CommandException(FILE_OPS_ERROR_MESSAGE + ioe, ioe); } @@ -64,7 +64,7 @@ public CommandResult execute(String commandText) throws CommandException, ParseE public void executeSaveNote(Person person, Person editedPerson) throws CommandException { model.setPerson(person, editedPerson); try { - storage.saveAddressBook(model.getAddressBook()); + storage.saveNotor(model.getNotor()); } catch (IOException ioe) { throw new CommandException(FILE_OPS_ERROR_MESSAGE + ioe, ioe); } @@ -72,8 +72,8 @@ public void executeSaveNote(Person person, Person editedPerson) throws CommandEx @Override - public ReadOnlyAddressBook getAddressBook() { - return model.getAddressBook(); + public ReadOnlyNotor getNotor() { + return model.getNotor(); } @Override @@ -82,8 +82,8 @@ public ObservableList getFilteredPersonList() { } @Override - public Path getAddressBookFilePath() { - return model.getAddressBookFilePath(); + public Path getNotorFilePath() { + return model.getNotorFilePath(); } @Override diff --git a/src/main/java/seedu/notor/logic/commands/ClearCommand.java b/src/main/java/seedu/notor/logic/commands/ClearCommand.java index 9bda464f420..d5e8ba241ce 100644 --- a/src/main/java/seedu/notor/logic/commands/ClearCommand.java +++ b/src/main/java/seedu/notor/logic/commands/ClearCommand.java @@ -2,7 +2,7 @@ import static java.util.Objects.requireNonNull; -import seedu.notor.model.AddressBook; +import seedu.notor.model.Notor; import seedu.notor.model.Model; /** @@ -15,7 +15,7 @@ public class ClearCommand implements Command { @Override public CommandResult execute(Model model) { requireNonNull(model); - model.setAddressBook(new AddressBook()); + model.setNotor(new Notor()); return new CommandResult(MESSAGE_SUCCESS); } } diff --git a/src/main/java/seedu/notor/logic/commands/person/PersonEditCommand.java b/src/main/java/seedu/notor/logic/commands/person/PersonEditCommand.java index 2d1b25d51f9..68c40b2c5a6 100644 --- a/src/main/java/seedu/notor/logic/commands/person/PersonEditCommand.java +++ b/src/main/java/seedu/notor/logic/commands/person/PersonEditCommand.java @@ -13,7 +13,7 @@ import seedu.notor.logic.executors.person.PersonExecutor; /** - * Edits the details of an existing person in the address book. + * Edits the details of an existing person in the notor. */ public class PersonEditCommand extends PersonCommand { diff --git a/src/main/java/seedu/notor/logic/parser/AddressBookParser.java b/src/main/java/seedu/notor/logic/parser/NotorParser.java similarity index 99% rename from src/main/java/seedu/notor/logic/parser/AddressBookParser.java rename to src/main/java/seedu/notor/logic/parser/NotorParser.java index 2a5bf24830f..68ab115881c 100644 --- a/src/main/java/seedu/notor/logic/parser/AddressBookParser.java +++ b/src/main/java/seedu/notor/logic/parser/NotorParser.java @@ -30,7 +30,7 @@ /** * Parses user input. */ -public class AddressBookParser { +public class NotorParser { /** * Used for initial separation of command word and args. */ diff --git a/src/main/java/seedu/notor/model/Model.java b/src/main/java/seedu/notor/model/Model.java index 717b10a0465..863830ea2cd 100644 --- a/src/main/java/seedu/notor/model/Model.java +++ b/src/main/java/seedu/notor/model/Model.java @@ -20,7 +20,8 @@ public interface Model { // TODO: List // Predicate PREDICATE_SHOW_ALL_GROUPS = unused -> true; - + + //=========== UserPrefs ================================================================================== /** * Replaces user prefs data with the data in {@code userPrefs}. */ @@ -44,25 +45,27 @@ public interface Model { /** * Returns the user prefs' address book file path. */ - Path getAddressBookFilePath(); + Path getNotorFilePath(); /** * Sets the user prefs' address book file path. */ - void setAddressBookFilePath(Path addressBookFilePath); - + void setNotorFilePath(Path notorFilePath); + + //=========== Notor ===================================================================================== + /** - * Replaces address book data with the data in {@code addressBook}. + * Replaces Notor data (of the list) with the data in {@code notor}. */ - void setAddressBook(ReadOnlyAddressBook addressBook); + void setNotor(ReadOnlyNotor notor); /** - * Returns the AddressBook + * Returns the Notor data (lists and the like) */ - ReadOnlyAddressBook getAddressBook(); + ReadOnlyNotor getNotor(); /** - * Returns true if a person with the same identity as {@code person} exists in the address book. + * Returns true if a person with the same identity as {@code person} exists in Notor. */ boolean hasPerson(Person person); @@ -74,7 +77,7 @@ public interface Model { /** * Adds the given person. - * {@code person} must not already exist in the address book. + * {@code person} must not already exist in Notor. */ void createPerson(Person person); @@ -100,6 +103,8 @@ public interface Model { void deleteSubGroup(SubGroup subGroup); + //=========== Filtered Person List Accessors ============================================================= + /** * Replaces the given person {@code target} with {@code editedPerson}. * {@code target} must exist in the address book. diff --git a/src/main/java/seedu/notor/model/ModelManager.java b/src/main/java/seedu/notor/model/ModelManager.java index 32e36fd0aef..8893d0a5a4c 100644 --- a/src/main/java/seedu/notor/model/ModelManager.java +++ b/src/main/java/seedu/notor/model/ModelManager.java @@ -16,31 +16,31 @@ import seedu.notor.model.person.Person; /** - * Represents the in-memory model of the address book data. + * Represents the in-memory model of Notor's data. */ public class ModelManager implements Model { private static final Logger logger = LogsCenter.getLogger(ModelManager.class); - private final AddressBook addressBook; + private final Notor notor; private final UserPrefs userPrefs; private final FilteredList filteredPersons; /** - * Initializes a ModelManager with the given addressBook and userPrefs. + * Initializes a ModelManager with the given Notor and userPrefs. */ - public ModelManager(ReadOnlyAddressBook addressBook, ReadOnlyUserPrefs userPrefs) { + public ModelManager(ReadOnlyNotor notor, ReadOnlyUserPrefs userPrefs) { super(); - requireAllNonNull(addressBook, userPrefs); + requireAllNonNull(notor, userPrefs); - logger.fine("Initializing with address book: " + addressBook + " and user prefs " + userPrefs); + logger.fine("Initializing with: " + notor + " and user prefs " + userPrefs); - this.addressBook = new AddressBook(addressBook); + this.notor = new Notor(notor); this.userPrefs = new UserPrefs(userPrefs); - filteredPersons = new FilteredList<>(this.addressBook.getPersonList()); + filteredPersons = new FilteredList<>(this.notor.getPersonList()); } public ModelManager() { - this(new AddressBook(), new UserPrefs()); + this(new Notor(), new UserPrefs()); } //=========== UserPrefs ================================================================================== @@ -68,94 +68,94 @@ public void setGuiSettings(GuiSettings guiSettings) { } @Override - public Path getAddressBookFilePath() { - return userPrefs.getAddressBookFilePath(); + public Path getNotorFilePath() { + return userPrefs.getNotorFilePath(); } @Override - public void setAddressBookFilePath(Path addressBookFilePath) { - requireNonNull(addressBookFilePath); - userPrefs.setAddressBookFilePath(addressBookFilePath); + public void setNotorFilePath(Path notorFilePath) { + requireNonNull(notorFilePath); + userPrefs.setNotorFilePath(notorFilePath); } - //=========== AddressBook ================================================================================ + //=========== Notor ===================================================================================== @Override - public void setAddressBook(ReadOnlyAddressBook addressBook) { - this.addressBook.resetData(addressBook); + public void setNotor(ReadOnlyNotor notor) { + this.notor.resetData(notor); } @Override - public ReadOnlyAddressBook getAddressBook() { - return addressBook; + public ReadOnlyNotor getNotor() { + return notor; } @Override public boolean hasPerson(Person person) { requireNonNull(person); - return addressBook.hasPerson(person); + return notor.hasPerson(person); } @Override public void deletePerson(Person target) { - addressBook.removePerson(target); + notor.removePerson(target); } @Override public void createPerson(Person person) { - addressBook.addPerson(person); + notor.addPerson(person); updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS); } @Override public Person findPerson(String name) { - return addressBook.findPerson(name); + return notor.findPerson(name); } @Override public void setPerson(Person target, Person editedPerson) { requireAllNonNull(target, editedPerson); - addressBook.setPerson(target, editedPerson); + notor.setPerson(target, editedPerson); } @Override public boolean hasSuperGroup(SuperGroup superGroup) { requireNonNull(superGroup); - return addressBook.hasSuperGroup(superGroup); + return notor.hasSuperGroup(superGroup); } @Override public void addSuperGroup(SuperGroup superGroup) { - addressBook.addSuperGroup(superGroup); + notor.addSuperGroup(superGroup); updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS); } @Override public void deleteSuperGroup(SuperGroup superGroup) { - addressBook.deleteSuperGroup(superGroup); + notor.deleteSuperGroup(superGroup); updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS); } @Override public SuperGroup findSuperGroup(String name) { - return addressBook.findSuperGroup(name); + return notor.findSuperGroup(name); } @Override public SubGroup findSubGroup(String name) { - return addressBook.findSubGroup(name); + return notor.findSubGroup(name); } @Override public void addSubGroup(SubGroup subGroup) { - addressBook.addSubGroup(subGroup); + notor.addSubGroup(subGroup); updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS); } @Override public void deleteSubGroup(SubGroup subGroup) { - addressBook.deleteSubGroup(subGroup); + notor.deleteSubGroup(subGroup); updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS); } @@ -190,7 +190,7 @@ public boolean equals(Object obj) { // state check ModelManager other = (ModelManager) obj; - return addressBook.equals(other.addressBook) + return notor.equals(other.notor) && userPrefs.equals(other.userPrefs) && filteredPersons.equals(other.filteredPersons); } diff --git a/src/main/java/seedu/notor/model/AddressBook.java b/src/main/java/seedu/notor/model/Notor.java similarity index 87% rename from src/main/java/seedu/notor/model/AddressBook.java rename to src/main/java/seedu/notor/model/Notor.java index 9f17cbfb2ba..d403813f66d 100644 --- a/src/main/java/seedu/notor/model/AddressBook.java +++ b/src/main/java/seedu/notor/model/Notor.java @@ -15,7 +15,7 @@ * Wraps all data at the address-book level * Duplicates are not allowed (by .isSamePerson comparison) */ -public class AddressBook implements ReadOnlyAddressBook { +public class Notor implements ReadOnlyNotor { private final UniqueList persons; @@ -36,12 +36,12 @@ public class AddressBook implements ReadOnlyAddressBook { subGroups = new HashMap<>(); } - public AddressBook() {} + public Notor() {} /** - * Creates an AddressBook using the Persons in the {@code toBeCopied} + * Creates an Notor using the Persons in the {@code toBeCopied} */ - public AddressBook(ReadOnlyAddressBook toBeCopied) { + public Notor(ReadOnlyNotor toBeCopied) { this(); resetData(toBeCopied); } @@ -73,9 +73,9 @@ public void setSubGroups(HashMap subGroups) { } /** - * Resets the existing data of this {@code AddressBook} with {@code newData}. + * Resets the existing data of this {@code Notor} with {@code newData}. */ - public void resetData(ReadOnlyAddressBook newData) { + public void resetData(ReadOnlyNotor newData) { requireNonNull(newData); setPersons(newData.getPersonList()); @@ -125,7 +125,7 @@ public void setPerson(Person target, Person editedPerson) { } /** - * Removes {@code key} from this {@code AddressBook}. + * Removes {@code key} from this {@code Notor}. * {@code key} must exist in the address book. */ public void removePerson(Person key) { @@ -135,8 +135,8 @@ public void removePerson(Person key) { //// Group-level operations /** - * Adds superGroup into the AddressBook. - * @param sg the SuperGroup to be added into AddressBook. + * Adds superGroup into the Notor. + * @param sg the SuperGroup to be added into Notor. */ public void addSuperGroup(SuperGroup sg) { if (!superGroups.containsKey(sg.getName())) { @@ -164,8 +164,8 @@ public boolean hasSubGroup(SubGroup subGroup) { } /** - * Adds SubGroup into the AddressBook. - * @param subGroup the SuperGroup to be added into AddressBook. + * Adds SubGroup into the Notor. + * @param subGroup the SuperGroup to be added into Notor. */ public void addSubGroup(SubGroup subGroup) { requireNonNull(subGroup); @@ -219,8 +219,8 @@ public HashMap getSubGroups() { public boolean equals(Object other) { // TODO: Add Group return other == this // short circuit if same object - || (other instanceof AddressBook // instanceof handles nulls - && persons.equals(((AddressBook) other).persons)); + || (other instanceof Notor // instanceof handles nulls + && persons.equals(((Notor) other).persons)); } @Override diff --git a/src/main/java/seedu/notor/model/ReadOnlyAddressBook.java b/src/main/java/seedu/notor/model/ReadOnlyNotor.java similarity index 86% rename from src/main/java/seedu/notor/model/ReadOnlyAddressBook.java rename to src/main/java/seedu/notor/model/ReadOnlyNotor.java index 9183f6111d4..8bbe5425b95 100644 --- a/src/main/java/seedu/notor/model/ReadOnlyAddressBook.java +++ b/src/main/java/seedu/notor/model/ReadOnlyNotor.java @@ -8,9 +8,9 @@ import seedu.notor.model.person.Person; /** - * Unmodifiable view of an address book + * Unmodifiable view of Notor */ -public interface ReadOnlyAddressBook { +public interface ReadOnlyNotor { /** * Returns an unmodifiable view of the persons list. @@ -19,6 +19,5 @@ public interface ReadOnlyAddressBook { ObservableList getPersonList(); HashMap getSuperGroups(); - HashMap getSubGroups(); } diff --git a/src/main/java/seedu/notor/model/ReadOnlyUserPrefs.java b/src/main/java/seedu/notor/model/ReadOnlyUserPrefs.java index 16b16be5768..0f56e4c73ae 100644 --- a/src/main/java/seedu/notor/model/ReadOnlyUserPrefs.java +++ b/src/main/java/seedu/notor/model/ReadOnlyUserPrefs.java @@ -11,6 +11,6 @@ public interface ReadOnlyUserPrefs { GuiSettings getGuiSettings(); - Path getAddressBookFilePath(); + Path getNotorFilePath(); } diff --git a/src/main/java/seedu/notor/model/UserPrefs.java b/src/main/java/seedu/notor/model/UserPrefs.java index 02ecfe5616e..67999cd8454 100644 --- a/src/main/java/seedu/notor/model/UserPrefs.java +++ b/src/main/java/seedu/notor/model/UserPrefs.java @@ -14,7 +14,7 @@ public class UserPrefs implements ReadOnlyUserPrefs { private GuiSettings guiSettings = new GuiSettings(); - private Path addressBookFilePath = Paths.get("data", "notor.json"); + private Path notorFilePath = Paths.get("data", "notor.json"); /** * Creates a {@code UserPrefs} with default values. @@ -35,7 +35,7 @@ public UserPrefs(ReadOnlyUserPrefs userPrefs) { public void resetData(ReadOnlyUserPrefs newUserPrefs) { requireNonNull(newUserPrefs); setGuiSettings(newUserPrefs.getGuiSettings()); - setAddressBookFilePath(newUserPrefs.getAddressBookFilePath()); + setNotorFilePath(newUserPrefs.getNotorFilePath()); } public GuiSettings getGuiSettings() { @@ -47,13 +47,13 @@ public void setGuiSettings(GuiSettings guiSettings) { this.guiSettings = guiSettings; } - public Path getAddressBookFilePath() { - return addressBookFilePath; + public Path getNotorFilePath() { + return notorFilePath; } - public void setAddressBookFilePath(Path addressBookFilePath) { - requireNonNull(addressBookFilePath); - this.addressBookFilePath = addressBookFilePath; + public void setNotorFilePath(Path notorFilePath) { + requireNonNull(notorFilePath); + this.notorFilePath = notorFilePath; } @Override @@ -68,19 +68,19 @@ public boolean equals(Object other) { UserPrefs o = (UserPrefs) other; return guiSettings.equals(o.guiSettings) - && addressBookFilePath.equals(o.addressBookFilePath); + && notorFilePath.equals(o.notorFilePath); } @Override public int hashCode() { - return Objects.hash(guiSettings, addressBookFilePath); + return Objects.hash(guiSettings, notorFilePath); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("Gui Settings : " + guiSettings); - sb.append("\nLocal data file location : " + addressBookFilePath); + sb.append("\nLocal data file location : " + notorFilePath); return sb.toString(); } diff --git a/src/main/java/seedu/notor/model/util/SampleDataUtil.java b/src/main/java/seedu/notor/model/util/SampleDataUtil.java index b47cee84589..fbd56970eb4 100644 --- a/src/main/java/seedu/notor/model/util/SampleDataUtil.java +++ b/src/main/java/seedu/notor/model/util/SampleDataUtil.java @@ -4,8 +4,8 @@ import java.util.Set; import java.util.stream.Collectors; -import seedu.notor.model.AddressBook; -import seedu.notor.model.ReadOnlyAddressBook; +import seedu.notor.model.Notor; +import seedu.notor.model.ReadOnlyNotor; import seedu.notor.model.person.Email; import seedu.notor.model.person.Name; import seedu.notor.model.person.Note; @@ -14,7 +14,7 @@ import seedu.notor.model.tag.Tag; /** - * Contains utility methods for populating {@code AddressBook} with sample data. + * Contains utility methods for populating {@code Notor} with sample data. */ public class SampleDataUtil { public static final Note EMPTY_NOTE = new Note("", ""); @@ -37,8 +37,8 @@ EMPTY_NOTE, getTagSet("colleagues")) }; } - public static ReadOnlyAddressBook getSampleAddressBook() { - AddressBook sampleAb = new AddressBook(); + public static ReadOnlyNotor getSampleNotor() { + Notor sampleAb = new Notor(); for (Person samplePerson : getSamplePersons()) { sampleAb.addPerson(samplePerson); } diff --git a/src/main/java/seedu/notor/storage/AddressBookStorage.java b/src/main/java/seedu/notor/storage/AddressBookStorage.java deleted file mode 100644 index 0ab54d81afb..00000000000 --- a/src/main/java/seedu/notor/storage/AddressBookStorage.java +++ /dev/null @@ -1,47 +0,0 @@ -package seedu.notor.storage; - -import java.io.IOException; -import java.nio.file.Path; -import java.util.Optional; - -import seedu.notor.commons.exceptions.DataConversionException; -import seedu.notor.model.ReadOnlyAddressBook; - -/** - * Represents a storage for {@link seedu.notor.model.AddressBook}. - */ -public interface AddressBookStorage { - - /** - * Returns the file path of the data file. - */ - Path getAddressBookFilePath(); - - /** - * Returns AddressBook data as a {@link ReadOnlyAddressBook}. - * Returns {@code Optional.empty()} if storage file is not found. - * - * @throws DataConversionException if the data in storage is not in the expected format. - * @throws IOException if there was any problem when reading from the storage. - */ - Optional readAddressBook() throws DataConversionException, IOException; - - /** - * @see #getAddressBookFilePath() - */ - Optional readAddressBook(Path filePath) throws DataConversionException, IOException; - - /** - * Saves the given {@link ReadOnlyAddressBook} to the storage. - * - * @param addressBook cannot be null. - * @throws IOException if there was any problem writing to the file. - */ - void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException; - - /** - * @see #saveAddressBook(ReadOnlyAddressBook) - */ - void saveAddressBook(ReadOnlyAddressBook addressBook, Path filePath) throws IOException; - -} diff --git a/src/main/java/seedu/notor/storage/JsonAddressBookStorage.java b/src/main/java/seedu/notor/storage/JsonNotorStorage.java similarity index 50% rename from src/main/java/seedu/notor/storage/JsonAddressBookStorage.java rename to src/main/java/seedu/notor/storage/JsonNotorStorage.java index 050bef08808..1f66dce5451 100644 --- a/src/main/java/seedu/notor/storage/JsonAddressBookStorage.java +++ b/src/main/java/seedu/notor/storage/JsonNotorStorage.java @@ -12,47 +12,47 @@ import seedu.notor.commons.exceptions.IllegalValueException; import seedu.notor.commons.util.FileUtil; import seedu.notor.commons.util.JsonUtil; -import seedu.notor.model.ReadOnlyAddressBook; +import seedu.notor.model.ReadOnlyNotor; /** - * A class to access AddressBook data stored as a json file on the hard disk. + * A class to access Notor data stored as a json file on the hard disk. */ -public class JsonAddressBookStorage implements AddressBookStorage { +public class JsonNotorStorage implements NotorStorage { - private static final Logger logger = LogsCenter.getLogger(JsonAddressBookStorage.class); + private static final Logger logger = LogsCenter.getLogger(JsonNotorStorage.class); private final Path filePath; - public JsonAddressBookStorage(Path filePath) { + public JsonNotorStorage(Path filePath) { this.filePath = filePath; } - public Path getAddressBookFilePath() { + public Path getNotorFilePath() { return filePath; } @Override - public Optional readAddressBook() throws DataConversionException { - return readAddressBook(filePath); + public Optional readNotor() throws DataConversionException { + return readNotor(filePath); } /** - * Similar to {@link #readAddressBook()}. + * Similar to {@link #readNotor()}. * * @param filePath location of the data. Cannot be null. * @throws DataConversionException if the file is not in the correct format. */ - public Optional readAddressBook(Path filePath) throws DataConversionException { + public Optional readNotor(Path filePath) throws DataConversionException { requireNonNull(filePath); - Optional jsonAddressBook = JsonUtil.readJsonFile( - filePath, JsonSerializableAddressBook.class); - if (!jsonAddressBook.isPresent()) { + Optional jsonNotor = JsonUtil.readJsonFile( + filePath, JsonSerializableNotor.class); + if (!jsonNotor.isPresent()) { return Optional.empty(); } try { - return Optional.of(jsonAddressBook.get().toModelType()); + return Optional.of(jsonNotor.get().toModelType()); } catch (IllegalValueException ive) { logger.info("Illegal values found in " + filePath + ": " + ive.getMessage()); throw new DataConversionException(ive); @@ -60,21 +60,21 @@ public Optional readAddressBook(Path filePath) throws DataC } @Override - public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException { - saveAddressBook(addressBook, filePath); + public void saveNotor(ReadOnlyNotor notor) throws IOException { + saveNotor(notor, filePath); } /** - * Similar to {@link #saveAddressBook(ReadOnlyAddressBook)}. + * Similar to {@link #saveNotor(ReadOnlyNotor)}. * * @param filePath location of the data. Cannot be null. */ - public void saveAddressBook(ReadOnlyAddressBook addressBook, Path filePath) throws IOException { - requireNonNull(addressBook); + public void saveNotor(ReadOnlyNotor notor, Path filePath) throws IOException { + requireNonNull(notor); requireNonNull(filePath); FileUtil.createIfMissing(filePath); - JsonUtil.saveJsonFile(new JsonSerializableAddressBook(addressBook), filePath); + JsonUtil.saveJsonFile(new JsonSerializableNotor(notor), filePath); } } diff --git a/src/main/java/seedu/notor/storage/JsonSerializableAddressBook.java b/src/main/java/seedu/notor/storage/JsonSerializableNotor.java similarity index 65% rename from src/main/java/seedu/notor/storage/JsonSerializableAddressBook.java rename to src/main/java/seedu/notor/storage/JsonSerializableNotor.java index c76974c0b73..ab721f59d48 100644 --- a/src/main/java/seedu/notor/storage/JsonSerializableAddressBook.java +++ b/src/main/java/seedu/notor/storage/JsonSerializableNotor.java @@ -8,17 +8,17 @@ import com.fasterxml.jackson.annotation.JsonRootName; import seedu.notor.commons.exceptions.IllegalValueException; -import seedu.notor.model.AddressBook; -import seedu.notor.model.ReadOnlyAddressBook; +import seedu.notor.model.Notor; +import seedu.notor.model.ReadOnlyNotor; import seedu.notor.model.group.SubGroup; import seedu.notor.model.group.SuperGroup; import seedu.notor.model.person.Person; /** - * An Immutable AddressBook that is serializable to JSON format. + * An Immutable Notor that is serializable to JSON format. */ -@JsonRootName(value = "addressbook") -class JsonSerializableAddressBook { +@JsonRootName(value = "notor") +class JsonSerializableNotor { public static final String MESSAGE_DUPLICATE_PERSON = "Persons list contains duplicate person(s)."; @@ -29,10 +29,10 @@ class JsonSerializableAddressBook { private final List subGroups = new ArrayList<>(); /** - * Constructs a {@code JsonSerializableAddressBook} with the given persons. + * Constructs a {@code JsonSerializableNotor} with the given persons. */ @JsonCreator - public JsonSerializableAddressBook(@JsonProperty("persons") List persons, + public JsonSerializableNotor(@JsonProperty("persons") List persons, @JsonProperty("superGroups") List superGroups, @JsonProperty("subGroups") List subGroups) { this.persons.addAll(persons); @@ -41,11 +41,11 @@ public JsonSerializableAddressBook(@JsonProperty("persons") List readNotor() throws DataConversionException, IOException; + + /** + * @see #getNotorFilePath() + */ + Optional readNotor(Path filePath) throws DataConversionException, IOException; + + /** + * Saves the given {@link ReadOnlyNotor} to the storage. + * + * @param notor cannot be null. + * @throws IOException if there was any problem writing to the file. + */ + void saveNotor(ReadOnlyNotor notor) throws IOException; + + /** + * @see #saveNotor(ReadOnlyNotor) + */ + void saveNotor(ReadOnlyNotor notor, Path filePath) throws IOException; + +} diff --git a/src/main/java/seedu/notor/storage/Storage.java b/src/main/java/seedu/notor/storage/Storage.java index 32e90eb6683..b21f4cadb37 100644 --- a/src/main/java/seedu/notor/storage/Storage.java +++ b/src/main/java/seedu/notor/storage/Storage.java @@ -5,14 +5,14 @@ import java.util.Optional; import seedu.notor.commons.exceptions.DataConversionException; -import seedu.notor.model.ReadOnlyAddressBook; +import seedu.notor.model.ReadOnlyNotor; import seedu.notor.model.ReadOnlyUserPrefs; import seedu.notor.model.UserPrefs; /** * API of the Storage component */ -public interface Storage extends AddressBookStorage, UserPrefsStorage { +public interface Storage extends NotorStorage, UserPrefsStorage { @Override Optional readUserPrefs() throws DataConversionException, IOException; @@ -21,12 +21,12 @@ public interface Storage extends AddressBookStorage, UserPrefsStorage { void saveUserPrefs(ReadOnlyUserPrefs userPrefs) throws IOException; @Override - Path getAddressBookFilePath(); + Path getNotorFilePath(); @Override - Optional readAddressBook() throws DataConversionException, IOException; + Optional readNotor() throws DataConversionException, IOException; @Override - void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException; + void saveNotor(ReadOnlyNotor notor) throws IOException; } diff --git a/src/main/java/seedu/notor/storage/StorageManager.java b/src/main/java/seedu/notor/storage/StorageManager.java index 1a0a01b5851..0a303353745 100644 --- a/src/main/java/seedu/notor/storage/StorageManager.java +++ b/src/main/java/seedu/notor/storage/StorageManager.java @@ -7,25 +7,25 @@ import seedu.notor.commons.core.LogsCenter; import seedu.notor.commons.exceptions.DataConversionException; -import seedu.notor.model.ReadOnlyAddressBook; +import seedu.notor.model.ReadOnlyNotor; import seedu.notor.model.ReadOnlyUserPrefs; import seedu.notor.model.UserPrefs; /** - * Manages storage of AddressBook data in local storage. + * Manages storage of Notor data in local storage. */ public class StorageManager implements Storage { private static final Logger logger = LogsCenter.getLogger(StorageManager.class); - private final AddressBookStorage addressBookStorage; + private final NotorStorage notorStorage; private final UserPrefsStorage userPrefsStorage; /** - * Creates a {@code StorageManager} with the given {@code AddressBookStorage} and {@code UserPrefStorage}. + * Creates a {@code StorageManager} with the given {@code NotorStorage} and {@code UserPrefStorage}. */ - public StorageManager(AddressBookStorage addressBookStorage, UserPrefsStorage userPrefsStorage) { + public StorageManager(NotorStorage notorStorage, UserPrefsStorage userPrefsStorage) { super(); - this.addressBookStorage = addressBookStorage; + this.notorStorage = notorStorage; this.userPrefsStorage = userPrefsStorage; } @@ -47,33 +47,33 @@ public void saveUserPrefs(ReadOnlyUserPrefs userPrefs) throws IOException { } - // ================ AddressBook methods ============================== + // ================ Notor methods ============================== @Override - public Path getAddressBookFilePath() { - return addressBookStorage.getAddressBookFilePath(); + public Path getNotorFilePath() { + return notorStorage.getNotorFilePath(); } @Override - public Optional readAddressBook() throws DataConversionException, IOException { - return readAddressBook(addressBookStorage.getAddressBookFilePath()); + public Optional readNotor() throws DataConversionException, IOException { + return readNotor(notorStorage.getNotorFilePath()); } @Override - public Optional readAddressBook(Path filePath) throws DataConversionException, IOException { + public Optional readNotor(Path filePath) throws DataConversionException, IOException { logger.fine("Attempting to read data from file: " + filePath); - return addressBookStorage.readAddressBook(filePath); + return notorStorage.readNotor(filePath); } @Override - public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException { - saveAddressBook(addressBook, addressBookStorage.getAddressBookFilePath()); + public void saveNotor(ReadOnlyNotor notor) throws IOException { + saveNotor(notor, notorStorage.getNotorFilePath()); } @Override - public void saveAddressBook(ReadOnlyAddressBook addressBook, Path filePath) throws IOException { + public void saveNotor(ReadOnlyNotor notor, Path filePath) throws IOException { logger.fine("Attempting to write to data file: " + filePath); - addressBookStorage.saveAddressBook(addressBook, filePath); + notorStorage.saveNotor(notor, filePath); } } diff --git a/src/main/java/seedu/notor/ui/HelpWindow.java b/src/main/java/seedu/notor/ui/HelpWindow.java index 5cf220faed0..741d81dccdf 100644 --- a/src/main/java/seedu/notor/ui/HelpWindow.java +++ b/src/main/java/seedu/notor/ui/HelpWindow.java @@ -15,7 +15,7 @@ */ public class HelpWindow extends UiPart { - public static final String USERGUIDE_URL = "https://se-education.org/addressbook-level3/UserGuide.html"; + public static final String USERGUIDE_URL = "https://ay2122s1-cs2103t-w08-1.github.io/tp/UserGuide.html"; public static final String HELP_MESSAGE = "Refer to the user guide: " + USERGUIDE_URL; private static final Logger logger = LogsCenter.getLogger(HelpWindow.class); diff --git a/src/main/java/seedu/notor/ui/MainWindow.java b/src/main/java/seedu/notor/ui/MainWindow.java index aa48dadff6c..874537ffb37 100644 --- a/src/main/java/seedu/notor/ui/MainWindow.java +++ b/src/main/java/seedu/notor/ui/MainWindow.java @@ -120,7 +120,7 @@ void fillInnerParts() { resultDisplay = new ResultDisplay(); resultDisplayPlaceholder.getChildren().add(resultDisplay.getRoot()); - StatusBarFooter statusBarFooter = new StatusBarFooter(logic.getAddressBookFilePath()); + StatusBarFooter statusBarFooter = new StatusBarFooter(logic.getNotorFilePath()); statusbarPlaceholder.getChildren().add(statusBarFooter.getRoot()); CommandBox commandBox = new CommandBox(this::executeCommand); diff --git a/src/test/data/JsonAddressBookStorageTest/invalidAndValidPersonAddressBook.json b/src/test/data/JsonNotorStorageTest/invalidAndValidPersonNotor.json similarity index 100% rename from src/test/data/JsonAddressBookStorageTest/invalidAndValidPersonAddressBook.json rename to src/test/data/JsonNotorStorageTest/invalidAndValidPersonNotor.json diff --git a/src/test/data/JsonAddressBookStorageTest/invalidPersonAddressBook.json b/src/test/data/JsonNotorStorageTest/invalidPersonNotor.json similarity index 100% rename from src/test/data/JsonAddressBookStorageTest/invalidPersonAddressBook.json rename to src/test/data/JsonNotorStorageTest/invalidPersonNotor.json diff --git a/src/test/data/JsonAddressBookStorageTest/notJsonFormatAddressBook.json b/src/test/data/JsonNotorStorageTest/notJsonFormatNotor.json similarity index 100% rename from src/test/data/JsonAddressBookStorageTest/notJsonFormatAddressBook.json rename to src/test/data/JsonNotorStorageTest/notJsonFormatNotor.json diff --git a/src/test/data/JsonSerializableAddressBookTest/duplicatePersonAddressBook.json b/src/test/data/JsonSerializableNotorTest/duplicatePersonNotor.json similarity index 100% rename from src/test/data/JsonSerializableAddressBookTest/duplicatePersonAddressBook.json rename to src/test/data/JsonSerializableNotorTest/duplicatePersonNotor.json diff --git a/src/test/data/JsonSerializableAddressBookTest/invalidPersonAddressBook.json b/src/test/data/JsonSerializableNotorTest/invalidPersonNotor.json similarity index 100% rename from src/test/data/JsonSerializableAddressBookTest/invalidPersonAddressBook.json rename to src/test/data/JsonSerializableNotorTest/invalidPersonNotor.json diff --git a/src/test/data/JsonSerializableAddressBookTest/typicalPersonsAddressBook.json b/src/test/data/JsonSerializableNotorTest/typicalPersonsNotor.json similarity index 72% rename from src/test/data/JsonSerializableAddressBookTest/typicalPersonsAddressBook.json rename to src/test/data/JsonSerializableNotorTest/typicalPersonsNotor.json index f68b20e4957..2a99643e383 100644 --- a/src/test/data/JsonSerializableAddressBookTest/typicalPersonsAddressBook.json +++ b/src/test/data/JsonSerializableNotorTest/typicalPersonsNotor.json @@ -1,11 +1,11 @@ { - "_comment": "AddressBook save file which contains the same Person values as in TypicalPersons#getTypicalAddressBook()", + "_comment": "Notor save file which contains the same Person values as in TypicalPersons#getTypicalNotor()", "persons" : [ { "name" : "Alice Pauline", "phone" : "94351253", "email" : "alice@example.com", - "note": "", - "noteDate": "", + "note": "She lives in the Wonderland.", + "noteDate": "Thu., 11/11/2011", "tagged" : [ "friends" ], "superGroups" : [ ], "subGroups" : [ ] @@ -13,11 +13,11 @@ "name" : "Benson Meier", "phone" : "98765432", "email" : "johnd@example.com", - "note": "", - "noteDate": "", + "note": "He is Ben's son.", + "noteDate":"Fri, 11/11/2010", "tagged" : [ "owesMoney", "friends" ], - "superGroups" : [ ], - "subGroups" : [ ] + "superGroups" : [ "Orbital", "CS2103" ], + "subGroups" : [ "Orbital_Group1" ] }, { "name" : "Carl Kurz", "phone" : "95352563", @@ -64,6 +64,15 @@ "superGroups" : [ ], "subGroups" : [ ] } ], - "superGroups" : [ ], - "subGroups" : [ ] + "superGroups" : [ { + "name" : "Orbital", + "subGroups" : [ "Group1" ] + }, { + "name" : "CS2103", + "subGroups" : [ ] + } ], + "subGroups" : [ { + "name" : "Group1", + "parent" : "Orbital" + } ] } diff --git a/src/test/data/JsonUserPrefsStorageTest/ExtraValuesUserPref.json b/src/test/data/JsonUserPrefsStorageTest/ExtraValuesUserPref.json index 5f1669f7ffc..60903e65e05 100644 --- a/src/test/data/JsonUserPrefsStorageTest/ExtraValuesUserPref.json +++ b/src/test/data/JsonUserPrefsStorageTest/ExtraValuesUserPref.json @@ -9,5 +9,5 @@ "z": 99 } }, - "addressBookFilePath": "notor.json" + "notor": "notor.json" } diff --git a/src/test/data/JsonUserPrefsStorageTest/TypicalUserPref.json b/src/test/data/JsonUserPrefsStorageTest/TypicalUserPref.json index 76674c0820c..7208cdbdced 100644 --- a/src/test/data/JsonUserPrefsStorageTest/TypicalUserPref.json +++ b/src/test/data/JsonUserPrefsStorageTest/TypicalUserPref.json @@ -7,5 +7,5 @@ "y": 100 } }, - "addressBookFilePath": "notor.json" + "notorFilePath": "data/notor.json" } diff --git a/src/test/java/seedu/notor/logic/LogicManagerTest.java b/src/test/java/seedu/notor/logic/LogicManagerTest.java index 424115b8010..f11fc673344 100644 --- a/src/test/java/seedu/notor/logic/LogicManagerTest.java +++ b/src/test/java/seedu/notor/logic/LogicManagerTest.java @@ -25,10 +25,10 @@ import seedu.notor.logic.parser.exceptions.ParseException; import seedu.notor.model.Model; import seedu.notor.model.ModelManager; -import seedu.notor.model.ReadOnlyAddressBook; +import seedu.notor.model.ReadOnlyNotor; import seedu.notor.model.UserPrefs; import seedu.notor.model.person.Person; -import seedu.notor.storage.JsonAddressBookStorage; +import seedu.notor.storage.JsonNotorStorage; import seedu.notor.storage.JsonUserPrefsStorage; import seedu.notor.storage.StorageManager; import seedu.notor.testutil.PersonBuilder; @@ -44,10 +44,10 @@ public class LogicManagerTest { @BeforeEach public void setUp() { - JsonAddressBookStorage addressBookStorage = - new JsonAddressBookStorage(temporaryFolder.resolve("addressBook.json")); + JsonNotorStorage notorStorage = + new JsonNotorStorage(temporaryFolder.resolve("notor.json")); JsonUserPrefsStorage userPrefsStorage = new JsonUserPrefsStorage(temporaryFolder.resolve("userPrefs.json")); - StorageManager storage = new StorageManager(addressBookStorage, userPrefsStorage); + StorageManager storage = new StorageManager(notorStorage, userPrefsStorage); logic = new LogicManager(model, storage); Executor.setup(model); } @@ -72,12 +72,12 @@ public void execute_validCommand_success() throws Exception { @Test public void execute_storageThrowsIoException_throwsCommandException() { - // Setup LogicManager with JsonAddressBookIoExceptionThrowingStub - JsonAddressBookStorage addressBookStorage = - new JsonAddressBookIoExceptionThrowingStub(temporaryFolder.resolve("ioExceptionAddressBook.json")); + // Setup LogicManager with JsonNotorIoExceptionThrowingStub + JsonNotorStorage notorStorage = + new JsonNotorIoExceptionThrowingStub(temporaryFolder.resolve("ioExceptionNotor.json")); JsonUserPrefsStorage userPrefsStorage = new JsonUserPrefsStorage(temporaryFolder.resolve("ioExceptionUserPrefs.json")); - StorageManager storage = new StorageManager(addressBookStorage, userPrefsStorage); + StorageManager storage = new StorageManager(notorStorage, userPrefsStorage); logic = new LogicManager(model, storage); // Execute add command @@ -134,7 +134,7 @@ private void assertExecuteException(String inputCommand, String expectedMessage) */ private void assertExecuteFailure(String inputCommand, Class expectedException, String expectedMessage) { - Model expectedModel = new ModelManager(model.getAddressBook(), new UserPrefs()); + Model expectedModel = new ModelManager(model.getNotor(), new UserPrefs()); assertExecuteFailure(inputCommand, expectedException, expectedMessage, expectedModel); } @@ -155,13 +155,13 @@ private void assertExecuteFailure(String inputCommand, Class * - a {@code CommandException} is thrown
* - the ExecuteException message matches {@code expectedMessage}
- * - the address book, filtered person list and selected person in {@code actualModel} remain unchanged + * - the Notor, filtered person list and selected person in {@code actualModel} remain unchanged */ public static void assertExecuteFailure(Command command, Model actualModel, String expectedMessage) { // we are unable to defensively copy the model for comparison later, so we can // only do so by copying its components. - AddressBook expectedAddressBook = new AddressBook(actualModel.getAddressBook()); + Notor expectedNotor = new Notor(actualModel.getNotor()); List expectedFilteredList = new ArrayList<>(actualModel.getFilteredPersonList()); assertThrows(ExecuteException.class, expectedMessage, () -> command.execute(actualModel)); - assertEquals(expectedAddressBook, actualModel.getAddressBook()); + assertEquals(expectedNotor, actualModel.getNotor()); assertEquals(expectedFilteredList, actualModel.getFilteredPersonList()); } /** * Updates {@code model}'s filtered list to show only the person at the given {@code targetIndex} in the - * {@code model}'s address book. + * {@code model}'s Notor. */ public static void showPersonAtIndex(Model model, Index targetIndex) { assertTrue(targetIndex.getZeroBased() < model.getFilteredPersonList().size()); diff --git a/src/test/java/seedu/notor/logic/commands/FindCommandTest.java b/src/test/java/seedu/notor/logic/commands/FindCommandTest.java index 4186e859dfe..f9970e70d21 100644 --- a/src/test/java/seedu/notor/logic/commands/FindCommandTest.java +++ b/src/test/java/seedu/notor/logic/commands/FindCommandTest.java @@ -6,7 +6,7 @@ import static seedu.notor.testutil.TypicalPersons.CARL; import static seedu.notor.testutil.TypicalPersons.ELLE; import static seedu.notor.testutil.TypicalPersons.FIONA; -import static seedu.notor.testutil.TypicalPersons.getTypicalAddressBook; +import static seedu.notor.testutil.TypicalPersons.getTypicalNotor; import java.util.Arrays; import java.util.Collections; @@ -22,8 +22,8 @@ * Contains integration tests (interaction with the Model) for {@code FindCommand}. */ public class FindCommandTest { - private final Model model = new ModelManager(getTypicalAddressBook(), new UserPrefs()); - private final Model expectedModel = new ModelManager(getTypicalAddressBook(), new UserPrefs()); + private final Model model = new ModelManager(getTypicalNotor(), new UserPrefs()); + private final Model expectedModel = new ModelManager(getTypicalNotor(), new UserPrefs()); @Test public void equals() { diff --git a/src/test/java/seedu/notor/logic/commands/ListCommandTest.java b/src/test/java/seedu/notor/logic/commands/ListCommandTest.java index 0abadfd9b7f..d144117057e 100644 --- a/src/test/java/seedu/notor/logic/commands/ListCommandTest.java +++ b/src/test/java/seedu/notor/logic/commands/ListCommandTest.java @@ -2,7 +2,7 @@ import static seedu.notor.logic.commands.CommandTestUtil.showPersonAtIndex; import static seedu.notor.testutil.TypicalIndexes.INDEX_FIRST_PERSON; -import static seedu.notor.testutil.TypicalPersons.getTypicalAddressBook; +import static seedu.notor.testutil.TypicalPersons.getTypicalNotor; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -21,8 +21,8 @@ public class ListCommandTest { @BeforeEach public void setUp() { - model = new ModelManager(getTypicalAddressBook(), new UserPrefs()); - expectedModel = new ModelManager(model.getAddressBook(), new UserPrefs()); + model = new ModelManager(getTypicalNotor(), new UserPrefs()); + expectedModel = new ModelManager(model.getNotor(), new UserPrefs()); } @Test diff --git a/src/test/java/seedu/notor/logic/commands/PersonCreateCommandIntegrationTest.java b/src/test/java/seedu/notor/logic/commands/PersonCreateCommandIntegrationTest.java index 2a6f6d57479..446e69f61de 100644 --- a/src/test/java/seedu/notor/logic/commands/PersonCreateCommandIntegrationTest.java +++ b/src/test/java/seedu/notor/logic/commands/PersonCreateCommandIntegrationTest.java @@ -1,7 +1,7 @@ package seedu.notor.logic.commands; import static seedu.notor.logic.commands.CommandTestUtil.assertExecuteFailure; -import static seedu.notor.testutil.TypicalPersons.getTypicalAddressBook; +import static seedu.notor.testutil.TypicalPersons.getTypicalNotor; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -25,7 +25,7 @@ public class PersonCreateCommandIntegrationTest { @BeforeEach public void setUp() { - model = new ModelManager(getTypicalAddressBook(), new UserPrefs()); + model = new ModelManager(getTypicalNotor(), new UserPrefs()); Executor.setup(model); } @@ -33,7 +33,7 @@ public void setUp() { public void execute_newPerson_success() throws ParseException { Person validPerson = new PersonBuilder().build(); - Model expectedModel = new ModelManager(model.getAddressBook(), new UserPrefs()); + Model expectedModel = new ModelManager(model.getNotor(), new UserPrefs()); expectedModel.createPerson(validPerson); CommandTestUtil.assertExecuteSuccess(new PersonCreateCommand(null, validPerson), model, @@ -42,7 +42,7 @@ public void execute_newPerson_success() throws ParseException { @Test public void execute_duplicatePerson_throwsCommandException() throws ParseException { - Person personInList = model.getAddressBook().getPersonList().get(0); + Person personInList = model.getNotor().getPersonList().get(0); assertExecuteFailure(new PersonCreateCommand(null, personInList), model, PersonCreateExecutor.MESSAGE_DUPLICATE_PERSON); } diff --git a/src/test/java/seedu/notor/logic/commands/PersonCreateCommandTest.java b/src/test/java/seedu/notor/logic/commands/PersonCreateCommandTest.java index 96d82732856..ad92ead76a8 100644 --- a/src/test/java/seedu/notor/logic/commands/PersonCreateCommandTest.java +++ b/src/test/java/seedu/notor/logic/commands/PersonCreateCommandTest.java @@ -20,9 +20,9 @@ import seedu.notor.logic.executors.exceptions.ExecuteException; import seedu.notor.logic.executors.person.PersonCreateExecutor; import seedu.notor.logic.parser.exceptions.ParseException; -import seedu.notor.model.AddressBook; +import seedu.notor.model.Notor; import seedu.notor.model.Model; -import seedu.notor.model.ReadOnlyAddressBook; +import seedu.notor.model.ReadOnlyNotor; import seedu.notor.model.ReadOnlyUserPrefs; import seedu.notor.model.group.SubGroup; import seedu.notor.model.group.SuperGroup; @@ -111,12 +111,12 @@ public void setGuiSettings(GuiSettings guiSettings) { } @Override - public Path getAddressBookFilePath() { + public Path getNotorFilePath() { throw new AssertionError("This method should not be called."); } @Override - public void setAddressBookFilePath(Path addressBookFilePath) { + public void setNotorFilePath(Path notorFilePath) { throw new AssertionError("This method should not be called."); } @@ -167,12 +167,12 @@ public SubGroup findSubGroup(String name) { } @Override - public void setAddressBook(ReadOnlyAddressBook newData) { + public void setNotor(ReadOnlyNotor newData) { throw new AssertionError("This method should not be called."); } @Override - public ReadOnlyAddressBook getAddressBook() { + public ReadOnlyNotor getNotor() { throw new AssertionError("This method should not be called."); } @@ -239,8 +239,8 @@ public void createPerson(Person person) { } @Override - public ReadOnlyAddressBook getAddressBook() { - return new AddressBook(); + public ReadOnlyNotor getNotor() { + return new Notor(); } } diff --git a/src/test/java/seedu/notor/logic/commands/PersonDeleteCommandTest.java b/src/test/java/seedu/notor/logic/commands/PersonDeleteCommandTest.java index ca94121487d..e098f5ec591 100644 --- a/src/test/java/seedu/notor/logic/commands/PersonDeleteCommandTest.java +++ b/src/test/java/seedu/notor/logic/commands/PersonDeleteCommandTest.java @@ -8,7 +8,7 @@ import static seedu.notor.logic.commands.CommandTestUtil.showPersonAtIndex; import static seedu.notor.testutil.TypicalIndexes.INDEX_FIRST_PERSON; import static seedu.notor.testutil.TypicalIndexes.INDEX_SECOND_PERSON; -import static seedu.notor.testutil.TypicalPersons.getTypicalAddressBook; +import static seedu.notor.testutil.TypicalPersons.getTypicalNotor; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -29,7 +29,7 @@ */ public class PersonDeleteCommandTest { - private final Model model = new ModelManager(getTypicalAddressBook(), new UserPrefs()); + private final Model model = new ModelManager(getTypicalNotor(), new UserPrefs()); @BeforeEach public void setUp() { @@ -43,7 +43,7 @@ public void execute_validIndexUnfilteredList_success() { String expectedMessage = String.format(PersonDeleteExecutor.MESSAGE_DELETE_PERSON_SUCCESS, personToDelete); - ModelManager expectedModel = new ModelManager(model.getAddressBook(), new UserPrefs()); + ModelManager expectedModel = new ModelManager(model.getNotor(), new UserPrefs()); expectedModel.deletePerson(personToDelete); CommandTestUtil.assertExecuteSuccess(deleteCommand, model, expectedMessage, expectedModel); @@ -66,7 +66,7 @@ public void execute_validIndexFilteredList_success() { String expectedMessage = String.format(PersonDeleteExecutor.MESSAGE_DELETE_PERSON_SUCCESS, personToDelete); - Model expectedModel = new ModelManager(model.getAddressBook(), new UserPrefs()); + Model expectedModel = new ModelManager(model.getNotor(), new UserPrefs()); expectedModel.deletePerson(personToDelete); showNoPerson(expectedModel); @@ -78,8 +78,8 @@ public void execute_invalidIndexFilteredList_throwsCommandException() { showPersonAtIndex(model, INDEX_FIRST_PERSON); Index outOfBoundIndex = INDEX_SECOND_PERSON; - // ensures that outOfBoundIndex is still in bounds of address book list - assertTrue(outOfBoundIndex.getZeroBased() < model.getAddressBook().getPersonList().size()); + // ensures that outOfBoundIndex is still in bounds of notor list + assertTrue(outOfBoundIndex.getZeroBased() < model.getNotor().getPersonList().size()); PersonDeleteCommand deleteCommand = new PersonDeleteCommand(outOfBoundIndex); diff --git a/src/test/java/seedu/notor/logic/commands/PersonEditCommandTest.java b/src/test/java/seedu/notor/logic/commands/PersonEditCommandTest.java index 9e333a2bdd5..a4b35fc1638 100644 --- a/src/test/java/seedu/notor/logic/commands/PersonEditCommandTest.java +++ b/src/test/java/seedu/notor/logic/commands/PersonEditCommandTest.java @@ -12,7 +12,7 @@ import static seedu.notor.logic.commands.CommandTestUtil.showPersonAtIndex; import static seedu.notor.testutil.TypicalIndexes.INDEX_FIRST_PERSON; import static seedu.notor.testutil.TypicalIndexes.INDEX_SECOND_PERSON; -import static seedu.notor.testutil.TypicalPersons.getTypicalAddressBook; +import static seedu.notor.testutil.TypicalPersons.getTypicalNotor; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -23,7 +23,7 @@ import seedu.notor.logic.executors.Executor; import seedu.notor.logic.executors.person.PersonEditExecutor; import seedu.notor.logic.executors.person.PersonEditExecutor.PersonEditDescriptor; -import seedu.notor.model.AddressBook; +import seedu.notor.model.Notor; import seedu.notor.model.Model; import seedu.notor.model.ModelManager; import seedu.notor.model.UserPrefs; @@ -36,7 +36,7 @@ */ public class PersonEditCommandTest { - private final Model model = new ModelManager(getTypicalAddressBook(), new UserPrefs()); + private final Model model = new ModelManager(getTypicalNotor(), new UserPrefs()); @BeforeEach public void setUp() { @@ -51,7 +51,7 @@ public void execute_allFieldsSpecifiedUnfilteredList_success() { String expectedMessage = String.format(PersonEditExecutor.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson); - Model expectedModel = new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs()); + Model expectedModel = new ModelManager(new Notor(model.getNotor()), new UserPrefs()); expectedModel.setPerson(model.getFilteredPersonList().get(0), editedPerson); CommandTestUtil.assertExecuteSuccess(personEditCommand, model, expectedMessage, expectedModel); @@ -72,7 +72,7 @@ public void execute_someFieldsSpecifiedUnfilteredList_success() { String expectedMessage = String.format(PersonEditExecutor.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson); - Model expectedModel = new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs()); + Model expectedModel = new ModelManager(new Notor(model.getNotor()), new UserPrefs()); expectedModel.setPerson(lastPerson, editedPerson); CommandTestUtil.assertExecuteSuccess(personEditCommand, model, expectedMessage, expectedModel); @@ -86,7 +86,7 @@ public void execute_noFieldSpecifiedUnfilteredList_success() { String expectedMessage = String.format(PersonEditExecutor.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson); - Model expectedModel = new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs()); + Model expectedModel = new ModelManager(new Notor(model.getNotor()), new UserPrefs()); CommandTestUtil.assertExecuteSuccess(personEditCommand, model, expectedMessage, expectedModel); } @@ -102,7 +102,7 @@ public void execute_filteredList_success() { String expectedMessage = String.format(PersonEditExecutor.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson); - Model expectedModel = new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs()); + Model expectedModel = new ModelManager(new Notor(model.getNotor()), new UserPrefs()); expectedModel.setPerson(model.getFilteredPersonList().get(0), editedPerson); CommandTestUtil.assertExecuteSuccess(personEditCommand, model, expectedMessage, expectedModel); @@ -121,8 +121,8 @@ public void execute_duplicatePersonUnfilteredList_failure() { public void execute_duplicatePersonFilteredList_failure() { showPersonAtIndex(model, INDEX_FIRST_PERSON); - // edit person in filtered list into a duplicate in address book - Person personInList = model.getAddressBook().getPersonList().get(INDEX_SECOND_PERSON.getZeroBased()); + // edit person in filtered list into a duplicate in notor + Person personInList = model.getNotor().getPersonList().get(INDEX_SECOND_PERSON.getZeroBased()); PersonEditCommand personEditCommand = new PersonEditCommand(INDEX_FIRST_PERSON, new PersonEditDescriptorBuilder(personInList).build()); @@ -140,14 +140,14 @@ public void execute_invalidPersonIndexUnfilteredList_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 Notor */ @Test public void execute_invalidPersonIndexFilteredList_failure() { showPersonAtIndex(model, INDEX_FIRST_PERSON); Index outOfBoundIndex = INDEX_SECOND_PERSON; - // ensures that outOfBoundIndex is still in bounds of address book list - assertTrue(outOfBoundIndex.getZeroBased() < model.getAddressBook().getPersonList().size()); + // ensures that outOfBoundIndex is still in bounds of notor list + assertTrue(outOfBoundIndex.getZeroBased() < model.getNotor().getPersonList().size()); PersonEditCommand personEditCommand = new PersonEditCommand(outOfBoundIndex, new PersonEditDescriptorBuilder().withName(VALID_NAME_BOB).build()); diff --git a/src/test/java/seedu/notor/logic/parser/AddressBookParserTest.java b/src/test/java/seedu/notor/logic/parser/NotorParserTest.java similarity index 97% rename from src/test/java/seedu/notor/logic/parser/AddressBookParserTest.java rename to src/test/java/seedu/notor/logic/parser/NotorParserTest.java index 86941f423e5..8a773549f6f 100644 --- a/src/test/java/seedu/notor/logic/parser/AddressBookParserTest.java +++ b/src/test/java/seedu/notor/logic/parser/NotorParserTest.java @@ -30,8 +30,8 @@ import seedu.notor.testutil.PersonEditDescriptorBuilder; import seedu.notor.testutil.PersonUtil; -public class AddressBookParserTest { - private final AddressBookParser parser = new AddressBookParser(); +public class NotorParserTest { + private final NotorParser parser = new NotorParser(); @Test public void parseCommand_add() throws Exception { diff --git a/src/test/java/seedu/notor/model/ModelManagerTest.java b/src/test/java/seedu/notor/model/ModelManagerTest.java index 4761fd30b73..59a6a98d775 100644 --- a/src/test/java/seedu/notor/model/ModelManagerTest.java +++ b/src/test/java/seedu/notor/model/ModelManagerTest.java @@ -17,7 +17,7 @@ import seedu.notor.commons.core.GuiSettings; import seedu.notor.model.person.NameContainsKeywordsPredicate; -import seedu.notor.testutil.AddressBookBuilder; +import seedu.notor.testutil.NotorBuilder; public class ModelManagerTest { @@ -27,7 +27,7 @@ public class ModelManagerTest { public void constructor() { assertEquals(new UserPrefs(), modelManager.getUserPrefs()); assertEquals(new GuiSettings(), modelManager.getGuiSettings()); - assertEquals(new AddressBook(), new AddressBook(modelManager.getAddressBook())); + assertEquals(new Notor(), new Notor(modelManager.getNotor())); } @Test @@ -38,14 +38,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.setNotorFilePath(Paths.get("address/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.setNotorFilePath(Paths.get("new/address/book/file/path")); assertEquals(oldUserPrefs, modelManager.getUserPrefs()); } @@ -62,15 +62,15 @@ public void setGuiSettings_validGuiSettings_setsGuiSettings() { } @Test - public void setAddressBookFilePath_nullPath_throwsNullPointerException() { - assertThrows(NullPointerException.class, () -> modelManager.setAddressBookFilePath(null)); + public void setNotorFilePath_nullPath_throwsNullPointerException() { + assertThrows(NullPointerException.class, () -> modelManager.setNotorFilePath(null)); } @Test - public void setAddressBookFilePath_validPath_setsAddressBookFilePath() { + public void setNotorFilePath_validPath_setsNotorFilePath() { Path path = Paths.get("address/book/file/path"); - modelManager.setAddressBookFilePath(path); - assertEquals(path, modelManager.getAddressBookFilePath()); + modelManager.setNotorFilePath(path); + assertEquals(path, modelManager.getNotorFilePath()); } @Test @@ -79,12 +79,12 @@ public void hasPerson_nullPerson_throwsNullPointerException() { } @Test - public void hasPerson_personNotInAddressBook_returnsFalse() { + public void hasPerson_personNotInNotor_returnsFalse() { assertFalse(modelManager.hasPerson(ALICE)); } @Test - public void hasPerson_personInAddressBook_returnsTrue() { + public void hasPerson_personInNotor_returnsTrue() { modelManager.createPerson(ALICE); assertTrue(modelManager.hasPerson(ALICE)); } @@ -96,13 +96,13 @@ public void getFilteredPersonList_modifyList_throwsUnsupportedOperationException @Test public void equals() { - AddressBook addressBook = new AddressBookBuilder().withPerson(ALICE).withPerson(BENSON).build(); - AddressBook differentAddressBook = new AddressBook(); + Notor notor = new NotorBuilder().withPerson(ALICE).withPerson(BENSON).build(); + Notor differentNotor = new Notor(); UserPrefs userPrefs = new UserPrefs(); // same values -> returns true - modelManager = new ModelManager(addressBook, userPrefs); - ModelManager modelManagerCopy = new ModelManager(addressBook, userPrefs); + modelManager = new ModelManager(notor, userPrefs); + ModelManager modelManagerCopy = new ModelManager(notor, userPrefs); assertEquals(modelManager, modelManagerCopy); // same object -> returns true @@ -114,20 +114,20 @@ public void equals() { // different types -> returns false assertNotEquals(5, modelManager); - // different addressBook -> returns false - assertNotEquals(modelManager, new ModelManager(differentAddressBook, userPrefs)); + // different notor -> returns false + assertNotEquals(modelManager, new ModelManager(differentNotor, userPrefs)); // different filteredList -> returns false String[] keywords = ALICE.getName().fullName.split("\\s+"); modelManager.updateFilteredPersonList(new NameContainsKeywordsPredicate(Arrays.asList(keywords))); - assertNotEquals(modelManager, new ModelManager(addressBook, userPrefs)); + assertNotEquals(modelManager, new ModelManager(notor, userPrefs)); // resets modelManager to initial state for upcoming tests modelManager.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS); // different userPrefs -> returns false UserPrefs differentUserPrefs = new UserPrefs(); - differentUserPrefs.setAddressBookFilePath(Paths.get("differentFilePath")); - assertNotEquals(modelManager, new ModelManager(addressBook, differentUserPrefs)); + differentUserPrefs.setNotorFilePath(Paths.get("differentFilePath")); + assertNotEquals(modelManager, new ModelManager(notor, differentUserPrefs)); } } diff --git a/src/test/java/seedu/notor/model/AddressBookTest.java b/src/test/java/seedu/notor/model/NotorTest.java similarity index 58% rename from src/test/java/seedu/notor/model/AddressBookTest.java rename to src/test/java/seedu/notor/model/NotorTest.java index e4bdd4c9e02..05c570d19eb 100644 --- a/src/test/java/seedu/notor/model/AddressBookTest.java +++ b/src/test/java/seedu/notor/model/NotorTest.java @@ -6,7 +6,7 @@ import static seedu.notor.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND; import static seedu.notor.testutil.Assert.assertThrows; import static seedu.notor.testutil.TypicalPersons.ALICE; -import static seedu.notor.testutil.TypicalPersons.getTypicalAddressBook; +import static seedu.notor.testutil.TypicalPersons.getTypicalNotor; import java.util.Collection; import java.util.Collections; @@ -22,63 +22,63 @@ import seedu.notor.testutil.PersonBuilder; -public class AddressBookTest { +public class NotorTest { - private final AddressBook addressBook = new AddressBook(); + private final Notor notor = new Notor(); @Test public void constructor() { - assertEquals(Collections.emptyList(), addressBook.getPersonList()); + assertEquals(Collections.emptyList(), notor.getPersonList()); } @Test public void resetData_null_throwsNullPointerException() { - assertThrows(NullPointerException.class, () -> addressBook.resetData(null)); + assertThrows(NullPointerException.class, () -> notor.resetData(null)); } @Test - public void resetData_withValidReadOnlyAddressBook_replacesData() { - AddressBook newData = getTypicalAddressBook(); - addressBook.resetData(newData); - assertEquals(newData, addressBook); + public void resetData_withValidReadOnlyNotor_replacesData() { + Notor newData = getTypicalNotor(); + notor.resetData(newData); + assertEquals(newData, notor); } @Test public void hasPerson_nullPerson_throwsNullPointerException() { - assertThrows(NullPointerException.class, () -> addressBook.hasPerson(null)); + assertThrows(NullPointerException.class, () -> notor.hasPerson(null)); } @Test - public void hasPerson_personNotInAddressBook_returnsFalse() { - assertFalse(addressBook.hasPerson(ALICE)); + public void hasPerson_personNotInNotor_returnsFalse() { + assertFalse(notor.hasPerson(ALICE)); } @Test - public void hasPerson_personInAddressBook_returnsTrue() { - addressBook.addPerson(ALICE); - assertTrue(addressBook.hasPerson(ALICE)); + public void hasPerson_personInNotor_returnsTrue() { + notor.addPerson(ALICE); + assertTrue(notor.hasPerson(ALICE)); } @Test - public void hasPerson_personWithSameIdentityFieldsInAddressBook_returnsTrue() { - addressBook.addPerson(ALICE); + public void hasPerson_personWithSameIdentityFieldsInNotor_returnsTrue() { + notor.addPerson(ALICE); Person editedAlice = new PersonBuilder(ALICE).withTags(VALID_TAG_HUSBAND) .build(); - assertTrue(addressBook.hasPerson(editedAlice)); + assertTrue(notor.hasPerson(editedAlice)); } @Test public void getPersonList_modifyList_throwsUnsupportedOperationException() { - assertThrows(UnsupportedOperationException.class, () -> addressBook.getPersonList().remove(0)); + assertThrows(UnsupportedOperationException.class, () -> notor.getPersonList().remove(0)); } /** - * A stub ReadOnlyAddressBook whose persons list can violate interface constraints. + * A stub ReadOnlyNotor whose persons list can violate interface constraints. */ - private static class AddressBookStub implements ReadOnlyAddressBook { + private static class NotorStub implements ReadOnlyNotor { private final ObservableList persons = FXCollections.observableArrayList(); - AddressBookStub(Collection persons) { + NotorStub(Collection persons) { this.persons.setAll(persons); } diff --git a/src/test/java/seedu/notor/model/UserPrefsTest.java b/src/test/java/seedu/notor/model/UserPrefsTest.java index 375f357e43c..11c910d0276 100644 --- a/src/test/java/seedu/notor/model/UserPrefsTest.java +++ b/src/test/java/seedu/notor/model/UserPrefsTest.java @@ -13,9 +13,9 @@ public void setGuiSettings_nullGuiSettings_throwsNullPointerException() { } @Test - public void setAddressBookFilePath_nullPath_throwsNullPointerException() { + public void setNotorFilePath_nullPath_throwsNullPointerException() { UserPrefs userPrefs = new UserPrefs(); - assertThrows(NullPointerException.class, () -> userPrefs.setAddressBookFilePath(null)); + assertThrows(NullPointerException.class, () -> userPrefs.setNotorFilePath(null)); } } diff --git a/src/test/java/seedu/notor/storage/JsonAddressBookStorageTest.java b/src/test/java/seedu/notor/storage/JsonAddressBookStorageTest.java deleted file mode 100644 index 4b866db04fc..00000000000 --- a/src/test/java/seedu/notor/storage/JsonAddressBookStorageTest.java +++ /dev/null @@ -1,110 +0,0 @@ -package seedu.notor.storage; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static seedu.notor.testutil.Assert.assertThrows; -import static seedu.notor.testutil.TypicalPersons.ALICE; -import static seedu.notor.testutil.TypicalPersons.HOON; -import static seedu.notor.testutil.TypicalPersons.IDA; -import static seedu.notor.testutil.TypicalPersons.getTypicalAddressBook; - -import java.io.IOException; -import java.nio.file.Path; -import java.nio.file.Paths; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.io.TempDir; - -import seedu.notor.commons.exceptions.DataConversionException; -import seedu.notor.model.AddressBook; -import seedu.notor.model.ReadOnlyAddressBook; - -public class JsonAddressBookStorageTest { - private static final Path TEST_DATA_FOLDER = Paths.get("src", "test", "data", "JsonAddressBookStorageTest"); - - @TempDir - public Path testFolder; - - @Test - public void readAddressBook_nullFilePath_throwsNullPointerException() { - assertThrows(NullPointerException.class, () -> readAddressBook(null)); - } - - private java.util.Optional readAddressBook(String filePath) throws Exception { - return new JsonAddressBookStorage(Paths.get(filePath)).readAddressBook(addToTestDataPathIfNotNull(filePath)); - } - - private Path addToTestDataPathIfNotNull(String prefsFileInTestDataFolder) { - return prefsFileInTestDataFolder != null - ? TEST_DATA_FOLDER.resolve(prefsFileInTestDataFolder) - : null; - } - - @Test - public void read_missingFile_emptyResult() throws Exception { - assertFalse(readAddressBook("NonExistentFile.json").isPresent()); - } - - @Test - public void read_notJsonFormat_exceptionThrown() { - assertThrows(DataConversionException.class, () -> readAddressBook("notJsonFormatAddressBook.json")); - } - - @Test - public void readAddressBook_invalidPersonAddressBook_throwDataConversionException() { - assertThrows(DataConversionException.class, () -> readAddressBook("invalidPersonAddressBook.json")); - } - - @Test - public void readAddressBook_invalidAndValidPersonAddressBook_throwDataConversionException() { - assertThrows(DataConversionException.class, () -> readAddressBook("invalidAndValidPersonAddressBook.json")); - } - - @Test - public void readAndSaveAddressBook_allInOrder_success() throws Exception { - Path filePath = testFolder.resolve("TempAddressBook.json"); - AddressBook original = getTypicalAddressBook(); - JsonAddressBookStorage jsonAddressBookStorage = new JsonAddressBookStorage(filePath); - - // Save in new file and read back - jsonAddressBookStorage.saveAddressBook(original, filePath); - ReadOnlyAddressBook readBack = jsonAddressBookStorage.readAddressBook(filePath).get(); - assertEquals(original, new AddressBook(readBack)); - - // Modify data, overwrite exiting file, and read back - original.addPerson(HOON); - original.removePerson(ALICE); - jsonAddressBookStorage.saveAddressBook(original, filePath); - readBack = jsonAddressBookStorage.readAddressBook(filePath).get(); - assertEquals(original, new AddressBook(readBack)); - - // Save and read without specifying file path - original.addPerson(IDA); - jsonAddressBookStorage.saveAddressBook(original); // file path not specified - readBack = jsonAddressBookStorage.readAddressBook().get(); // file path not specified - assertEquals(original, new AddressBook(readBack)); - - } - - @Test - public void saveAddressBook_nullAddressBook_throwsNullPointerException() { - assertThrows(NullPointerException.class, () -> saveAddressBook(null, "SomeFile.json")); - } - - /** - * Saves {@code addressBook} at the specified {@code filePath}. - */ - private void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) { - try { - new JsonAddressBookStorage(Paths.get(filePath)) - .saveAddressBook(addressBook, addToTestDataPathIfNotNull(filePath)); - } catch (IOException ioe) { - throw new AssertionError("There should not be an error writing to the file.", ioe); - } - } - - @Test - public void saveAddressBook_nullFilePath_throwsNullPointerException() { - assertThrows(NullPointerException.class, () -> saveAddressBook(new AddressBook(), null)); - } -} diff --git a/src/test/java/seedu/notor/storage/JsonNotorStorageTest.java b/src/test/java/seedu/notor/storage/JsonNotorStorageTest.java new file mode 100644 index 00000000000..30030d80a31 --- /dev/null +++ b/src/test/java/seedu/notor/storage/JsonNotorStorageTest.java @@ -0,0 +1,110 @@ +package seedu.notor.storage; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static seedu.notor.testutil.Assert.assertThrows; +import static seedu.notor.testutil.TypicalPersons.ALICE; +import static seedu.notor.testutil.TypicalPersons.HOON; +import static seedu.notor.testutil.TypicalPersons.IDA; +import static seedu.notor.testutil.TypicalPersons.getTypicalNotor; + +import java.io.IOException; +import java.nio.file.Path; +import java.nio.file.Paths; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; + +import seedu.notor.commons.exceptions.DataConversionException; +import seedu.notor.model.Notor; +import seedu.notor.model.ReadOnlyNotor; + +public class JsonNotorStorageTest { + private static final Path TEST_DATA_FOLDER = Paths.get("src", "test", "data", "JsonNotorStorageTest"); + + @TempDir + public Path testFolder; + + @Test + public void readNotor_nullFilePath_throwsNullPointerException() { + assertThrows(NullPointerException.class, () -> readNotor(null)); + } + + private java.util.Optional readNotor(String filePath) throws Exception { + return new JsonNotorStorage(Paths.get(filePath)).readNotor(addToTestDataPathIfNotNull(filePath)); + } + + private Path addToTestDataPathIfNotNull(String prefsFileInTestDataFolder) { + return prefsFileInTestDataFolder != null + ? TEST_DATA_FOLDER.resolve(prefsFileInTestDataFolder) + : null; + } + + @Test + public void read_missingFile_emptyResult() throws Exception { + assertFalse(readNotor("NonExistentFile.json").isPresent()); + } + + @Test + public void read_notJsonFormat_exceptionThrown() { + assertThrows(DataConversionException.class, () -> readNotor("notJsonFormatNotor.json")); + } + + @Test + public void readNotor_invalidPersonNotor_throwDataConversionException() { + assertThrows(DataConversionException.class, () -> readNotor("invalidPersonNotor.json")); + } + + @Test + public void readNotor_invalidAndValidPersonNotor_throwDataConversionException() { + assertThrows(DataConversionException.class, () -> readNotor("invalidAndValidPersonNotor.json")); + } + + @Test + public void readAndSaveNotor_allInOrder_success() throws Exception { + Path filePath = testFolder.resolve("TempNotor.json"); + Notor original = getTypicalNotor(); + JsonNotorStorage jsonNotorStorage = new JsonNotorStorage(filePath); + + // Save in new file and read back + jsonNotorStorage.saveNotor(original, filePath); + ReadOnlyNotor readBack = jsonNotorStorage.readNotor(filePath).get(); + assertEquals(original, new Notor(readBack)); + + // Modify data, overwrite exiting file, and read back + original.addPerson(HOON); + original.removePerson(ALICE); + jsonNotorStorage.saveNotor(original, filePath); + readBack = jsonNotorStorage.readNotor(filePath).get(); + assertEquals(original, new Notor(readBack)); + + // Save and read without specifying file path + original.addPerson(IDA); + jsonNotorStorage.saveNotor(original); // file path not specified + readBack = jsonNotorStorage.readNotor().get(); // file path not specified + assertEquals(original, new Notor(readBack)); + + } + + @Test + public void saveNotor_nullNotor_throwsNullPointerException() { + assertThrows(NullPointerException.class, () -> saveNotor(null, "SomeFile.json")); + } + + /** + * Saves {@code Notor} at the specified {@code filePath}. + */ + private void saveNotor(ReadOnlyNotor notor, String filePath) { + try { + new JsonNotorStorage(Paths.get(filePath)) + .saveNotor(notor, addToTestDataPathIfNotNull(filePath)); + } catch (IOException ioe) { + throw new AssertionError("There should not be an error writing to the file.", ioe); + } + } + + @Test + public void saveNotor_nullFilePath_throwsNullPointerException() { + assertThrows(NullPointerException.class, () -> saveNotor(new Notor(), null)); + } +} diff --git a/src/test/java/seedu/notor/storage/JsonSerializableAddressBookTest.java b/src/test/java/seedu/notor/storage/JsonSerializableNotorTest.java similarity index 53% rename from src/test/java/seedu/notor/storage/JsonSerializableAddressBookTest.java rename to src/test/java/seedu/notor/storage/JsonSerializableNotorTest.java index 3dd200b0488..168d41322d1 100644 --- a/src/test/java/seedu/notor/storage/JsonSerializableAddressBookTest.java +++ b/src/test/java/seedu/notor/storage/JsonSerializableNotorTest.java @@ -10,37 +10,37 @@ import seedu.notor.commons.exceptions.IllegalValueException; import seedu.notor.commons.util.JsonUtil; -import seedu.notor.model.AddressBook; +import seedu.notor.model.Notor; import seedu.notor.testutil.TypicalPersons; -public class JsonSerializableAddressBookTest { +public class JsonSerializableNotorTest { - private static final Path TEST_DATA_FOLDER = Paths.get("src", "test", "data", "JsonSerializableAddressBookTest"); - private static final Path TYPICAL_PERSONS_FILE = TEST_DATA_FOLDER.resolve("typicalPersonsAddressBook.json"); - private static final Path INVALID_PERSON_FILE = TEST_DATA_FOLDER.resolve("invalidPersonAddressBook.json"); - private static final Path DUPLICATE_PERSON_FILE = TEST_DATA_FOLDER.resolve("duplicatePersonAddressBook.json"); + private static final Path TEST_DATA_FOLDER = Paths.get("src", "test", "data", "JsonSerializableNotorTest"); + private static final Path TYPICAL_PERSONS_FILE = TEST_DATA_FOLDER.resolve("typicalPersonsNotor.json"); + private static final Path INVALID_PERSON_FILE = TEST_DATA_FOLDER.resolve("invalidPersonNotor.json"); + private static final Path DUPLICATE_PERSON_FILE = TEST_DATA_FOLDER.resolve("duplicatePersonNotor.json"); @Test public void toModelType_typicalPersonsFile_success() throws Exception { - JsonSerializableAddressBook dataFromFile = JsonUtil.readJsonFile(TYPICAL_PERSONS_FILE, - JsonSerializableAddressBook.class).get(); - AddressBook addressBookFromFile = dataFromFile.toModelType(); - AddressBook typicalPersonsAddressBook = TypicalPersons.getTypicalAddressBook(); - assertEquals(addressBookFromFile, typicalPersonsAddressBook); + JsonSerializableNotor dataFromFile = JsonUtil.readJsonFile(TYPICAL_PERSONS_FILE, + JsonSerializableNotor.class).get(); + Notor notorFromFile = dataFromFile.toModelType(); + Notor typicalPersonsNotor = TypicalPersons.getTypicalNotor(); + assertEquals(notorFromFile, typicalPersonsNotor); } @Test public void toModelType_invalidPersonFile_throwsIllegalValueException() throws Exception { - JsonSerializableAddressBook dataFromFile = JsonUtil.readJsonFile(INVALID_PERSON_FILE, - JsonSerializableAddressBook.class).get(); + JsonSerializableNotor dataFromFile = JsonUtil.readJsonFile(INVALID_PERSON_FILE, + JsonSerializableNotor.class).get(); assertThrows(IllegalValueException.class, dataFromFile::toModelType); } @Test public void toModelType_duplicatePersons_throwsIllegalValueException() throws Exception { - JsonSerializableAddressBook dataFromFile = JsonUtil.readJsonFile(DUPLICATE_PERSON_FILE, - JsonSerializableAddressBook.class).get(); - assertThrows(IllegalValueException.class, JsonSerializableAddressBook.MESSAGE_DUPLICATE_PERSON, + JsonSerializableNotor dataFromFile = JsonUtil.readJsonFile(DUPLICATE_PERSON_FILE, + JsonSerializableNotor.class).get(); + assertThrows(IllegalValueException.class, JsonSerializableNotor.MESSAGE_DUPLICATE_PERSON, dataFromFile::toModelType); } diff --git a/src/test/java/seedu/notor/storage/JsonUserPrefsStorageTest.java b/src/test/java/seedu/notor/storage/JsonUserPrefsStorageTest.java index e962d750d11..f7fc4ced826 100644 --- a/src/test/java/seedu/notor/storage/JsonUserPrefsStorageTest.java +++ b/src/test/java/seedu/notor/storage/JsonUserPrefsStorageTest.java @@ -73,7 +73,7 @@ public void readUserPrefs_extraValuesInFile_extraValuesIgnored() throws DataConv private UserPrefs getTypicalUserPrefs() { UserPrefs userPrefs = new UserPrefs(); userPrefs.setGuiSettings(new GuiSettings(1000, 500, 300, 100)); - userPrefs.setAddressBookFilePath(Paths.get("notor.json")); + userPrefs.setNotorFilePath(Paths.get("data/notor.json")); return userPrefs; } diff --git a/src/test/java/seedu/notor/storage/StorageManagerTest.java b/src/test/java/seedu/notor/storage/StorageManagerTest.java index 84461cb7aeb..5b031adaee3 100644 --- a/src/test/java/seedu/notor/storage/StorageManagerTest.java +++ b/src/test/java/seedu/notor/storage/StorageManagerTest.java @@ -2,7 +2,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; -import static seedu.notor.testutil.TypicalPersons.getTypicalAddressBook; +import static seedu.notor.testutil.TypicalPersons.getTypicalNotor; import java.nio.file.Path; @@ -11,8 +11,8 @@ import org.junit.jupiter.api.io.TempDir; import seedu.notor.commons.core.GuiSettings; -import seedu.notor.model.AddressBook; -import seedu.notor.model.ReadOnlyAddressBook; +import seedu.notor.model.Notor; +import seedu.notor.model.ReadOnlyNotor; import seedu.notor.model.UserPrefs; public class StorageManagerTest { @@ -24,9 +24,9 @@ public class StorageManagerTest { @BeforeEach public void setUp() { - JsonAddressBookStorage addressBookStorage = new JsonAddressBookStorage(getTempFilePath("ab")); + JsonNotorStorage notorStorage = new JsonNotorStorage(getTempFilePath("ab")); JsonUserPrefsStorage userPrefsStorage = new JsonUserPrefsStorage(getTempFilePath("prefs")); - storageManager = new StorageManager(addressBookStorage, userPrefsStorage); + storageManager = new StorageManager(notorStorage, userPrefsStorage); } private Path getTempFilePath(String fileName) { @@ -48,21 +48,21 @@ public void prefsReadSave() throws Exception { } @Test - public void addressBookReadSave() throws Exception { + public void notorReadSave() throws Exception { /* * Note: This is an integration test that verifies the StorageManager is properly wired to the - * {@link JsonAddressBookStorage} class. - * More extensive testing of UserPref saving/reading is done in {@link JsonAddressBookStorageTest} class. + * {@link JsonNotorStorage} class. + * More extensive testing of UserPref saving/reading is done in {@link JsonNotorStorageTest} class. */ - AddressBook original = getTypicalAddressBook(); - storageManager.saveAddressBook(original); - ReadOnlyAddressBook retrieved = storageManager.readAddressBook().get(); - assertEquals(original, new AddressBook(retrieved)); + Notor original = getTypicalNotor(); + storageManager.saveNotor(original); + ReadOnlyNotor retrieved = storageManager.readNotor().get(); + assertEquals(original, new Notor(retrieved)); } @Test - public void getAddressBookFilePath() { - assertNotNull(storageManager.getAddressBookFilePath()); + public void getNotorFilePath() { + assertNotNull(storageManager.getNotorFilePath()); } } diff --git a/src/test/java/seedu/notor/testutil/AddressBookBuilder.java b/src/test/java/seedu/notor/testutil/AddressBookBuilder.java deleted file mode 100644 index 081ac6889e5..00000000000 --- a/src/test/java/seedu/notor/testutil/AddressBookBuilder.java +++ /dev/null @@ -1,34 +0,0 @@ -package seedu.notor.testutil; - -import seedu.notor.model.AddressBook; -import seedu.notor.model.person.Person; - -/** - * A utility class to help with building Addressbook objects. - * Example usage:
- * {@code AddressBook ab = new AddressBookBuilder().withPerson("John", "Doe").build();} - */ -public class AddressBookBuilder { - - private final AddressBook addressBook; - - public AddressBookBuilder() { - addressBook = new AddressBook(); - } - - public AddressBookBuilder(AddressBook addressBook) { - this.addressBook = addressBook; - } - - /** - * Adds a new {@code Person} to the {@code AddressBook} that we are building. - */ - public AddressBookBuilder withPerson(Person person) { - addressBook.addPerson(person); - return this; - } - - public AddressBook build() { - return addressBook; - } -} diff --git a/src/test/java/seedu/notor/testutil/NotorBuilder.java b/src/test/java/seedu/notor/testutil/NotorBuilder.java new file mode 100644 index 00000000000..ddf484f8572 --- /dev/null +++ b/src/test/java/seedu/notor/testutil/NotorBuilder.java @@ -0,0 +1,34 @@ +package seedu.notor.testutil; + +import seedu.notor.model.Notor; +import seedu.notor.model.person.Person; + +/** + * A utility class to help with building Notor objects. + * Example usage:
+ * {@code Notor ab = new NotorBuilder().withPerson("John", "Doe").build();} + */ +public class NotorBuilder { + + private final Notor notor; + + public NotorBuilder() { + notor = new Notor(); + } + + public NotorBuilder(Notor notor) { + this.notor = notor; + } + + /** + * Adds a new {@code Person} to the {@code Notor} that we are building. + */ + public NotorBuilder withPerson(Person person) { + notor.addPerson(person); + return this; + } + + public Notor build() { + return notor; + } +} diff --git a/src/test/java/seedu/notor/testutil/TypicalPersons.java b/src/test/java/seedu/notor/testutil/TypicalPersons.java index 6e4d87aa191..578f5c9fe88 100644 --- a/src/test/java/seedu/notor/testutil/TypicalPersons.java +++ b/src/test/java/seedu/notor/testutil/TypicalPersons.java @@ -13,7 +13,7 @@ import java.util.Arrays; import java.util.List; -import seedu.notor.model.AddressBook; +import seedu.notor.model.Notor; import seedu.notor.model.group.SubGroup; import seedu.notor.model.group.SuperGroup; import seedu.notor.model.person.Person; @@ -76,10 +76,10 @@ public class TypicalPersons { private TypicalPersons() {} // prevents instantiation /** - * Returns an {@code AddressBook} with all the typical persons. + * Returns an {@code Notor} with all the typical persons. */ - public static AddressBook getTypicalAddressBook() { - AddressBook ab = new AddressBook(); + public static Notor getTypicalNotor() { + Notor ab = new Notor(); for (SuperGroup superGroup: TypicalGroups.getSuperGroups()) { ab.addSuperGroup(superGroup); } From ada51ab534b14ede3138d8618fcc6c76d880c1c4 Mon Sep 17 00:00:00 2001 From: Hannah Chia Date: Thu, 14 Oct 2021 15:24:31 +0800 Subject: [PATCH 6/6] Style: Fix Check-style Errors --- src/main/java/seedu/notor/MainApp.java | 4 ++-- src/main/java/seedu/notor/logic/commands/ClearCommand.java | 2 +- src/main/java/seedu/notor/model/Model.java | 7 ++++--- .../java/seedu/notor/logic/commands/ClearCommandTest.java | 2 +- .../java/seedu/notor/logic/commands/CommandTestUtil.java | 2 +- .../notor/logic/commands/PersonCreateCommandTest.java | 2 +- .../seedu/notor/logic/commands/PersonEditCommandTest.java | 2 +- 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/main/java/seedu/notor/MainApp.java b/src/main/java/seedu/notor/MainApp.java index b02c2472b33..6220df5df8b 100644 --- a/src/main/java/seedu/notor/MainApp.java +++ b/src/main/java/seedu/notor/MainApp.java @@ -17,16 +17,16 @@ import seedu.notor.logic.Logic; import seedu.notor.logic.LogicManager; import seedu.notor.logic.executors.Executor; -import seedu.notor.model.Notor; import seedu.notor.model.Model; import seedu.notor.model.ModelManager; +import seedu.notor.model.Notor; import seedu.notor.model.ReadOnlyNotor; import seedu.notor.model.ReadOnlyUserPrefs; import seedu.notor.model.UserPrefs; import seedu.notor.model.util.SampleDataUtil; import seedu.notor.storage.JsonNotorStorage; -import seedu.notor.storage.NotorStorage; import seedu.notor.storage.JsonUserPrefsStorage; +import seedu.notor.storage.NotorStorage; import seedu.notor.storage.Storage; import seedu.notor.storage.StorageManager; import seedu.notor.storage.UserPrefsStorage; diff --git a/src/main/java/seedu/notor/logic/commands/ClearCommand.java b/src/main/java/seedu/notor/logic/commands/ClearCommand.java index d5e8ba241ce..99b14f7e6f4 100644 --- a/src/main/java/seedu/notor/logic/commands/ClearCommand.java +++ b/src/main/java/seedu/notor/logic/commands/ClearCommand.java @@ -2,8 +2,8 @@ import static java.util.Objects.requireNonNull; -import seedu.notor.model.Notor; import seedu.notor.model.Model; +import seedu.notor.model.Notor; /** * Clears Notor of all entries diff --git a/src/main/java/seedu/notor/model/Model.java b/src/main/java/seedu/notor/model/Model.java index 863830ea2cd..70491d5849d 100644 --- a/src/main/java/seedu/notor/model/Model.java +++ b/src/main/java/seedu/notor/model/Model.java @@ -20,8 +20,9 @@ public interface Model { // TODO: List // Predicate PREDICATE_SHOW_ALL_GROUPS = unused -> true; - + //=========== UserPrefs ================================================================================== + /** * Replaces user prefs data with the data in {@code userPrefs}. */ @@ -51,9 +52,9 @@ public interface Model { * Sets the user prefs' address book file path. */ void setNotorFilePath(Path notorFilePath); - + //=========== Notor ===================================================================================== - + /** * Replaces Notor data (of the list) with the data in {@code notor}. */ diff --git a/src/test/java/seedu/notor/logic/commands/ClearCommandTest.java b/src/test/java/seedu/notor/logic/commands/ClearCommandTest.java index 4e9f9a28274..e85a173dbe0 100644 --- a/src/test/java/seedu/notor/logic/commands/ClearCommandTest.java +++ b/src/test/java/seedu/notor/logic/commands/ClearCommandTest.java @@ -4,9 +4,9 @@ import org.junit.jupiter.api.Test; -import seedu.notor.model.Notor; import seedu.notor.model.Model; import seedu.notor.model.ModelManager; +import seedu.notor.model.Notor; import seedu.notor.model.UserPrefs; public class ClearCommandTest { diff --git a/src/test/java/seedu/notor/logic/commands/CommandTestUtil.java b/src/test/java/seedu/notor/logic/commands/CommandTestUtil.java index 134324e1a18..65a59fc8b16 100644 --- a/src/test/java/seedu/notor/logic/commands/CommandTestUtil.java +++ b/src/test/java/seedu/notor/logic/commands/CommandTestUtil.java @@ -15,8 +15,8 @@ import seedu.notor.logic.commands.exceptions.CommandException; import seedu.notor.logic.executors.exceptions.ExecuteException; import seedu.notor.logic.executors.person.PersonEditExecutor; -import seedu.notor.model.Notor; import seedu.notor.model.Model; +import seedu.notor.model.Notor; import seedu.notor.model.person.NameContainsKeywordsPredicate; import seedu.notor.model.person.Person; import seedu.notor.testutil.PersonEditDescriptorBuilder; diff --git a/src/test/java/seedu/notor/logic/commands/PersonCreateCommandTest.java b/src/test/java/seedu/notor/logic/commands/PersonCreateCommandTest.java index ad92ead76a8..a05f6eb3719 100644 --- a/src/test/java/seedu/notor/logic/commands/PersonCreateCommandTest.java +++ b/src/test/java/seedu/notor/logic/commands/PersonCreateCommandTest.java @@ -20,8 +20,8 @@ import seedu.notor.logic.executors.exceptions.ExecuteException; import seedu.notor.logic.executors.person.PersonCreateExecutor; import seedu.notor.logic.parser.exceptions.ParseException; -import seedu.notor.model.Notor; import seedu.notor.model.Model; +import seedu.notor.model.Notor; import seedu.notor.model.ReadOnlyNotor; import seedu.notor.model.ReadOnlyUserPrefs; import seedu.notor.model.group.SubGroup; diff --git a/src/test/java/seedu/notor/logic/commands/PersonEditCommandTest.java b/src/test/java/seedu/notor/logic/commands/PersonEditCommandTest.java index a4b35fc1638..8a9fc5cd2be 100644 --- a/src/test/java/seedu/notor/logic/commands/PersonEditCommandTest.java +++ b/src/test/java/seedu/notor/logic/commands/PersonEditCommandTest.java @@ -23,9 +23,9 @@ import seedu.notor.logic.executors.Executor; import seedu.notor.logic.executors.person.PersonEditExecutor; import seedu.notor.logic.executors.person.PersonEditExecutor.PersonEditDescriptor; -import seedu.notor.model.Notor; import seedu.notor.model.Model; import seedu.notor.model.ModelManager; +import seedu.notor.model.Notor; import seedu.notor.model.UserPrefs; import seedu.notor.model.person.Person; import seedu.notor.testutil.PersonBuilder;