forked from nus-cs2103-AY2324S1/tp
-
Notifications
You must be signed in to change notification settings - Fork 5
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
140b757
commit b01f23f
Showing
10 changed files
with
147 additions
and
64 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
42 changes: 31 additions & 11 deletions
42
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,34 @@ | ||
{ | ||
"persons": [ { | ||
"name": "Alice Pauline", | ||
"phone": "94351253", | ||
"email": "[email protected]", | ||
"address": "123, Jurong West Ave 6, #08-111", | ||
"tags": [ "friends" ] | ||
"persons" : [ { | ||
"name" : "Alice Pauline", | ||
"phone" : "94351253", | ||
"email" : "[email protected]", | ||
"groupList" : [ { | ||
"groupRemark" : "CS2105 remark", | ||
"meetingTimeList" : [], | ||
"groupName" : "CS2105" | ||
}], | ||
"freeTimeList" : [ ] | ||
}, { | ||
"name": "Alice Pauline", | ||
"phone": "94351253", | ||
"email": "[email protected]", | ||
"address": "4th street" | ||
} ] | ||
"name" : "Alice Pauline", | ||
"phone" : "94351253", | ||
"email" : "[email protected]", | ||
"groupList" : [ { | ||
"groupRemark" : "CS2105 remark", | ||
"meetingTimeList" : [], | ||
"groupName" : "CS2105" | ||
}], | ||
"freeTimeList" : [ ] | ||
} ], | ||
"groups" : [ { | ||
"groupRemark" : "CS2105 remark", | ||
"meetingTimeList" : [ { | ||
"start" : "MON 1200", | ||
"end" : "MON 1400" | ||
}, { | ||
"start" : "WED 1600", | ||
"end" : "THU 1800" | ||
}], | ||
"groupName" : "CS2105" | ||
}] | ||
} |
28 changes: 22 additions & 6 deletions
28
src/test/data/JsonSerializableAddressBookTest/invalidPersonAddressBook.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,8 +1,24 @@ | ||
{ | ||
"persons": [ { | ||
"name": "Hans Muster", | ||
"phone": "9482424", | ||
"email": "invalid@email!3e", | ||
"address": "4th street" | ||
} ] | ||
"persons" : [ { | ||
"name" : "Alice Pauline", | ||
"phone" : "94351253", | ||
"email" : "[email protected]", | ||
"groupList" : [ { | ||
"groupRemark" : "CS2105 remark", | ||
"meetingTimeList" : [], | ||
"groupName" : "CS2105" | ||
}], | ||
"freeTimeList" : [ ] | ||
}], | ||
"groups" : [ { | ||
"groupRemark" : "CS2105 remark", | ||
"meetingTimeList" : [ { | ||
"start" : "MONddd 1200", | ||
"end" : "MON 1400" | ||
}, { | ||
"start" : "WED 1600", | ||
"end" : "THU 1800" | ||
}], | ||
"groupName" : "CS2105" | ||
}] | ||
} |
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 |
---|---|---|
|
@@ -4,36 +4,82 @@ | |
"name" : "Alice Pauline", | ||
"phone" : "94351253", | ||
"email" : "[email protected]", | ||
"groupList" : [ "CS2103T"] | ||
"groupList" : [ { | ||
"groupRemark" : "CS2105 remark", | ||
"meetingTimeList" : [], | ||
"groupName" : "CS2105" | ||
}], | ||
"freeTimeList" : [ ] | ||
}, { | ||
"name" : "Benson Meier", | ||
"phone" : "98765432", | ||
"email" : "[email protected]", | ||
"groupList" : [ "CS2103T"] | ||
"groupList" : [ { | ||
"groupRemark" : "CS2105 remark", | ||
"meetingTimeList" : [], | ||
"groupName" : "CS2105" | ||
}], | ||
"freeTimeList" : [ ] | ||
}, { | ||
"name" : "Carl Kurz", | ||
"phone" : "95352563", | ||
"email" : "[email protected]", | ||
"groupList" : [ "CS2103T"] | ||
"groupList" : [ { | ||
"groupRemark" : "CS2105 remark", | ||
"meetingTimeList" : [], | ||
"groupName" : "CS2105" | ||
}], | ||
"freeTimeList" : [ ] | ||
}, { | ||
"name" : "Daniel Meier", | ||
"phone" : "87652533", | ||
"email" : "[email protected]", | ||
"groupList" : [ "CS2103T"] | ||
"groupList" : [ { | ||
"groupRemark" : "CS2105 remark", | ||
"meetingTimeList" : [], | ||
"groupName" : "CS2105" | ||
}], | ||
"freeTimeList" : [ ] | ||
}, { | ||
"name" : "Elle Meyer", | ||
"phone" : "9482224", | ||
"email" : "[email protected]", | ||
"groupList" : [ "CS2103T"] | ||
"groupList" : [ { | ||
"groupRemark" : "CS2105 remark", | ||
"meetingTimeList" : [], | ||
"groupName" : "CS2105" | ||
}], | ||
"freeTimeList" : [ ] | ||
}, { | ||
"name" : "Fiona Kunz", | ||
"phone" : "9482427", | ||
"email" : "[email protected]", | ||
"groupList" : [ "CS2103T"] | ||
"groupList" : [ { | ||
"groupRemark" : "CS2105 remark", | ||
"meetingTimeList" : [], | ||
"groupName" : "CS2105" | ||
}], | ||
"freeTimeList" : [ ] | ||
}, { | ||
"name" : "George Best", | ||
"phone" : "9482442", | ||
"email" : "[email protected]", | ||
"groupList" : [ "CS2103T"] | ||
} ] | ||
"groupList" : [ { | ||
"groupRemark" : "CS2105 remark", | ||
"meetingTimeList" : [], | ||
"groupName" : "CS2105" | ||
}], | ||
"freeTimeList" : [ ] | ||
} ], | ||
"groups" : [ { | ||
"groupRemark" : "CS2105 remark", | ||
"meetingTimeList" : [ { | ||
"start" : "MON 1200", | ||
"end" : "MON 1400" | ||
}, { | ||
"start" : "WED 1600", | ||
"end" : "THU 1800" | ||
}], | ||
"groupName" : "CS2105" | ||
}] | ||
} |
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
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
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 |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
import java.util.List; | ||
|
||
import seedu.address.model.AddressBook; | ||
import seedu.address.model.group.Group; | ||
import seedu.address.model.person.Person; | ||
|
||
/** | ||
|
@@ -24,26 +25,26 @@ public class TypicalPersons { | |
public static final Person ALICE = new PersonBuilder().withName("Alice Pauline") | ||
.withEmail("[email protected]") | ||
.withPhone("94351253") | ||
.withGroupList("CS2103T").build(); | ||
.withGroupList("CS2105").build(); | ||
public static final Person BENSON = new PersonBuilder().withName("Benson Meier") | ||
.withEmail("[email protected]").withPhone("98765432") | ||
.withGroupList("CS2103T").build(); | ||
.withGroupList("CS2105").build(); | ||
public static final Person CARL = new PersonBuilder().withName("Carl Kurz").withPhone("95352563") | ||
.withEmail("[email protected]").withGroupList("CS2103T").build(); | ||
.withEmail("[email protected]").withGroupList("CS2105").build(); | ||
public static final Person DANIEL = new PersonBuilder().withName("Daniel Meier").withPhone("87652533") | ||
.withEmail("[email protected]").withGroupList("CS2103T").build(); | ||
.withEmail("[email protected]").withGroupList("CS2105").build(); | ||
public static final Person ELLE = new PersonBuilder().withName("Elle Meyer").withPhone("9482224") | ||
.withEmail("[email protected]").withGroupList("CS2103T").build(); | ||
.withEmail("[email protected]").withGroupList("CS2105").build(); | ||
public static final Person FIONA = new PersonBuilder().withName("Fiona Kunz").withPhone("9482427") | ||
.withEmail("[email protected]").withGroupList("CS2103T").build(); | ||
.withEmail("[email protected]").withGroupList("CS2105").build(); | ||
public static final Person GEORGE = new PersonBuilder().withName("George Best").withPhone("9482442") | ||
.withEmail("[email protected]").withGroupList("CS2103T").build(); | ||
.withEmail("[email protected]").withGroupList("CS2105").build(); | ||
|
||
// Manually added | ||
public static final Person HOON = new PersonBuilder().withName("Hoon Meier").withPhone("8482424") | ||
.withEmail("[email protected]").withGroupList("CS2103T").build(); | ||
.withEmail("[email protected]").withGroupList("CS2105").build(); | ||
public static final Person IDA = new PersonBuilder().withName("Ida Mueller").withPhone("8482131") | ||
.withEmail("[email protected]").withGroupList("CS2103T").build(); | ||
.withEmail("[email protected]").withGroupList("CS2105").build(); | ||
|
||
// Manually added - Person's details found in {@code CommandTestUtil} | ||
public static final Person AMY = new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY) | ||
|
@@ -64,6 +65,8 @@ private TypicalPersons() {} // prevents instantiation | |
*/ | ||
public static AddressBook getTypicalAddressBook() { | ||
AddressBook ab = new AddressBook(); | ||
Group group = TypicalGroups.getTypicalGroup().get(0); | ||
ab.addGroup(group); | ||
for (Person person : getTypicalPersons()) { | ||
ab.addPerson(person); | ||
} | ||
|