-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add deadline test for PersonTest.java #218
Conversation
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.
lgtm!
|
||
editedAlice = new PersonBuilder(aliceCopy).build() | ||
.withGoal(new Goal(Goal.Frequency.WEEKLY)) | ||
.withMeetings(Arrays.asList(TypicalMeetings.getTypicalMeetings().clone())); |
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.
Actually don't have to clone right?
Person aliceCopy = new PersonBuilder(ALICE).build(); | ||
LocalDate date = LocalDate.of(2021, 3, 30); | ||
|
||
Person editedAlice = new PersonBuilder(aliceCopy).build() |
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.
Just rename all aliceCopy
to ALICE
, shouldn't need to copy here
// no prior meetings | ||
editedAlice = new PersonBuilder(aliceCopy).build() | ||
.withGoal(new Goal(Goal.Frequency.WEEKLY)) | ||
.withMeetings(new ArrayList<>()); |
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.
.withMeetings(Collections.emptyList())
would be better
@@ -21,4 +21,13 @@ | |||
.withDate(LocalDate.now()) | |||
.withTime(LocalTime.now()) | |||
.build(); | |||
|
|||
public static Meeting[] getTypicalMeetings() { |
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.
Can shift this to PersonTest
because getTypicalMeetings()
feels like I am retrieving all the meetings from TypicalMeetings
but that is not the case 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.
I merely did this as TypicalPersons
has a getTypicalPersons
method. I suppose we could have a test equivalent of SampleDataUtil
in main
No description provided.