diff --git a/collated/main/Hailinx.md b/collated/main/Hailinx.md index d8e068803bb9..44d3bdd839c6 100644 --- a/collated/main/Hailinx.md +++ b/collated/main/Hailinx.md @@ -28,7 +28,7 @@ package seedu.address.commons.events.ui; import seedu.address.commons.events.BaseEvent; /** - * Indicates a request for changing search mode for browser + * Indicates a request for changing search mode of browser */ public class ChangeSearchEvent extends BaseEvent { @@ -134,7 +134,6 @@ package seedu.address.commons.exceptions; /** * Signals an error caused by encryption and decryption. - * The reason can be wrong keyword. */ public class EncryptOrDecryptException extends Exception { } @@ -283,9 +282,8 @@ public class LockCommand extends Command { public static final String COMMAND_WORD = "lock"; - public static final String MESSAGE_USAGE = COMMAND_WORD + ": Encrypts all contact with a input password." - + "Parameters: " - + "PASSWORD\n" + public static final String MESSAGE_USAGE = COMMAND_WORD + ": Encrypts all contact with a input password.\n" + + "Parameters: PASSWORD (at least contains 4 characters)\n" + "Example: " + COMMAND_WORD + " mykey"; public static final String MESSAGE_SUCCESS = "Address book is locked successfully."; @@ -1573,9 +1571,6 @@ public class DetailsContainsPredicate implements Predicate { * @return true if tag in {@code descriptor} present but not match tag of {@code person} */ private boolean isTagNotMatchedIfPresent(ReadOnlyPerson person) { - if (!descriptor.getTags().isPresent()) { - return false; - } Iterator descriptorIterator = descriptor.getTags().get().iterator(); Iterator personIterator = person.getTags().iterator(); while (descriptorIterator.hasNext()) { @@ -1632,7 +1627,7 @@ package seedu.address.model.person; import java.util.function.Predicate; /** - * Conducts fuzzy test on whether a {@code ReadOnlyPerson}'s attribute matches any of the keywords given. + * Conducts a fuzzy test on whether a {@code ReadOnlyPerson}'s attribute matches any of the keywords given. */ public class FuzzySearchPredicate implements Predicate { private final String keyword; diff --git a/collated/test/Hailinx.md b/collated/test/Hailinx.md index 513ab9b07814..a8d71af8137c 100644 --- a/collated/test/Hailinx.md +++ b/collated/test/Hailinx.md @@ -1767,6 +1767,19 @@ public class TodoItemTest { Assert.assertTrue(firstTodoItem.equals(firstTodoItemCopy)); } + @Test + public void test_compareTo() throws Exception { + TodoItem firstTodoItem = new TodoItem(EARLY_TIME_ONE, null, "task"); + TodoItem secondTodoItem = new TodoItem(LATE_TIME_ONE, null, "task"); + TodoItem thirdTodoItem = new TodoItem(EARLY_TIME_ONE, null, "task"); + + Assert.assertTrue(firstTodoItem.compareTo(secondTodoItem) < 0); + + Assert.assertTrue(firstTodoItem.compareTo(thirdTodoItem) == 0); + + Assert.assertTrue(secondTodoItem.compareTo(thirdTodoItem) > 0); + } + @Test public void test_invalidInput_throwException() { try { @@ -1838,6 +1851,7 @@ import org.junit.Assert; import org.junit.Test; import seedu.address.commons.events.model.AddressBookChangedEvent; +import seedu.address.commons.events.model.ReloadAddressBookEvent; import seedu.address.commons.exceptions.DataConversionException; import seedu.address.commons.exceptions.EncryptOrDecryptException; import seedu.address.model.ReadOnlyAddressBook; @@ -1880,6 +1894,17 @@ public class SecurityManagerTest { Assert.assertFalse(security.isSecured()); } + @Test + public void test_raise() { + try { + Security security = SecurityManager.getInstance(storage); + security.raise(new ReloadAddressBookEvent()); + } catch (Exception e) { + e.printStackTrace(); + Assert.fail("Should not throw exception."); + } + } + @Test public void test_isEncrypted() throws IOException { Security security = SecurityManager.getInstance(storage); @@ -2004,7 +2029,7 @@ import seedu.address.commons.events.BaseEvent; import seedu.address.commons.exceptions.EncryptOrDecryptException; /** - * Provides Security Stubs for testing. + * Provides three Security Stubs for testing. */ public class SecurityStubUtil { @@ -2079,6 +2104,7 @@ public class SecurityStubUtil { /** * Represents a SecurityManager which indicates that the address book is secured. + * Throws EncryptOrDecryptException when call encryptAddressBook and decryptAddressBook methods. */ private class SecurityStubEncryptOrDecryptException extends BaseSecurityStub { @@ -2716,7 +2742,7 @@ public class TodoPanelTest extends GuiUnitTest { ``` java @Test public void findByDetail() { - /* Case: find multiple persons in address book by name detail, command with leading spaces and trailing spaces + /* Case: find multiple persons in address book by name field, command with leading spaces and trailing spaces * -> 2 persons found */ String command = " " + FindCommand.COMMAND_WORD + " " + FindCommand.PREFIX_FIND_IN_DETAIL @@ -2726,7 +2752,7 @@ public class TodoPanelTest extends GuiUnitTest { assertCommandSuccess(command, expectedModel); assertSelectedCardUnchanged(); - /* Case: find multiple persons in address book by name detail, name is not complete + /* Case: find multiple persons in address book by name, name is not complete * -> 3 persons found */ command = FindCommand.COMMAND_WORD + " " + FindCommand.PREFIX_FIND_IN_DETAIL + " " + PREFIX_NAME + "me"; @@ -2827,7 +2853,7 @@ public class TodoPanelTest extends GuiUnitTest { } @Test - public void findFuzzySearch() { + public void findByFuzzySearch() { /* Case: find multiple persons in address book by fuzzy search, command with leading spaces and trailing spaces * -> 3 persons found */ diff --git a/docs/team/AaronSoh.adoc b/docs/team/AaronSoh.adoc index 455a275f89bc..c136e9a60c62 100644 --- a/docs/team/AaronSoh.adoc +++ b/docs/team/AaronSoh.adoc @@ -92,8 +92,6 @@ include::../DeveloperGuide.adoc[tag=unredo] --- -=== - === Enhancement Proposed: Add command `Delete multiple contacts` This will allow users to delete more than 1 contacts at the same time. Users will not need to type the delete command multiple times. diff --git a/docs/team/WuQihao.adoc b/docs/team/WuQihao.adoc index 250ac95c72d8..b2cc1286446c 100644 --- a/docs/team/WuQihao.adoc +++ b/docs/team/WuQihao.adoc @@ -4,7 +4,7 @@ ifdef::env-github,env-browser[:outfilesuffix: .adoc] :stylesDir: ../stylesheets == Project: AcquaiNote -AcquaiNote is a desktop address book application which helps to manage personal contacts easily and safely, with scheduling functionality. The user interacts with it using a command line interface (CLI), and it has a GUI created with JavaFX. It is written in Java, and has about 6 kLoC. +AcquaiNote is a desktop address book application which helps to manage personal contacts easily and safely, with scheduling functionality. The user interacts with it using a command line interface (CLI), and it is written in Java and it has a GUI created with JavaFX. *Code contributed*: [https://github.com/CS2103AUG2017-T10-B1/main/blob/master/collated/main/qihao27.md[Functional code]] [https://github.com/CS2103AUG2017-T10-B1/main/blob/master/collated/test/qihao27.md[Test code]] @@ -95,6 +95,11 @@ include::../DeveloperGuide.adoc[tag=export] --- +=== Enhancement Proposed: Replace favourite stars with buttons + +Users will be able to add/remove any contact to favourite list by clicking on the button. +Provides an alternative for adding/removing contact to favourite list. + === Enhancement Proposed: Export to cloud storage With an initial modification of the current `export` command which increases the number of supporting file type, an integration with cloud storage service would be beneficial for users. + @@ -108,6 +113,8 @@ Both local and cloud import makes AcquaiNote more user friendly and would greatl === Other contributions * Updated the GUI color scheme (Pull requests https://github.com/CS2103AUG2017-T10-B1/main/pull/53[#53], https://github.com/CS2103AUG2017-T10-B1/main/pull/55[#55]) -* Changed favourite contact display and todo-item count display on contact cards (Pull requests https://github.com/CS2103AUG2017-T10-B1/main/pull/69[#69], https://github.com/CS2103AUG2017-T10-B1/main/pull/78[#78 ]) -* Wrote additional tests to increase coverage (Pull request https://github.com/CS2103AUG2017-T10-B1/main/pull/78[#78]) -* Updated documents constantly (Pull requests https://github.com/CS2103AUG2017-T10-B1/main/pull/11[#11], https://github.com/CS2103AUG2017-T10-B1/main/pull/21[#21], https://github.com/CS2103AUG2017-T10-B1/main/pull/28[#28], https://github.com/CS2103AUG2017-T10-B1/main/pull/46[#46], https://github.com/CS2103AUG2017-T10-B1/main/pull/59[#59]) +* Changed favourite contact display on contact cards (Pull request https://github.com/CS2103AUG2017-T10-B1/main/pull/69[#69]) +* Added todo-item count on contact cards (Pull request https://github.com/CS2103AUG2017-T10-B1/main/pull/78[#78]) +* Added switch buttons below result display panel (Pull request https://github.com/CS2103AUG2017-T10-B1/main/pull/101[#101]) +* Wrote additional tests to increase coverage (Pull requests https://github.com/CS2103AUG2017-T10-B1/main/pull/78[#78], https://github.com/CS2103AUG2017-T10-B1/main/pull/101[#101]) +* Updated documents constantly (Pull requests https://github.com/CS2103AUG2017-T10-B1/main/pull/11[#11], https://github.com/CS2103AUG2017-T10-B1/main/pull/21[#21], https://github.com/CS2103AUG2017-T10-B1/main/pull/28[#28], https://github.com/CS2103AUG2017-T10-B1/main/pull/46[#46], https://github.com/CS2103AUG2017-T10-B1/main/pull/59[#59], https://github.com/CS2103AUG2017-T10-B1/main/pull/64[#64], https://github.com/CS2103AUG2017-T10-B1/main/pull/93[#93], https://github.com/CS2103AUG2017-T10-B1/main/pull/117[#117]) diff --git a/src/test/data/ManualTesting/[T10-B1][AcquaiNote]TestScript.adoc b/src/test/data/ManualTesting/[T10-B1][AcquaiNote]TestScript.adoc index 80ba7e6a93f7..22df460bc672 100644 --- a/src/test/data/ManualTesting/[T10-B1][AcquaiNote]TestScript.adoc +++ b/src/test/data/ManualTesting/[T10-B1][AcquaiNote]TestScript.adoc @@ -15,7 +15,7 @@ endif::[] == Import data . Download the latest `AcquaiNote.jar` link:{repoURL}/releases[here]. -. Download the `SampleData.xml` link:{repoURL}/tree/master/src/test/data/ManualTesting[here]. +. Download the `SampleData.xml` link:{repoURL}/releases[here]. . Create a folder named `data` and put `SampleData.xml` inside. . Rename `SampleData.xml` to `acquainote.xml`. . Put `AcquaiNote.jar` and `data` folder at the same root directory. @@ -173,6 +173,17 @@ Successful unlock, correct password. If you forget the password, please delete the file and repeat import step. ==== +== Test command: `undo` or `u` + +. Enter 'd 7' + +Enter `undo` + +Successful undo, restore the deleted person. +. Enter `d 7` + +Enter `d 7` + +Enter `d 7` + +Enter `undo 3` + +Successful undo, restore 3 deleted contacts. + == Test command: `redo` or `r` . Enter `d 7` + @@ -180,6 +191,12 @@ Enter `undo` + Undo deletion. + Enter `redo` + Successful redo, 7th person deleted. +. Enter `d 7` + +Enter `d 7` + +Enter `clear` + +Enter `undo 3` + +Enter `redo 2` + +Successful redo, redo the first 2 commands (`d 7` and `d 7`). == Test command: `switch` or `sw`