Skip to content

Commit

Permalink
Update test files
Browse files Browse the repository at this point in the history
  • Loading branch information
gongg21 committed Oct 16, 2023
1 parent 9d4d1b2 commit 414c427
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public String toString() {
.add("name", name)
.add("course", course)
.add("email", email)
.add("email", remark)
.add("remark", remark)
.add("tags", tags)
.toString();
}
Expand Down
8 changes: 3 additions & 5 deletions src/test/java/seedu/address/logic/LogicManagerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static seedu.address.logic.Messages.MESSAGE_INVALID_STUDENT_DISPLAYED_INDEX;
import static seedu.address.logic.Messages.MESSAGE_UNKNOWN_COMMAND;
import static seedu.address.logic.commands.CommandTestUtil.COURSE_DESC_AMY;
import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;
import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;
import static seedu.address.logic.commands.CommandTestUtil.*;
import static seedu.address.testutil.Assert.assertThrows;
import static seedu.address.testutil.TypicalStudents.AMY;

Expand Down Expand Up @@ -165,8 +163,8 @@ public void saveStudentList(ReadOnlyStudentList studentList, Path filePath)

// Triggers the saveAddressBook method by executing an add command
String addCommand = AddCommand.COMMAND_WORD + NAME_DESC_AMY + COURSE_DESC_AMY
+ EMAIL_DESC_AMY;
Student expectedStudent = new StudentBuilder(AMY).withTags().build();
+ EMAIL_DESC_AMY + TAG_DESC_AVERAGE;
Student expectedStudent = new StudentBuilder(AMY).build();
ModelManager expectedModel = new ModelManager();
expectedModel.addStudent(expectedStudent);
assertCommandFailure(addCommand, CommandException.class, expectedMessage, expectedModel);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static seedu.address.logic.parser.CliSyntax.PREFIX_COURSE;
import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;
import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;
import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;
import static seedu.address.logic.parser.CliSyntax.*;
import static seedu.address.testutil.Assert.assertThrows;

import java.util.ArrayList;
Expand Down Expand Up @@ -51,6 +48,7 @@ public class CommandTestUtil {
public static final String EMAIL_DESC_AMY = " " + PREFIX_EMAIL + VALID_EMAIL_AMY;
public static final String EMAIL_DESC_BOB = " " + PREFIX_EMAIL + VALID_EMAIL_BOB;
public static final String EMAIL_DESC_CLARA = " " + PREFIX_EMAIL + VALID_EMAIL_CLARA;
public static final String REMARK_DESC_AMY = " " + PREFIX_REMARK + VALID_REMARK_AMY;
public static final String TAG_DESC_AVERAGE = " " + PREFIX_TAG + VALID_TAG_AVERAGE;
public static final String TAG_DESC_GOOD = " " + PREFIX_TAG + VALID_TAG_GOOD;
public static final String TAG_DESC_POOR = " " + PREFIX_TAG + VALID_TAG_POOR;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public void toStringMethod() {
String expected = EditStudentDescriptor.class.getCanonicalName() + "{name="
+ editPersonDescriptor.getName().orElse(null) + ", course="
+ editPersonDescriptor.getCourse().orElse(null) + ", email="
+ editPersonDescriptor.getEmail().orElse(null) + ", tags="
+ editPersonDescriptor.getEmail().orElse(null) + ", remark="
+ editPersonDescriptor.getRemark().orElse(null) + ", tags="
+ editPersonDescriptor.getTags().orElse(null) + "}";
assertEquals(expected, editPersonDescriptor.toString());
}
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/seedu/address/testutil/StudentBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class StudentBuilder {
public static final String DEFAULT_NAME = "Amy Bee";
public static final String DEFAULT_COURSE = "CS2103T";
public static final String DEFAULT_EMAIL = "[email protected]";
public static final String DEFAULT_REMARK = "She likes aardvarks.";
public static final String DEFAULT_REMARK = "Likes skiing.";

private Name name;
private Course course;
Expand All @@ -35,7 +35,7 @@ public StudentBuilder() {
name = new Name(DEFAULT_NAME);
course = new Course(DEFAULT_COURSE);
email = new Email(DEFAULT_EMAIL);
remark = new Remark(DEFAULT_REMARK);
remark = new Remark("");
tags = new HashSet<>();
}

Expand Down

0 comments on commit 414c427

Please sign in to comment.