-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#902:Updating and creating more testcases for person and patient services #1187
Conversation
hello @mozzy11 please review this pr |
@josephbate can you see the build failure ?? |
oh okay |
|
||
Assert.assertEquals(0, patientService.getAllPatients().size()); | ||
// save patient to the DB | ||
String patientId = patientService.insert(pat); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is about creating a patient.
Meaning we would have a patient created with in this fucntion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And also you need to assert the number of patients before and after
Patient savedPatient = patientService.get(patientId); | ||
|
||
Assert.assertEquals("NID45", savedPatient.getNationalId()); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unnecesary space
String nId = "NID45"; | ||
|
||
Assert.assertEquals("John", patientService.getPatientByNationalId(nId).getPerson().getFirstName()); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unnecesary space
String nId = "NID45"; | ||
|
||
Assert.assertEquals(1, patientService.getPatientsByNationalId(nId).size()); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unnecesary space
|
||
Person pat = createPerson(firstName, lastname); | ||
|
||
Assert.assertEquals(0, personService.getAllPersons().size()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is about creating a person so the should be a person created inside here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also , you need to assert the number existing persons before creating a new person
👋 Hi, @josephbate, This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there. |
@josephbate can you resolve the merge conflicts ?? |
0456e85
to
dca089f
Compare
Pull Requests Requirements
Issue number if applicable.
documentation.
Summary
Screenshots
[Add relevant screenshots here if applicable]
Related Issue
see: https://github.com/orgs/I-TECH-UW/projects/6/views/1?pane=issue&itemId=57668194
[Add a link to the related issue or mention it here if applicable]
Other
[Add any additional information or notes here]