Skip to content

Commit ef5a814

Browse files
authored
Merge pull request #121 from qihao27/master
Update docs
2 parents e1a89a7 + ba45262 commit ef5a814

File tree

5 files changed

+63
-20
lines changed

5 files changed

+63
-20
lines changed

collated/main/Hailinx.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ package seedu.address.commons.events.ui;
2828
import seedu.address.commons.events.BaseEvent;
2929

3030
/**
31-
* Indicates a request for changing search mode for browser
31+
* Indicates a request for changing search mode of browser
3232
*/
3333
public class ChangeSearchEvent extends BaseEvent {
3434

@@ -134,7 +134,6 @@ package seedu.address.commons.exceptions;
134134

135135
/**
136136
* Signals an error caused by encryption and decryption.
137-
* The reason can be wrong keyword.
138137
*/
139138
public class EncryptOrDecryptException extends Exception {
140139
}
@@ -283,9 +282,8 @@ public class LockCommand extends Command {
283282

284283
public static final String COMMAND_WORD = "lock";
285284

286-
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Encrypts all contact with a input password."
287-
+ "Parameters: "
288-
+ "PASSWORD\n"
285+
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Encrypts all contact with a input password.\n"
286+
+ "Parameters: PASSWORD (at least contains 4 characters)\n"
289287
+ "Example: " + COMMAND_WORD + " mykey";
290288

291289
public static final String MESSAGE_SUCCESS = "Address book is locked successfully.";
@@ -1573,9 +1571,6 @@ public class DetailsContainsPredicate implements Predicate<ReadOnlyPerson> {
15731571
* @return true if tag in {@code descriptor} present but not match tag of {@code person}
15741572
*/
15751573
private boolean isTagNotMatchedIfPresent(ReadOnlyPerson person) {
1576-
if (!descriptor.getTags().isPresent()) {
1577-
return false;
1578-
}
15791574
Iterator<Tag> descriptorIterator = descriptor.getTags().get().iterator();
15801575
Iterator<Tag> personIterator = person.getTags().iterator();
15811576
while (descriptorIterator.hasNext()) {
@@ -1632,7 +1627,7 @@ package seedu.address.model.person;
16321627
import java.util.function.Predicate;
16331628

16341629
/**
1635-
* Conducts fuzzy test on whether a {@code ReadOnlyPerson}'s attribute matches any of the keywords given.
1630+
* Conducts a fuzzy test on whether a {@code ReadOnlyPerson}'s attribute matches any of the keywords given.
16361631
*/
16371632
public class FuzzySearchPredicate implements Predicate<ReadOnlyPerson> {
16381633
private final String keyword;

collated/test/Hailinx.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1767,6 +1767,19 @@ public class TodoItemTest {
17671767
Assert.assertTrue(firstTodoItem.equals(firstTodoItemCopy));
17681768
}
17691769

1770+
@Test
1771+
public void test_compareTo() throws Exception {
1772+
TodoItem firstTodoItem = new TodoItem(EARLY_TIME_ONE, null, "task");
1773+
TodoItem secondTodoItem = new TodoItem(LATE_TIME_ONE, null, "task");
1774+
TodoItem thirdTodoItem = new TodoItem(EARLY_TIME_ONE, null, "task");
1775+
1776+
Assert.assertTrue(firstTodoItem.compareTo(secondTodoItem) < 0);
1777+
1778+
Assert.assertTrue(firstTodoItem.compareTo(thirdTodoItem) == 0);
1779+
1780+
Assert.assertTrue(secondTodoItem.compareTo(thirdTodoItem) > 0);
1781+
}
1782+
17701783
@Test
17711784
public void test_invalidInput_throwException() {
17721785
try {
@@ -1838,6 +1851,7 @@ import org.junit.Assert;
18381851
import org.junit.Test;
18391852

18401853
import seedu.address.commons.events.model.AddressBookChangedEvent;
1854+
import seedu.address.commons.events.model.ReloadAddressBookEvent;
18411855
import seedu.address.commons.exceptions.DataConversionException;
18421856
import seedu.address.commons.exceptions.EncryptOrDecryptException;
18431857
import seedu.address.model.ReadOnlyAddressBook;
@@ -1880,6 +1894,17 @@ public class SecurityManagerTest {
18801894
Assert.assertFalse(security.isSecured());
18811895
}
18821896

1897+
@Test
1898+
public void test_raise() {
1899+
try {
1900+
Security security = SecurityManager.getInstance(storage);
1901+
security.raise(new ReloadAddressBookEvent());
1902+
} catch (Exception e) {
1903+
e.printStackTrace();
1904+
Assert.fail("Should not throw exception.");
1905+
}
1906+
}
1907+
18831908
@Test
18841909
public void test_isEncrypted() throws IOException {
18851910
Security security = SecurityManager.getInstance(storage);
@@ -2004,7 +2029,7 @@ import seedu.address.commons.events.BaseEvent;
20042029
import seedu.address.commons.exceptions.EncryptOrDecryptException;
20052030

20062031
/**
2007-
* Provides Security Stubs for testing.
2032+
* Provides three Security Stubs for testing.
20082033
*/
20092034
public class SecurityStubUtil {
20102035

@@ -2079,6 +2104,7 @@ public class SecurityStubUtil {
20792104

20802105
/**
20812106
* Represents a SecurityManager which indicates that the address book is secured.
2107+
* Throws EncryptOrDecryptException when call encryptAddressBook and decryptAddressBook methods.
20822108
*/
20832109
private class SecurityStubEncryptOrDecryptException extends BaseSecurityStub {
20842110

@@ -2716,7 +2742,7 @@ public class TodoPanelTest extends GuiUnitTest {
27162742
``` java
27172743
@Test
27182744
public void findByDetail() {
2719-
/* Case: find multiple persons in address book by name detail, command with leading spaces and trailing spaces
2745+
/* Case: find multiple persons in address book by name field, command with leading spaces and trailing spaces
27202746
* -> 2 persons found
27212747
*/
27222748
String command = " " + FindCommand.COMMAND_WORD + " " + FindCommand.PREFIX_FIND_IN_DETAIL
@@ -2726,7 +2752,7 @@ public class TodoPanelTest extends GuiUnitTest {
27262752
assertCommandSuccess(command, expectedModel);
27272753
assertSelectedCardUnchanged();
27282754

2729-
/* Case: find multiple persons in address book by name detail, name is not complete
2755+
/* Case: find multiple persons in address book by name, name is not complete
27302756
* -> 3 persons found
27312757
*/
27322758
command = FindCommand.COMMAND_WORD + " " + FindCommand.PREFIX_FIND_IN_DETAIL + " " + PREFIX_NAME + "me";
@@ -2827,7 +2853,7 @@ public class TodoPanelTest extends GuiUnitTest {
28272853
}
28282854

28292855
@Test
2830-
public void findFuzzySearch() {
2856+
public void findByFuzzySearch() {
28312857
/* Case: find multiple persons in address book by fuzzy search, command with leading spaces and trailing spaces
28322858
* -> 3 persons found
28332859
*/

docs/team/AaronSoh.adoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ include::../DeveloperGuide.adoc[tag=unredo]
9292

9393
---
9494

95-
===
96-
9795
=== Enhancement Proposed: Add command `Delete multiple contacts`
9896

9997
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.

docs/team/WuQihao.adoc

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ifdef::env-github,env-browser[:outfilesuffix: .adoc]
44
:stylesDir: ../stylesheets
55

66
== Project: AcquaiNote
7-
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.
7+
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.
88

99
*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]]
1010

@@ -95,6 +95,11 @@ include::../DeveloperGuide.adoc[tag=export]
9595

9696
---
9797

98+
=== Enhancement Proposed: Replace favourite stars with buttons
99+
100+
Users will be able to add/remove any contact to favourite list by clicking on the button.
101+
Provides an alternative for adding/removing contact to favourite list.
102+
98103
=== Enhancement Proposed: Export to cloud storage
99104

100105
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
108113
=== Other contributions
109114

110115
* 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])
111-
* 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 ])
112-
* Wrote additional tests to increase coverage (Pull request https://github.com/CS2103AUG2017-T10-B1/main/pull/78[#78])
113-
* 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])
116+
* Changed favourite contact display on contact cards (Pull request https://github.com/CS2103AUG2017-T10-B1/main/pull/69[#69])
117+
* Added todo-item count on contact cards (Pull request https://github.com/CS2103AUG2017-T10-B1/main/pull/78[#78])
118+
* Added switch buttons below result display panel (Pull request https://github.com/CS2103AUG2017-T10-B1/main/pull/101[#101])
119+
* 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])
120+
* 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])

src/test/data/ManualTesting/[T10-B1][AcquaiNote]TestScript.adoc

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ endif::[]
1515
== Import data
1616

1717
. Download the latest `AcquaiNote.jar` link:{repoURL}/releases[here].
18-
. Download the `SampleData.xml` link:{repoURL}/tree/master/src/test/data/ManualTesting[here].
18+
. Download the `SampleData.xml` link:{repoURL}/releases[here].
1919
. Create a folder named `data` and put `SampleData.xml` inside.
2020
. Rename `SampleData.xml` to `acquainote.xml`.
2121
. Put `AcquaiNote.jar` and `data` folder at the same root directory.
@@ -173,13 +173,30 @@ Successful unlock, correct password.
173173
If you forget the password, please delete the file and repeat import step.
174174
====
175175

176+
== Test command: `undo` or `u`
177+
178+
. Enter 'd 7' +
179+
Enter `undo` +
180+
Successful undo, restore the deleted person.
181+
. Enter `d 7` +
182+
Enter `d 7` +
183+
Enter `d 7` +
184+
Enter `undo 3` +
185+
Successful undo, restore 3 deleted contacts.
186+
176187
== Test command: `redo` or `r`
177188

178189
. Enter `d 7` +
179190
Enter `undo` +
180191
Undo deletion. +
181192
Enter `redo` +
182193
Successful redo, 7th person deleted.
194+
. Enter `d 7` +
195+
Enter `d 7` +
196+
Enter `clear` +
197+
Enter `undo 3` +
198+
Enter `redo 2` +
199+
Successful redo, redo the first 2 commands (`d 7` and `d 7`).
183200

184201
== Test command: `switch` or `sw`
185202

0 commit comments

Comments
 (0)