Skip to content

Commit

Permalink
Fix checkstyle in JsonAdaptedPersonTest.
Browse files Browse the repository at this point in the history
  • Loading branch information
guanquann committed Mar 12, 2024
1 parent 85af32b commit 9b2cc3d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/test/java/seedu/address/storage/JsonAdaptedPersonTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ public void toModelType_invalidName_throwsIllegalValueException() {

@Test
public void toModelType_nullName_throwsIllegalValueException() {
JsonAdaptedPerson person = new JsonAdaptedPerson(null, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS, VALID_TAGS, VALID_ORDERS);
JsonAdaptedPerson person = new JsonAdaptedPerson(null, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS,
VALID_TAGS, VALID_ORDERS);
String expectedMessage = String.format(MISSING_FIELD_MESSAGE_FORMAT, Name.class.getSimpleName());
assertThrows(IllegalValueException.class, expectedMessage, person::toModelType);
}
Expand All @@ -66,7 +67,8 @@ public void toModelType_invalidPhone_throwsIllegalValueException() {

@Test
public void toModelType_nullPhone_throwsIllegalValueException() {
JsonAdaptedPerson person = new JsonAdaptedPerson(VALID_NAME, null, VALID_EMAIL, VALID_ADDRESS, VALID_TAGS, VALID_ORDERS);
JsonAdaptedPerson person = new JsonAdaptedPerson(VALID_NAME, null, VALID_EMAIL, VALID_ADDRESS,
VALID_TAGS, VALID_ORDERS);
String expectedMessage = String.format(MISSING_FIELD_MESSAGE_FORMAT, Phone.class.getSimpleName());
assertThrows(IllegalValueException.class, expectedMessage, person::toModelType);
}
Expand All @@ -81,7 +83,8 @@ public void toModelType_invalidEmail_throwsIllegalValueException() {

@Test
public void toModelType_nullEmail_throwsIllegalValueException() {
JsonAdaptedPerson person = new JsonAdaptedPerson(VALID_NAME, VALID_PHONE, null, VALID_ADDRESS, VALID_TAGS, VALID_ORDERS);
JsonAdaptedPerson person = new JsonAdaptedPerson(VALID_NAME, VALID_PHONE, null, VALID_ADDRESS,
VALID_TAGS, VALID_ORDERS);
String expectedMessage = String.format(MISSING_FIELD_MESSAGE_FORMAT, Email.class.getSimpleName());
assertThrows(IllegalValueException.class, expectedMessage, person::toModelType);
}
Expand All @@ -96,7 +99,8 @@ public void toModelType_invalidAddress_throwsIllegalValueException() {

@Test
public void toModelType_nullAddress_throwsIllegalValueException() {
JsonAdaptedPerson person = new JsonAdaptedPerson(VALID_NAME, VALID_PHONE, VALID_EMAIL, null, VALID_TAGS, VALID_ORDERS);
JsonAdaptedPerson person = new JsonAdaptedPerson(VALID_NAME, VALID_PHONE, VALID_EMAIL, null,
VALID_TAGS, VALID_ORDERS);
String expectedMessage = String.format(MISSING_FIELD_MESSAGE_FORMAT, Address.class.getSimpleName());
assertThrows(IllegalValueException.class, expectedMessage, person::toModelType);
}
Expand Down

0 comments on commit 9b2cc3d

Please sign in to comment.