Skip to content

Commit

Permalink
Update user guide with examples and fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
wxiaoyun committed Mar 17, 2024
1 parent 69242db commit dd3a808
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
8 changes: 6 additions & 2 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,19 @@ Adds a student to the address book.

Format: `addstu n/NAME p/PHONE_NUMBER e/EMAIL nn/NUSNET_ID a/ADDRESS [t/TAG]…​`

* Add a student with the given details.
* The name and nusnet id must be provided. And nusnet id must be unique.
* All the remaining fields are optional. If not provided, a placeholder value will be used.

<box type="tip" seamless>

**Tip:** A person can have any number of tags (including 0)
</box>

Examples:
* `addstu n/John Doe nn/e1234567 [p/98765432] [e/johnd@example.com] [a/John street, block 123, #01-01]`
* `add n/Betsy Crowe nn/e01234567 t/friend e/betsycrowe@example.com a/Newgate Prison p/1234567 t/criminal`
* `add n/Betsy Crowe nn/e01234567`
* `addstu n/Betsy Crowe nn/e01234567 t/friend e/betsycrowe@example.com a/Newgate Prison p/1234567 t/criminal`
* `addstu n/Betsy Crowe nn/e01234567`

### Listing all students : `list`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package seedu.address.logic.parser;

import static org.junit.jupiter.api.Assertions.assertAll;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static seedu.address.logic.Messages.MESSAGE_INVALID_COMMAND_FORMAT;
import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;
import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;
Expand Down Expand Up @@ -161,9 +161,8 @@ public void parse_optionalFieldsMissing_success() {
+ NUSNET_DESC_AMY + ADDRESS_DESC_AMY,
new AddPersonCommand(expectedPerson2));

// only name and nusnet
assertAll("Optional fields missing", () ->
parser.parse(NAME_DESC_CHAD + NUSNET_DESC_CHAD)); // should not throw an error
// only name and nusnet provided
assertDoesNotThrow(() -> parser.parse(NAME_DESC_CHAD + NUSNET_DESC_CHAD));
}

@Test
Expand Down

0 comments on commit dd3a808

Please sign in to comment.