forked from nus-cs2103-AY2324S1/tp
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c11e93f
commit 541a63a
Showing
18 changed files
with
362 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,7 @@ public class EditCommand extends Command { | |
+ "[" + PREFIX_SALARY + "SALARY] " | ||
+ "[" + PREFIX_CLAIM_BUDGET + "CLAIM BUDGET] " | ||
+ "[" + PREFIX_DEPARTMENT + "DEPARTMENT] " | ||
+ "[" + PREFIX_DOB + "BIRTHDATE (YYYY-MM-DD)\n" | ||
+ "[" + PREFIX_DOB + "BIRTHDATE (YYYY-MM-DD)]\n" | ||
+ "Example: " + COMMAND_WORD + " 1 " | ||
+ PREFIX_PHONE + "91234567 " | ||
+ PREFIX_EMAIL + "[email protected]"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 22 additions & 12 deletions
34
src/test/data/JsonSerializableAddressBookTest/duplicatePersonAddressBook.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,24 @@ | ||
{ | ||
"persons": [ { | ||
"name": "Alice Pauline", | ||
"phone": "94351253", | ||
"email": "[email protected]", | ||
"address": "123, Jurong West Ave 6, #08-111", | ||
"tags": [ "friends" ] | ||
}, { | ||
"name": "Alice Pauline", | ||
"phone": "94351253", | ||
"email": "[email protected]", | ||
"address": "4th street" | ||
} ] | ||
"persons": [ | ||
{ | ||
"name": "Alice Pauline", | ||
"phone": "94351253", | ||
"email": "[email protected]", | ||
"address": "123, Jurong West Ave 6, #08-111", | ||
"salary": "100000", | ||
"claimBudget": "1", | ||
"department": "Finance", | ||
"dob": "2002-02-27" | ||
}, | ||
{ | ||
"name": "Alice Pauline", | ||
"phone": "94351253", | ||
"email": "[email protected]", | ||
"address": "4th street", | ||
"salary": "100000", | ||
"claimBudget": "1", | ||
"department": "Finance", | ||
"dob": "2002-02-27" | ||
} | ||
] | ||
} |
115 changes: 72 additions & 43 deletions
115
src/test/data/JsonSerializableAddressBookTest/typicalPersonsAddressBook.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,75 @@ | ||
{ | ||
"_comment": "AddressBook save file which contains the same Person values as in TypicalPersons#getTypicalAddressBook()", | ||
"persons" : [ { | ||
"name" : "Alice Pauline", | ||
"phone" : "94351253", | ||
"email" : "[email protected]", | ||
"address" : "123, Jurong West Ave 6, #08-111", | ||
"tags" : [ "friends" ] | ||
}, { | ||
"name" : "Benson Meier", | ||
"phone" : "98765432", | ||
"email" : "[email protected]", | ||
"address" : "311, Clementi Ave 2, #02-25", | ||
"tags" : [ "owesMoney", "friends" ] | ||
}, { | ||
"name" : "Carl Kurz", | ||
"phone" : "95352563", | ||
"email" : "[email protected]", | ||
"address" : "wall street", | ||
"tags" : [ ] | ||
}, { | ||
"name" : "Daniel Meier", | ||
"phone" : "87652533", | ||
"email" : "[email protected]", | ||
"address" : "10th street", | ||
"tags" : [ "friends" ] | ||
}, { | ||
"name" : "Elle Meyer", | ||
"phone" : "9482224", | ||
"email" : "[email protected]", | ||
"address" : "michegan ave", | ||
"tags" : [ ] | ||
}, { | ||
"name" : "Fiona Kunz", | ||
"phone" : "9482427", | ||
"email" : "[email protected]", | ||
"address" : "little tokyo", | ||
"tags" : [ ] | ||
}, { | ||
"name" : "George Best", | ||
"phone" : "9482442", | ||
"email" : "[email protected]", | ||
"address" : "4th street", | ||
"tags" : [ ] | ||
} ] | ||
"persons": [ | ||
{ | ||
"name": "Alice Pauline", | ||
"phone": "94351253", | ||
"email": "[email protected]", | ||
"address": "123, Jurong West Ave 6, #08-111", | ||
"salary": "10000", | ||
"claimBudget": "5000", | ||
"department": "Engineering", | ||
"dob": "2000-01-01" | ||
}, | ||
{ | ||
"name": "Benson Meier", | ||
"phone": "98765432", | ||
"email": "[email protected]", | ||
"address": "311, Clementi Ave 2, #02-25", | ||
"salary": "100", | ||
"claimBudget": "5", | ||
"department": "Sales", | ||
"dob": "1997-05-05" | ||
}, | ||
{ | ||
"name": "Carl Kurz", | ||
"phone": "95352563", | ||
"email": "[email protected]", | ||
"address": "wall street", | ||
"salary": "1000000000000", | ||
"claimBudget": "500000", | ||
"department": "Executive", | ||
"dob": "1991-12-31" | ||
}, | ||
{ | ||
"name": "Daniel Meier", | ||
"phone": "87652533", | ||
"email": "[email protected]", | ||
"address": "10th street", | ||
"salary": "23232323232", | ||
"claimBudget": "19191919", | ||
"department": "Marketing", | ||
"dob": "1969-07-27" | ||
}, | ||
{ | ||
"name": "Elle Meyer", | ||
"phone": "9482224", | ||
"email": "[email protected]", | ||
"address": "michegan ave", | ||
"salary": "3000", | ||
"claimBudget": "200", | ||
"department": "HR", | ||
"dob": "1999-06-17" | ||
}, | ||
{ | ||
"name": "Fiona Kunz", | ||
"phone": "9482427", | ||
"email": "[email protected]", | ||
"address": "little tokyo", | ||
"salary": "100000", | ||
"claimBudget": "1", | ||
"department": "Finance", | ||
"dob": "2002-02-27" | ||
}, | ||
{ | ||
"name": "George Best", | ||
"phone": "9482442", | ||
"email": "[email protected]", | ||
"address": "4th street", | ||
"salary": "10000", | ||
"claimBudget": "5000", | ||
"department": "Engineering", | ||
"dob": "2005-09-30" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,13 @@ | |
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_CLAIM_BUDGET; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_DEPARTMENT; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_DOB; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_SALARY; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG; | ||
import static seedu.address.testutil.Assert.assertThrows; | ||
|
||
|
@@ -34,6 +38,10 @@ public class CommandTestUtil { | |
public static final String VALID_EMAIL_BOB = "[email protected]"; | ||
public static final String VALID_ADDRESS_AMY = "Block 312, Amy Street 1"; | ||
public static final String VALID_ADDRESS_BOB = "Block 123, Bobby Street 3"; | ||
public static final String VALID_SALARY = "10000"; | ||
public static final String VALID_BUDGET = "2500"; | ||
public static final String VALID_DEPARTMENT = "Engineering"; | ||
public static final String VALID_DOB = "2000-01-01"; | ||
public static final String VALID_TAG_HUSBAND = "husband"; | ||
public static final String VALID_TAG_FRIEND = "friend"; | ||
|
||
|
@@ -45,10 +53,14 @@ public class CommandTestUtil { | |
public static final String EMAIL_DESC_BOB = " " + PREFIX_EMAIL + VALID_EMAIL_BOB; | ||
public static final String ADDRESS_DESC_AMY = " " + PREFIX_ADDRESS + VALID_ADDRESS_AMY; | ||
public static final String ADDRESS_DESC_BOB = " " + PREFIX_ADDRESS + VALID_ADDRESS_BOB; | ||
public static final String SALARY_DESC = " " + PREFIX_SALARY + VALID_SALARY; | ||
public static final String BUDGET_DESC = " " + PREFIX_CLAIM_BUDGET + VALID_BUDGET; | ||
public static final String DEPARTMENT_DESC = " " + PREFIX_DEPARTMENT + VALID_DEPARTMENT; | ||
public static final String DOB_DESC = " " + PREFIX_DOB + VALID_DOB; | ||
public static final String TAG_DESC_FRIEND = " " + PREFIX_TAG + VALID_TAG_FRIEND; | ||
public static final String TAG_DESC_HUSBAND = " " + PREFIX_TAG + VALID_TAG_HUSBAND; | ||
|
||
public static final String INVALID_NAME_DESC = " " + PREFIX_NAME + "James&"; // '&' not allowed in names | ||
public static final String INVALID_NAME_DESC = " " + PREFIX_NAME + " "; // blank not allowed in names | ||
public static final String INVALID_PHONE_DESC = " " + PREFIX_PHONE + "911a"; // 'a' not allowed in phones | ||
public static final String INVALID_EMAIL_DESC = " " + PREFIX_EMAIL + "bob!yahoo"; // missing '@' symbol | ||
public static final String INVALID_ADDRESS_DESC = " " + PREFIX_ADDRESS; // empty string not allowed for addresses | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.