diff --git a/src/main/java/seedu/address/logic/commands/RemarkCommand.java b/src/main/java/seedu/address/logic/commands/RemarkCommand.java index 2bf1cb655a7..6d8d9ea7e1d 100644 --- a/src/main/java/seedu/address/logic/commands/RemarkCommand.java +++ b/src/main/java/seedu/address/logic/commands/RemarkCommand.java @@ -7,8 +7,8 @@ import java.util.List; import seedu.address.commons.core.index.Index; -import seedu.address.logic.commands.exceptions.CommandException; import seedu.address.logic.Messages; +import seedu.address.logic.commands.exceptions.CommandException; import seedu.address.model.Model; import seedu.address.model.person.Person; import seedu.address.model.person.Remark; diff --git a/src/main/java/seedu/address/model/person/Remark.java b/src/main/java/seedu/address/model/person/Remark.java index 2e5c65280b9..e3bd821170e 100644 --- a/src/main/java/seedu/address/model/person/Remark.java +++ b/src/main/java/seedu/address/model/person/Remark.java @@ -9,6 +9,11 @@ public class Remark { public final String value; + /** + * Constructs a {@code Remark}. + * + * @param remark A valid remark. + */ public Remark(String remark) { requireNonNull(remark); value = remark; diff --git a/src/test/java/seedu/address/logic/commands/RemarkCommandTest.java b/src/test/java/seedu/address/logic/commands/RemarkCommandTest.java index 35d274a7b37..08354c0cff6 100644 --- a/src/test/java/seedu/address/logic/commands/RemarkCommandTest.java +++ b/src/test/java/seedu/address/logic/commands/RemarkCommandTest.java @@ -2,7 +2,6 @@ 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.logic.commands.CommandTestUtil.assertCommandFailure; @@ -14,8 +13,8 @@ import org.junit.jupiter.api.Test; -import seedu.address.commons.core.Messages; import seedu.address.commons.core.index.Index; +import seedu.address.logic.Messages; import seedu.address.model.AddressBook; import seedu.address.model.Model; import seedu.address.model.ModelManager; diff --git a/src/test/java/seedu/address/logic/parser/AddressBookParserTest.java b/src/test/java/seedu/address/logic/parser/AddressBookParserTest.java index 5c4733feade..bd88590fee6 100644 --- a/src/test/java/seedu/address/logic/parser/AddressBookParserTest.java +++ b/src/test/java/seedu/address/logic/parser/AddressBookParserTest.java @@ -2,8 +2,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; -import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND; +import static seedu.address.logic.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.address.logic.Messages.MESSAGE_UNKNOWN_COMMAND; import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK; import static seedu.address.testutil.Assert.assertThrows; import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON; diff --git a/src/test/java/seedu/address/logic/parser/RemarkCommandParserTest.java b/src/test/java/seedu/address/logic/parser/RemarkCommandParserTest.java index 8a2bfd0414f..14d45a5e2d6 100644 --- a/src/test/java/seedu/address/logic/parser/RemarkCommandParserTest.java +++ b/src/test/java/seedu/address/logic/parser/RemarkCommandParserTest.java @@ -1,6 +1,6 @@ package seedu.address.logic.parser; -import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.address.logic.Messages.MESSAGE_INVALID_COMMAND_FORMAT; import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK; import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure; import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess; diff --git a/src/test/java/seedu/address/model/person/PersonTest.java b/src/test/java/seedu/address/model/person/PersonTest.java index 31a10d156c9..fa4721af782 100644 --- a/src/test/java/seedu/address/model/person/PersonTest.java +++ b/src/test/java/seedu/address/model/person/PersonTest.java @@ -32,10 +32,10 @@ public void isSamePerson() { // null -> returns false assertFalse(ALICE.isSamePerson(null)); - // same name, all other attributes different -> returns true + // same name, all other attributes different -> returns false Person editedAlice = new PersonBuilder(ALICE).withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB) .withAddress(VALID_ADDRESS_BOB).withTags(VALID_TAG_HUSBAND).build(); - assertTrue(ALICE.isSamePerson(editedAlice)); + assertFalse(ALICE.isSamePerson(editedAlice)); // different name, all other attributes same -> returns false editedAlice = new PersonBuilder(ALICE).withName(VALID_NAME_BOB).build(); @@ -92,8 +92,8 @@ public void equals() { @Test public void toStringMethod() { - String expected = Person.class.getCanonicalName() + "{name=" + ALICE.getName() + ", phone=" + ALICE.getPhone() - + ", email=" + ALICE.getEmail() + ", address=" + ALICE.getAddress() + ", tags=" + ALICE.getTags() + "}"; + String expected = "Alice Pauline Phone: 94351253 Email: alice@example.com Address: 123," + + " Jurong West Ave 6, #08-111 Remark: She likes aardvarks. Tags: [friends]"; assertEquals(expected, ALICE.toString()); } }