diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 45f44d48cb6..30da19148ea 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -305,6 +305,10 @@ The command execution flow is as given below 6. Based on the filtered elderly and volunteers a predicate to get the related pairs is created and ```updateFilteredPairList``` of ```Model``` is called. 7. ```CommandResult``` with the sizes of the 3 filtered lists is created and returned. +The class diagram below shows the relation of predicates to ```FindCommandParser``` and ```FindCommand```. + + + Design decisions: - Name, address, email, phone, tags and medical qualification attributes allow substring searching. - Easier to search with only partial information available. @@ -666,7 +670,7 @@ Preconditions: Person is already in FL. Use case ends. -**Use case: UC09- Find person and related pairs** +**Use case: UC10- Find person and related pairs** **MSS** @@ -681,7 +685,9 @@ Preconditions: Person is already in FL. * 1a. FL detects missing arguments or an error in the entered command. * 1a1. FL feedbacks that entered command is incorrect. -**Use case: UC10- View all persons and pairs** + Use case ends. + +**Use case: UC11- View all persons and pairs** **MSS** @@ -696,7 +702,43 @@ Preconditions: Person is already in FL. * 1a. FL detects missing arguments or an error in the entered command. * 1a1. FL feedbacks that entered command is incorrect. -**Use case: UC11- View statistics** + Use case ends. + +**Use case: UC12- View paired persons** + +**MSS** + +1. User enters the command to list all paired persons. +2. FL shows all the paired elderly, paired volunteers and all pairs. +3. User sees all paired persons and all pairs in FL. + + Use case ends. + +**Extensions** + +* 1a. FL detects missing arguments or an error in the entered command. + * 1a1. FL feedbacks that entered command is incorrect. + + Use case ends. + +**Use case: UC13- View unpaired persons** + +**MSS** + +1. User enters the command to list all unpaired persons. +2. FL shows all the unpaired elderly, unpaired volunteers and all pairs. +3. User sees all unpaired persons and all pairs in FL. + + Use case ends. + +**Extensions** + +* 1a. FL detects missing arguments or an error in the entered command. + * 1a1. FL feedbacks that entered command is incorrect. + + Use case ends. + +**Use case: UC14- View statistics** **MSS** @@ -711,7 +753,9 @@ Preconditions: Person is already in FL. * 1a. FL detects an error in the entered command. * 1a1. FL feedbacks that entered command is incorrect. -**Use case: UC12- Look up Help Page** + Use case ends. + +**Use case: UC15- Look up Help Page** **MSS** @@ -726,7 +770,9 @@ Preconditions: Person is already in FL. * 1a. FL detects an error in the entered command. * 1a1. FL feedbacks that entered command is incorrect. -**Use case: UC13- Exit the app** + Use case ends. + +**Use case: UC16- Exit the app** **MSS** @@ -741,6 +787,8 @@ Preconditions: Person is already in FL. * 1a. FL detects an error in the entered command. * 1a1. FL feedbacks that entered command is incorrect. + Use case ends. + ### Non-Functional Requirements 1. FriendlyLink should work on Microsoft Windows, macOS, and Linux that has `Java 11` is installed. diff --git a/docs/Logging.md b/docs/Logging.md index 5e4fb9bc217..0317922e8b2 100644 --- a/docs/Logging.md +++ b/docs/Logging.md @@ -7,5 +7,3 @@ title: Logging guide * The `LogsCenter` class is used to manage the logging levels and logging destinations. * The `Logger` for a class can be obtained using `LogsCenter.getLogger(Class)` which will log messages according to the specified logging level. * Log messages are output through the console and to a `.log` file. -* The output logging level can be controlled using the `logLevel` setting in the configuration file (See the [Configuration guide](Configuration.md) section). -* **When choosing a level for a log message**, follow the conventions given in [_[se-edu/guides] Java: Logging conventions_](https://se-education.org/guides/conventions/java/logging.html). diff --git a/docs/diagrams/developerGuide/FindCommandClassDiagram.puml b/docs/diagrams/developerGuide/FindCommandClassDiagram.puml new file mode 100644 index 00000000000..e1b858ff512 --- /dev/null +++ b/docs/diagrams/developerGuide/FindCommandClassDiagram.puml @@ -0,0 +1,22 @@ +@startuml +!include ../style.puml +skinparam arrowThickness 1.1 +skinparam arrowColor LOGIC_COLOR_T4 +skinparam classBackgroundColor LOGIC_COLOR + +package Find { +Class FindCommandParser +Class "<> \n Predicate" +Class XYZPredicate +Class FindCommand +} + +XYZPredicate .up|> "<> \n Predicate" +FindCommand .> XYZPredicate : Filter with > +FindCommandParser .down> XYZPredicate : Creates > +FindCommandParser .down> FindCommand : Creates > +"<> \n Predicate" -[hidden]down- FindCommand + +note right of XYZPredicate: XYZPredicate = \nAddressContainsKeywordPredicate, \nRiskLevelIsEqualPredicate, etc + +@enduml diff --git a/docs/diagrams/FindSequenceDiagram.puml b/docs/diagrams/developerGuide/FindSequenceDiagram.puml similarity index 100% rename from docs/diagrams/FindSequenceDiagram.puml rename to docs/diagrams/developerGuide/FindSequenceDiagram.puml diff --git a/docs/images/developerGuide/FindCommandClassDiagram.png b/docs/images/developerGuide/FindCommandClassDiagram.png new file mode 100644 index 00000000000..b0e44736213 Binary files /dev/null and b/docs/images/developerGuide/FindCommandClassDiagram.png differ diff --git a/docs/team/wz2k.md b/docs/team/wz2k.md index cd3ebc795b6..dece05f2119 100644 --- a/docs/team/wz2k.md +++ b/docs/team/wz2k.md @@ -23,6 +23,7 @@ Given below are my contributions to the project. * **Project management**: * Kept track of deadlines. + * Managed releases `v1.4` and `v1.4.demo` on GitHub. * **Enhancements to existing features**: * Refactor most of AB3's person related stuff into FriendlyLink's elderly and volunteer version. (Pull requests [\#81](https://github.com/AY2223S2-CS2103T-W12-1/tp/pull/81)) @@ -35,7 +36,8 @@ Given below are my contributions to the project. * Added documentation for the features `list` and `find`. * Changed documentation of `edit` feature to `edit_elderly` and `edit_volunteer` features. * Developer Guide: - * Added implementation details of the `find` feature. + * Added implementation details of the `find` feature with 2 types of UML diagrams. + * Added instructions for manual testing in appendix. * **Community**: * PRs reviewed (with non-trivial review comments): [\#89](https://github.com/AY2223S2-CS2103T-W12-1/tp/pull/89), [\#126](https://github.com/AY2223S2-CS2103T-W12-1/tp/pull/126) diff --git a/src/test/java/seedu/address/commons/util/JsonUtilTest.java b/src/test/java/seedu/address/commons/util/JsonUtilTest.java index d4907539dee..3aec626c4e7 100644 --- a/src/test/java/seedu/address/commons/util/JsonUtilTest.java +++ b/src/test/java/seedu/address/commons/util/JsonUtilTest.java @@ -39,7 +39,4 @@ public void deserializeObjectFromJsonFile_noExceptionThrown() throws IOException assertEquals(serializableTestClass.getMapOfIntegerToString(), SerializableTestClass.getHashMapTestValues()); } - //TODO: @Test jsonUtil_readJsonStringToObjectInstance_correctObject() - - //TODO: @Test jsonUtil_writeThenReadObjectToJson_correctObject() } diff --git a/src/test/java/seedu/address/logic/commands/FindCommandTest.java b/src/test/java/seedu/address/logic/commands/FindCommandTest.java index cd60b0fc7d0..09fdaa57734 100644 --- a/src/test/java/seedu/address/logic/commands/FindCommandTest.java +++ b/src/test/java/seedu/address/logic/commands/FindCommandTest.java @@ -135,8 +135,6 @@ public void execute_fourFieldsSpecified_success() { assertCommandSuccess(command, model, expectedMessage, expectedModel); } - // TODO: all volunteer field specified after adding medical qualification attribute - @Test public void execute_allElderlyFieldsSpecified_success() { String expectedMessage = String.format(MESSAGE_LISTED_OVERVIEW, 1, 0, 0); diff --git a/src/test/java/seedu/address/logic/parser/AddPairCommandParserTest.java b/src/test/java/seedu/address/logic/parser/AddPairCommandParserTest.java index 313f4455f6c..fba6ec35900 100644 --- a/src/test/java/seedu/address/logic/parser/AddPairCommandParserTest.java +++ b/src/test/java/seedu/address/logic/parser/AddPairCommandParserTest.java @@ -14,11 +14,6 @@ public class AddPairCommandParserTest { private final AddPairCommandParser parser = new AddPairCommandParser(); - @Test - public void parse_allFieldsPresent_success() { - // TODO: test with the same format as AddCommandParserTest::parse_allFieldsPresent_success() - } - @Test public void parse_compulsoryFieldMissing_failure() { String expectedMessage = String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddPairCommand.MESSAGE_USAGE); @@ -36,8 +31,4 @@ public void parse_compulsoryFieldMissing_failure() { expectedMessage); } - @Test - public void parse_invalidValue_failure() { - // TODO: Check for invalid elderly or volunteer - } } diff --git a/src/test/java/seedu/address/model/ModelManagerTest.java b/src/test/java/seedu/address/model/ModelManagerTest.java index 2155f3bc092..ef86af4b6bc 100644 --- a/src/test/java/seedu/address/model/ModelManagerTest.java +++ b/src/test/java/seedu/address/model/ModelManagerTest.java @@ -287,8 +287,6 @@ public void equals() { .withUserPrefs(userPrefs) .build()); - // TODO: different filteredPairList -> returns false - // resets modelManager to initial state for upcoming tests modelManager.updateAllFilteredLists((Predicate) PREDICATE_SHOW_ALL, (Predicate) PREDICATE_SHOW_ALL, (Predicate) PREDICATE_SHOW_ALL); diff --git a/src/test/java/seedu/address/model/pair/PairTest.java b/src/test/java/seedu/address/model/pair/PairTest.java index e7b85ee7a2d..5543f6b784d 100644 --- a/src/test/java/seedu/address/model/pair/PairTest.java +++ b/src/test/java/seedu/address/model/pair/PairTest.java @@ -36,7 +36,6 @@ public void isSamePair() { .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withTags(VALID_TAG_SINGLE).build(); Pair editedPair1 = new PairBuilder(PAIR1).withElderly(editedAlice).build(); assertTrue(PAIR1.isSamePair(editedPair1)); - // TODO: check that a different name returns true if nric is the same. // different nric, all other attributes same -> returns false editedAlice = new ElderlyBuilder(ALICE).withNric(VALID_NRIC_BOB).build(); diff --git a/src/test/java/seedu/address/storage/StorageManagerTest.java b/src/test/java/seedu/address/storage/StorageManagerTest.java index 041f6750a81..de1b1372d4b 100644 --- a/src/test/java/seedu/address/storage/StorageManagerTest.java +++ b/src/test/java/seedu/address/storage/StorageManagerTest.java @@ -60,8 +60,6 @@ public void prefsReadSave() throws Exception { * More extensive testing of UserPref saving/reading is done in the storage classes test files. */ - // TODO: pairReadSave(), follow implementations below - @Test public void elderlyReadSave() throws Exception { FriendlyLink original = getTypicalFriendlyLink(); diff --git a/src/test/java/seedu/address/testutil/TypicalElderly.java b/src/test/java/seedu/address/testutil/TypicalElderly.java index 146939eef54..312480961cc 100644 --- a/src/test/java/seedu/address/testutil/TypicalElderly.java +++ b/src/test/java/seedu/address/testutil/TypicalElderly.java @@ -77,7 +77,6 @@ public class TypicalElderly { .withNric(VALID_NRIC_BOB).withBirthDate(VALID_BIRTH_DATE_BOB).withRegion(VALID_REGION_BOB) .withRiskLevel(VALID_RISK_LEVEL_BOB).build(); - // TODO: Replace magic strings public static final Elderly CHARLIE = new ElderlyBuilder().withName("Charlie Kurz") .withPhone("95352563").withEmail("heinz@example.com").withAddress("wall street") .withBirthDate("1950-01-01").withNric(VALID_NRIC_CHARLIE).withRegion("NORTHEAST").build();