Skip to content

Commit

Permalink
Merge pull request #181
Browse files Browse the repository at this point in the history
Create test for SaveCommand
  • Loading branch information
JJtan2002 authored Oct 28, 2024
2 parents c11d200 + 1ec7a7a commit 404f3ce
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/test/java/seedu/address/logic/commands/SaveCommandTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package seedu.address.logic.commands;

import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;
import static seedu.address.logic.commands.SaveCommand.MESSAGE_SUCCESS;

import org.junit.jupiter.api.Test;

import seedu.address.model.Model;
import seedu.address.model.ModelManager;

public class SaveCommandTest {
private Model model = new ModelManager();
private Model expectedModel = new ModelManager();

@Test
public void execute_save_success() {
CommandResult expectedCommandResult = new CommandResult(MESSAGE_SUCCESS, false, false, true, false);
assertCommandSuccess(new SaveCommand(), model, expectedCommandResult, expectedModel);
}
}

0 comments on commit 404f3ce

Please sign in to comment.