Skip to content

Commit

Permalink
Update ThemeCommandTest
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlintyj committed Nov 9, 2023
1 parent a44e968 commit 0942d20
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/test/java/seedu/address/logic/commands/ThemeCommandTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
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.assertCommandSuccess;
import static seedu.address.logic.commands.ThemeCommand.MESSAGE_SUCCESS;

Expand Down Expand Up @@ -37,6 +39,29 @@ public void execute_mutlipleThemes_success() {
assertCommandSuccess(new ThemeCommand(true), model, expectedLightCommandResult, expectedModel);
}

@Test
public void equals() {

boolean isLightTheme = true;
boolean isNotLightTheme = false;

ThemeCommand firstCommand = new ThemeCommand(isLightTheme);
ThemeCommand secondCommand = new ThemeCommand(isNotLightTheme);

// same object -> returns true
assertTrue(firstCommand.equals(firstCommand));

// same values -> returns true
ThemeCommand firstCommandCopy = new ThemeCommand(isLightTheme);
assertTrue(firstCommand.equals(firstCommandCopy));

// null -> returns false
assertFalse(firstCommand.equals(null));

// different sort commands -> returns false
assertFalse(firstCommand.equals(secondCommand));
}



}

0 comments on commit 0942d20

Please sign in to comment.