Skip to content

Commit

Permalink
Merge pull request #121 from qihao27/master
Browse files Browse the repository at this point in the history
Update docs
  • Loading branch information
Hailinx authored Nov 13, 2017
2 parents e1a89a7 + ba45262 commit ef5a814
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 20 deletions.
13 changes: 4 additions & 9 deletions collated/main/Hailinx.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down Expand Up @@ -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 {
}
Expand Down Expand Up @@ -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.";
Expand Down Expand Up @@ -1573,9 +1571,6 @@ public class DetailsContainsPredicate implements Predicate<ReadOnlyPerson> {
* @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<Tag> descriptorIterator = descriptor.getTags().get().iterator();
Iterator<Tag> personIterator = person.getTags().iterator();
while (descriptorIterator.hasNext()) {
Expand Down Expand Up @@ -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<ReadOnlyPerson> {
private final String keyword;
Expand Down
34 changes: 30 additions & 4 deletions collated/test/Hailinx.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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 {

Expand Down Expand Up @@ -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 {

Expand Down Expand Up @@ -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
Expand All @@ -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";
Expand Down Expand Up @@ -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
*/
Expand Down
2 changes: 0 additions & 2 deletions docs/team/AaronSoh.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
15 changes: 11 additions & 4 deletions docs/team/WuQihao.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]]

Expand Down Expand Up @@ -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. +
Expand All @@ -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])
19 changes: 18 additions & 1 deletion src/test/data/ManualTesting/[T10-B1][AcquaiNote]TestScript.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -173,13 +173,30 @@ 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` +
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`

Expand Down

0 comments on commit ef5a814

Please sign in to comment.