Skip to content
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 filtering of contacts by number #56

Merged

Conversation

KrashKart
Copy link

Fixes #47

Let's
* implement FindByContact
* change AddressBookParserTest, FindCommandParser unit tests
* add unit test for FindByContact
* tidy code for checkstyle
@KrashKart KrashKart added type.Enhancement An enhancement to an existing story priority.High Must do labels Oct 10, 2024
@KrashKart KrashKart added this to the v1.2 milestone Oct 10, 2024
@KrashKart KrashKart self-assigned this Oct 10, 2024
For FindByContactCommand and FindByNameCommand
Copy link

codecov bot commented Oct 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ Complexity Δ
...u/address/logic/commands/FindByContactCommand.java 100.00% <100.00%> (ø) 4.00 <4.00> (?)
...eedu/address/logic/commands/FindByNameCommand.java 100.00% <ø> (ø) 4.00 <0.00> (ø)
.../seedu/address/logic/parser/FindCommandParser.java 82.35% <100.00%> (+2.35%) 5.00 <0.00> (+1.00)

... and 1 file with indirect coverage changes

@KrashKart KrashKart marked this pull request as ready for review October 10, 2024 06:04
@KrashKart KrashKart requested a review from yooplo October 10, 2024 06:09
/**
* Contains integration tests (interaction with the Model) for {@code FindByContactCommand}.
*/
public class FindByContactCommandTest {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good test coverage

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Finds all persons whose names "
+ "contain any of the specified keywords (case-insensitive) and displays them as a list with indices.\n"
+ "Parameters: KEYWORD [MORE_KEYWORDS]...\n"
+ "Example: " + COMMAND_WORD + " alice bob charlie";
public FindByNameCommand(NameContainsKeywordsPredicate predicate) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep that works

Make the error message more appropriate for contact numbers
Test for the correct MESSAGE_USAGE
This is infuriatingly dumb
Copy link

@yooplo yooplo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good to go

@CYX22222003 CYX22222003 merged commit a48b49b into AY2425S1-CS2103T-F14a-4:master Oct 10, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority.High Must do type.Enhancement An enhancement to an existing story
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement finding of contacts by number
3 participants