Skip to content

Commit

Permalink
Merge pull request #152 from sikai00/add-cr-getspecific-test
Browse files Browse the repository at this point in the history
Add test for getSpecific method
  • Loading branch information
sikai00 authored Oct 14, 2022
2 parents f79fd4e + b57cc56 commit 175964e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/test/java/seedu/address/logic/commands/CommandResultTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

import org.junit.jupiter.api.Test;
Expand Down Expand Up @@ -77,4 +78,15 @@ public void isExit_exitFalse_false() {
assertFalse(cr.isExit());
}

@Test
public void getCommandSpecific() {
CommandResult cr = new CommandResult("", CommandSpecific.CLIENT);
assertEquals(cr.getCommandSpecific(), CommandSpecific.CLIENT);

CommandResult cr2 = new CommandResult("", CommandSpecific.DETAILED_MEETING);
assertEquals(cr2.getCommandSpecific(), CommandSpecific.DETAILED_MEETING);

CommandResult cr3 = new CommandResult("");
assertNull(cr3.getCommandSpecific());
}
}

0 comments on commit 175964e

Please sign in to comment.