forked from AY2324S1-CS2103T-W15-4/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.
Add DeleteCourseCommandParserTest and update test files
- Loading branch information
Showing
3 changed files
with
29 additions
and
18 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
25 changes: 25 additions & 0 deletions
25
src/test/java/seedu/codesphere/logic/parser/DeleteCourseCommandParserTest.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,25 @@ | ||
package seedu.codesphere.logic.parser; | ||
|
||
import static seedu.codesphere.logic.Messages.MESSAGE_INVALID_COMMAND_FORMAT; | ||
import static seedu.codesphere.logic.parser.CommandParserTestUtil.assertParseFailure; | ||
import static seedu.codesphere.logic.parser.CommandParserTestUtil.assertParseSuccess; | ||
import static seedu.codesphere.testutil.TypicalIndexes.INDEX_FIRST_STUDENT; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import seedu.codesphere.logic.commands.DeleteCourseCommand; | ||
|
||
public class DeleteCourseCommandParserTest { | ||
|
||
private DeleteCourseCommandParser parser = new DeleteCourseCommandParser(); | ||
|
||
@Test | ||
public void parse_validIndex_returnsDeleteCourseCommand() { | ||
assertParseSuccess(parser, "1", new DeleteCourseCommand(INDEX_FIRST_STUDENT)); | ||
} | ||
|
||
@Test | ||
public void parse_invalidIndex_throwsParseException() { | ||
assertParseFailure(parser, "a", String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCourseCommand.MESSAGE_USAGE)); | ||
} | ||
} |
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