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

Add functionality Force #102

Merged
merged 16 commits into from
Oct 17, 2024
Merged

Conversation

HanB1n
Copy link

@HanB1n HanB1n commented Oct 16, 2024

No description provided.

Add test for Wedding functions.
Fix conflicts in Messages.java
Fix conflicts in UntagCommand.java
Fix conflicts in AddressBookParser.java
Fix conflicts in AddressBook.java
Fix check style issues in Wedding classes.
Fix check style issues in Wedding test classes.
Add tests for UnassignWeddingCommand.
Add tests for AssignWeddingCommand.
Add tests for DeleteWeddingCommand.
Add tests for CreateWeddingCommand.
Add ability to force the assignment of wedding.
Creates a new Wedding Object if the Wedding does not already exist
when using force.
Add test for force functionality.
@HanB1n HanB1n added this to the v1.3 milestone Oct 16, 2024
@HanB1n HanB1n self-assigned this Oct 16, 2024
Add javadoc to explain overloaded constructor.
Copy link

codecov bot commented Oct 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ Complexity Δ
src/main/java/seedu/address/logic/Messages.java 90.90% <ø> (+4.54%) 5.00 <0.00> (+1.00)
...u/address/logic/commands/AssignWeddingCommand.java 93.02% <100.00%> (+77.87%) 11.00 <1.00> (+9.00)
...address/logic/commands/UnassignWeddingCommand.java 86.11% <ø> (+72.22%) 10.00 <0.00> (+8.00)
...dress/logic/parser/AssignWeddingCommandParser.java 90.90% <100.00%> (+0.90%) 8.00 <0.00> (+1.00)
...ain/java/seedu/address/logic/parser/CliSyntax.java 87.50% <100.00%> (+1.78%) 1.00 <0.00> (ø)
.../seedu/address/logic/parser/EditCommandParser.java 79.41% <ø> (ø) 12.00 <0.00> (ø)
src/main/java/seedu/address/model/AddressBook.java 85.52% <100.00%> (+2.63%) 29.00 <1.00> (+1.00)

... and 8 files with indirect coverage changes

Add test to test for force functionality in AssignWeddingCommand.
@HanB1n HanB1n linked an issue Oct 16, 2024 that may be closed by this pull request
Copy link

@dasha3412 dasha3412 left a comment

Choose a reason for hiding this comment

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

LGTM, some minor comment/variable changes

for (Wedding wedding : weddingsToAdd) {
if (!model.hasWedding(wedding)) {
if (this.force) {
CreateWeddingCommand newWedding = new CreateWeddingCommand(wedding);

Choose a reason for hiding this comment

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

Maybe can make this variable 'newWeddingCommand' to make the code clearer

Copy link
Author

Choose a reason for hiding this comment

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

Fixed.

Copy link

@riccoljy riccoljy left a comment

Choose a reason for hiding this comment

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

LGTM besides some CodeCov

Messages.format(targetWedding)));
} else {
throw new CommandException(
String.format(MESSAGE_DELETE_WEDDING_FAILURE_STILL_USED, Messages.format(targetWedding)));

Choose a reason for hiding this comment

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

CodeCov flagged this as not covered -- also couldn't find any tests that had MESSAGE_DELETE_WEDDING_FAILURE_STILL_USED as output, but maybe I overlooked!

# Conflicts:
#	src/main/java/seedu/address/logic/Messages.java
#	src/main/java/seedu/address/logic/commands/AssignWeddingCommand.java
#	src/main/java/seedu/address/logic/commands/CreateWeddingCommand.java
#	src/main/java/seedu/address/logic/commands/DeleteWeddingCommand.java
#	src/main/java/seedu/address/logic/commands/UnassignWeddingCommand.java
#	src/main/java/seedu/address/model/AddressBook.java
#	src/main/java/seedu/address/model/Model.java
#	src/main/java/seedu/address/model/ReadOnlyAddressBook.java
#	src/main/java/seedu/address/model/person/Person.java
#	src/main/java/seedu/address/model/wedding/UniqueWeddingList.java
#	src/main/java/seedu/address/model/wedding/Wedding.java
#	src/main/java/seedu/address/model/wedding/WeddingName.java
#	src/test/java/seedu/address/logic/parser/CreateWeddingCommandParserTest.java
#	src/test/java/seedu/address/logic/parser/DeleteWeddingCommandParserTest.java
#	src/test/java/seedu/address/model/AddressBookTest.java
#	src/test/java/seedu/address/testutil/TypicalPersons.java
Remove setTag from UniqueWeddingList.java.
Add Message to instruct users on Force functionality
in AssignWeddingCommand
@HanB1n HanB1n marked this pull request as ready for review October 17, 2024 10:51
Rename newWedding to newWeddingCommand.
@dasha3412 dasha3412 merged commit 38f0e0b into AY2425S1-CS2103T-F15-4:master Oct 17, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add functionality Force for AssignWedding
3 participants