forked from nus-cs2103-AY2425S1/tp
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
202 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,14 +5,14 @@ | |
"phone" : "94351253", | ||
"email" : "[email protected]", | ||
"address" : "123, Jurong West Ave 6, #08-111", | ||
"remark": "", | ||
"remark": "She likes aarvarks", | ||
"tags" : [ "friends" ] | ||
}, { | ||
"name" : "Benson Meier", | ||
"phone" : "98765432", | ||
"email" : "[email protected]", | ||
"address" : "311, Clementi Ave 2, #02-25", | ||
"remark": "", | ||
"remark": "He can't take beer!", | ||
"tags" : [ "owesMoney", "friends" ] | ||
}, { | ||
"name" : "Carl Kurz", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/test/java/seedu/address/logic/commands/RemarkCommandTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package seedu.address.logic.commands; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertFalse; | ||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY; | ||
import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB; | ||
import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON; | ||
import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import seedu.address.model.person.Remark; | ||
|
||
public class RemarkCommandTest { | ||
@Test | ||
public void equals() { | ||
|
||
Remark amyRemark = new Remark(VALID_REMARK_AMY); | ||
final RemarkCommand standardCommand = new RemarkCommand(INDEX_FIRST_PERSON, amyRemark); | ||
|
||
// same values -> returns true | ||
RemarkCommand commandWithSameValues = new RemarkCommand(INDEX_FIRST_PERSON, amyRemark); | ||
assertTrue(standardCommand.equals(commandWithSameValues)); | ||
|
||
// same object -> returns true | ||
assertTrue(standardCommand.equals(standardCommand)); | ||
|
||
// null -> returns false | ||
assertFalse(standardCommand.equals(null)); | ||
|
||
// different types -> returns false | ||
assertFalse(standardCommand.equals(new ClearCommand())); | ||
|
||
// different index -> returns false | ||
assertFalse(standardCommand.equals(new RemarkCommand(INDEX_SECOND_PERSON, amyRemark))); | ||
|
||
Remark bobRemark = new Remark(VALID_REMARK_BOB); | ||
// different remark -> returns false | ||
assertFalse(standardCommand.equals(new RemarkCommand(INDEX_FIRST_PERSON, bobRemark))); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.