-
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
Update Sort to include attribute Faculty #89
Update Sort to include attribute Faculty #89
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #89 +/- ##
============================================
+ Coverage 79.57% 79.68% +0.11%
- Complexity 574 579 +5
============================================
Files 89 90 +1
Lines 1733 1738 +5
Branches 178 179 +1
============================================
+ Hits 1379 1385 +6
+ Misses 321 320 -1
Partials 33 33 ☔ View full report in Codecov by Sentry. |
@@ -43,6 +44,7 @@ public void equals() { | |||
assertFalse(nameSortCommand.equals(new SortCommand(MODULE_COMPARATOR))); | |||
assertFalse(nameSortCommand.equals(new SortCommand(VENUE_COMPARATOR))); | |||
assertFalse(nameSortCommand.equals(new SortCommand(PHONE_COMPARATOR))); | |||
assertFalse(nameSortCommand.equals(new SortCommand(FACULTY_COMPARATOR))); |
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.
it would be better to arrage in alphabetic order
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 better to follow person's order, for readability? Also following how edit and add did their ordering.
Update: currently changed to person's order
assertParseSuccess(parser, "" + PREFIX_VENUE, new SortCommand(VENUE_COMPARATOR)); | ||
assertParseSuccess(parser, "" + PREFIX_FACULTY, new SortCommand(FACULTY_COMPARATOR)); |
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.
it would be better to arrange in alphabetic order
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.
looks good! minor edits to make in future PR
public static List<Person> getTypicalPersons() { | ||
return new ArrayList<>(Arrays.asList(ALICE, BENSON, CARL, CLARA, DANIEL, ELLE, FIONA, GEORGE, KAFKA, NATASHA)); | ||
return new ArrayList<>(Arrays.asList(ALICE, BENSON, CARL, CLARA, DANIEL, ELLE, FIONA, GEORGE, KAFKA, NATASHA, | ||
LEONARDO, MICHAEL)); | ||
} |
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.
ordering here is not in alphabetical order, next time we can edit this too
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.
Noted: #97
public static final Person KAFKA = new PersonBuilder().withName("Kafka Apache").withPhone("9452413") | ||
.withEmail("[email protected]").withModule("CS2102").withFaculty("Business") | ||
.withVenue("pteruges avenue").withTags("classmate").withAvailabilities("FRIDAY").build(); | ||
public static final Person NATASHA = new PersonBuilder().withName("Natasha Harrower").withPhone("8019394") | ||
.withEmail("[email protected]").withModule("CS2102") | ||
.withFaculty("Computing").withVenue("underworld avenue") | ||
.withTags("classmate").withAvailabilities("FRIDAY").build(); | ||
public static final Person LEONARDO = new PersonBuilder().withName("Leonardo DiCaprio").withPhone("88472234") | ||
.withEmail("[email protected]").withModule("TS2237") | ||
.withFaculty("Arts and Social Sciences").withVenue("LT13").build(); | ||
public static final Person MICHAEL = new PersonBuilder().withName("Michael Jackson").withPhone("92347123") | ||
.withEmail("[email protected]").withModule("MUA1163") | ||
.withFaculty("Music").withVenue("YSTCM-SR9").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.
good move to add our manually added testing data here, forgot about CLARA though, next time can edit!
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.
Noted: #97
closes #83