-
Notifications
You must be signed in to change notification settings - Fork 5
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
Implement edit patient doctor functionality #107
Implement edit patient doctor functionality #107
Conversation
…into branch-editpatientresolveconflicts
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #107 +/- ##
============================================
+ Coverage 79.33% 79.41% +0.08%
+ Complexity 690 677 -13
============================================
Files 109 107 -2
Lines 2095 2060 -35
Branches 225 218 -7
============================================
- Hits 1662 1636 -26
+ Misses 377 369 -8
+ Partials 56 55 -1 ☔ View full report in Codecov by Sentry. |
Phone updatedPhone = editPersonDescriptor.getPhone().orElse(personToEdit.getPhone()); | ||
Nric updatedNric = editPersonDescriptor.getNric().orElse(personToEdit.getNric()); | ||
DoB updatedDob = editPersonDescriptor.getDob().orElse(personToEdit.getDoB()); | ||
return new Patient(updatedNric, updatedName, updatedDob, updatedPhone); |
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.
I think this one can return a doctor too, so might wanna rethink the return statement
src/test/java/seedu/address/logic/commands/EditCommandTest.java
Outdated
Show resolved
Hide resolved
import seedu.address.testutil.EditPersonDescriptorBuilder; | ||
import seedu.address.testutil.PersonBuilder; |
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.
doesnt calling the PersonBuilder throw an error?
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.
yep changed it to patientbuilder instead
src/test/java/seedu/address/logic/commands/EditPersonDescriptorTest.java
Outdated
Show resolved
Hide resolved
assertEquals(expected, editPersonDescriptor.toString()); | ||
} | ||
} | ||
//package seedu.address.logic.commands; |
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.
I dont think this file should be deleted....
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.
added it back
} | ||
|
||
public Person build() { | ||
return new Patient(nric, name, dob, phone); |
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.
Why are we returning Patient in person builder? why does person builder still exist lol? just delete this already
No description provided.