forked from nus-cs2103-AY2122S1/tp
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix existing appointment tests and add more appointment tests (#286)
* Fix DeleteAppointmentCommand Tests * Add tests for AppointmentContainsPatientPredicate * Implement test for ListAppointmentCommand Rename getTypicalAppointmentBook. * Create test for JsonAdaptedAppointment * Create test for JsonAppointmentBookStorage * Generate typical appointments json data * Create test for JsonSerializableAppointmentBook * Fix test for AddAppointmentCommandParser * Add clear prescriptions functionality before appointment book tests
- Loading branch information
1 parent
3998c44
commit 2033ec4
Showing
22 changed files
with
496 additions
and
159 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
15 changes: 13 additions & 2 deletions
15
src/main/java/seedu/docit/model/appointment/AppointmentContainsPatientPredicate.java
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
11 changes: 11 additions & 0 deletions
11
src/test/data/JsonAppointmentBookStorageTest/invalidAndValidAppointmentAppointmentBook.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"appointments" : [ { | ||
"datetime" : "2040-10-17 1200", | ||
"prescriptionList" : [ ], | ||
"patientIndex" : "0" | ||
}, { | ||
"datetime" : "20222-12 2000", | ||
"prescriptionList" : [ ], | ||
"patientIndex" : "a" | ||
} ] | ||
} |
11 changes: 11 additions & 0 deletions
11
src/test/data/JsonAppointmentBookStorageTest/invalidAppointmentAppointmentBook.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"appointments" : [ { | ||
"datetime" : "20410-17 1200", | ||
"prescriptionList" : [ ], | ||
"patientIndex" : "0" | ||
}, { | ||
"datetime" : "2022-2as12 2000", | ||
"prescriptionList" : [ ], | ||
"patientIndex" : "0" | ||
} ] | ||
} |
1 change: 1 addition & 0 deletions
1
src/test/data/JsonAppointmentBookStorageTest/notJsonFormatAppointmentBook.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 |
---|---|---|
@@ -0,0 +1 @@ | ||
not json format! |
11 changes: 11 additions & 0 deletions
11
src/test/data/JsonSerializableAppointmentBookTest/duplicateAppointmentAppointmentBook.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"appointments" : [ { | ||
"datetime" : "2040-10-17 1200", | ||
"prescriptionList" : [ ], | ||
"patientIndex" : "0" | ||
}, { | ||
"datetime" : "2040-10-17 1200", | ||
"prescriptionList" : [ ], | ||
"patientIndex" : "0" | ||
} ] | ||
} |
7 changes: 7 additions & 0 deletions
7
src/test/data/JsonSerializableAppointmentBookTest/invalidAppointmentAppointmentBook.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"appointments" : [ { | ||
"datetime" : "2022212 2000", | ||
"prescriptionList" : [ ], | ||
"patientIndex" : "a" | ||
} ] | ||
} |
19 changes: 19 additions & 0 deletions
19
src/test/data/JsonSerializableAppointmentBookTest/typicalAppointmentsAppointmentBook.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"appointments" : [ { | ||
"datetime" : "2022-1-1 1600", | ||
"prescriptionList" : [ ], | ||
"patientIndex" : "0" | ||
}, { | ||
"datetime" : "2022-2-2 1600", | ||
"prescriptionList" : [ ], | ||
"patientIndex" : "0" | ||
}, { | ||
"datetime" : "2022-1-1 1600", | ||
"prescriptionList" : [ ], | ||
"patientIndex" : "1" | ||
}, { | ||
"datetime" : "2022-2-1 1600", | ||
"prescriptionList" : [ ], | ||
"patientIndex" : "1" | ||
} ] | ||
} |
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
Oops, something went wrong.