forked from AY2324S2-CS2103T-T09-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.
Update test cases based on new tutorial team name class
- Loading branch information
Showing
13 changed files
with
78 additions
and
70 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
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
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
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,11 +1,17 @@ | ||
package seedu.address.logic.commands; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import static org.junit.jupiter.api.Assertions.assertThrows; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME; | ||
|
||
import java.util.HashSet; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import seedu.address.logic.commands.exceptions.CommandException; | ||
import seedu.address.model.Model; | ||
import seedu.address.model.ModelManager; | ||
import seedu.address.model.module.ModuleCode; | ||
import seedu.address.model.module.ModuleCode; | ||
import seedu.address.model.module.TutorialClass; | ||
import seedu.address.model.module.TutorialTeam; | ||
import seedu.address.model.module.TutorialTeamName; | ||
|
@@ -14,11 +20,6 @@ | |
import seedu.address.model.person.Person; | ||
import seedu.address.model.person.StudentId; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import static org.junit.jupiter.api.Assertions.assertThrows; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME; | ||
import java.util.HashSet; | ||
|
||
public class ViewTeamCommandTest { | ||
|
||
@Test | ||
|
@@ -31,8 +32,10 @@ public void execute_validInput_teamFound() throws Exception { | |
|
||
TutorialTeamName teamName = new TutorialTeamName("Team A"); | ||
TutorialTeam team = new TutorialTeam(teamName.fullName, 2); | ||
Person john = new Person(new Name("John"), new Email("[email protected]"), new StudentId("A1234561Z"), new HashSet<>()); | ||
Person alice = new Person(new Name("Alice"), new Email("[email protected]"), new StudentId("A1234562Z"), new HashSet<>()); | ||
Person john = new Person(new Name("John"), new Email("[email protected]"), | ||
new StudentId("A1234561Z"), new HashSet<>()); | ||
Person alice = new Person(new Name("Alice"), new Email("[email protected]"), | ||
new StudentId("A1234562Z"), new HashSet<>()); | ||
team.addStudent(john); | ||
team.addStudent(alice); | ||
tutorialClass.addTeam(team); | ||
|
@@ -54,8 +57,12 @@ public void execute_invalidTeamName_exceptionThrown() { | |
|
||
TutorialTeamName teamName = new TutorialTeamName("Team A"); | ||
TutorialTeam team = new TutorialTeam(teamName.fullName, 2); | ||
Person john = new Person(new Name("John"), new Email("[email protected]"), new StudentId("A1234561Z"), new HashSet<>()); | ||
Person alice = new Person(new Name("Alice"), new Email("[email protected]"), new StudentId("A1234562Z"), new HashSet<>()); | ||
Person john = new Person(new Name("John"), new Email("[email protected]"), | ||
new StudentId("A1234561Z"), new HashSet<>()); | ||
Person alice = new Person(new Name("Alice"), new Email("[email protected]"), | ||
new StudentId("A1234562Z"), new HashSet<>()); | ||
team.addStudent(john); | ||
team.addStudent(alice); | ||
tutorialClass.addTeam(team); | ||
|
||
ViewTeamCommand command = new ViewTeamCommand(PREFIX_NAME, "Team B", moduleCode, tutorialClass); | ||
|
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
11 changes: 6 additions & 5 deletions
11
src/test/java/seedu/address/logic/parser/ViewTeamCommandParserTest.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
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