forked from AY2324S1-CS2103T-W08-1/tp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request AY2324S1-CS2103T-W08-1#108 from AustinHuang1203/te…
…stsbranch Add testcases for clear and confirmation
- Loading branch information
Showing
2 changed files
with
17 additions
and
16 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
18 changes: 8 additions & 10 deletions
18
src/test/java/seedu/staffsnap/logic/commands/ConfirmationCommandTest.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 |
---|---|---|
@@ -1,22 +1,20 @@ | ||
package seedu.staffsnap.logic.commands; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
import static seedu.staffsnap.testutil.TypicalApplicants.getUnsortedApplicantBook; | ||
|
||
import java.util.Objects; | ||
import static seedu.staffsnap.logic.commands.CommandTestUtil.assertCommandSuccess; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import seedu.staffsnap.model.Model; | ||
import seedu.staffsnap.model.ModelManager; | ||
import seedu.staffsnap.model.UserPrefs; | ||
|
||
class ConfirmationCommandTest { | ||
|
||
public class ConfirmationCommandTest { | ||
@Test | ||
void execute() { | ||
Model model = new ModelManager(getUnsortedApplicantBook(), new UserPrefs()); | ||
ConfirmationCommand command = new ConfirmationCommand(); | ||
assertTrue(Objects.equals(command.execute(model), new CommandResult(ConfirmationCommand.CONFIRM))); | ||
public void execute_emptyApplicantBook_success() { | ||
Model model = new ModelManager(); | ||
Model expectedModel = new ModelManager(); | ||
|
||
assertCommandSuccess(new ConfirmationCommand(), model, ConfirmationCommand.CONFIRM, expectedModel); | ||
} | ||
|
||
} |