diff --git a/src/main/java/seedu/address/logic/commands/ClearCommand.java b/src/main/java/seedu/address/logic/commands/ClearCommand.java index 9c86b1fa6e4..f4900055bd5 100644 --- a/src/main/java/seedu/address/logic/commands/ClearCommand.java +++ b/src/main/java/seedu/address/logic/commands/ClearCommand.java @@ -2,22 +2,22 @@ import static java.util.Objects.requireNonNull; -import seedu.address.model.AddressBook; +import seedu.address.model.ModBook; import seedu.address.model.Model; /** - * Clears the address book. + * Clears the ModBook. */ public class ClearCommand extends Command { public static final String COMMAND_WORD = "clear"; - public static final String MESSAGE_SUCCESS = "Address book has been cleared!"; + public static final String MESSAGE_SUCCESS = "ModBook has been cleared!"; @Override public CommandResult execute(Model model) { requireNonNull(model); - model.setAddressBook(new AddressBook()); + model.setModBook(new ModBook()); return new CommandResult(MESSAGE_SUCCESS); } } diff --git a/src/test/java/seedu/address/logic/commands/ClearCommandTest.java b/src/test/java/seedu/address/logic/commands/ClearCommandTest.java index 1966d7bda67..95edbd0b238 100644 --- a/src/test/java/seedu/address/logic/commands/ClearCommandTest.java +++ b/src/test/java/seedu/address/logic/commands/ClearCommandTest.java @@ -6,7 +6,7 @@ import org.junit.jupiter.api.Test; -import seedu.address.model.AddressBook; +import seedu.address.model.ModBook; import seedu.address.model.Model; import seedu.address.model.ModelManager; import seedu.address.model.UserPrefs; @@ -25,7 +25,7 @@ public void execute_emptyAddressBook_success() { public void execute_nonEmptyAddressBook_success() { Model model = new ModelManager(getTypicalAddressBook(), getTypicalModBook(), new UserPrefs()); Model expectedModel = new ModelManager(getTypicalAddressBook(), getTypicalModBook(), new UserPrefs()); - expectedModel.setAddressBook(new AddressBook()); + expectedModel.setModBook(new ModBook()); assertCommandSuccess(new ClearCommand(), model, ClearCommand.MESSAGE_SUCCESS, expectedModel); }