forked from nus-cs2103-AY2425S1/tp
-
Notifications
You must be signed in to change notification settings - Fork 5
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 #149 from xGladiate/update-ui
Resolve Inspection Command Bug
- Loading branch information
Showing
4 changed files
with
46 additions
and
6 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
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
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
31 changes: 31 additions & 0 deletions
31
src/test/java/seedu/address/logic/commands/InspectCommandTest.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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
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.testutil.TypicalIndexes.INDEX_FIRST; | ||
import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND; | ||
|
||
import org.junit.jupiter.api.Test; | ||
public class InspectCommandTest { | ||
@Test | ||
public void equals() { | ||
InspectCommand inspectFirstCommand = new InspectCommand(INDEX_FIRST); | ||
InspectCommand inspectSecondCommand = new InspectCommand(INDEX_SECOND); | ||
|
||
// same object -> returns true | ||
assertTrue(inspectFirstCommand.equals(inspectFirstCommand)); | ||
|
||
// same values -> returns true | ||
InspectCommand inspectFirstCommandCopy = new InspectCommand(INDEX_FIRST); | ||
assertTrue(inspectFirstCommand.equals(inspectFirstCommandCopy)); | ||
|
||
// different types -> returns false | ||
assertFalse(inspectFirstCommand.equals(1)); | ||
|
||
// null -> returns false | ||
assertFalse(inspectSecondCommand.equals(null)); | ||
|
||
// different person -> returns false | ||
assertFalse(inspectFirstCommand.equals(inspectSecondCommand)); | ||
} | ||
} |