Skip to content

Commit

Permalink
Fixed Checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
afiqlattif committed Nov 10, 2018
1 parent 566414e commit a0dc394
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public EditCommand parse(String args) throws ParseException {
.getValue(PREFIX_NAME).get()));
}
if (argMultimap.getValue(PREFIX_ID).isPresent()) {
throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,
throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,
EditCommand.MESSAGE_USAGE));
}
if (argMultimap.getValue(PREFIX_GENDER).isPresent()) {
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/seedu/address/commons/util/XmlUtilTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ public void xmlAdaptedFromFile_fileWithMissingVolunteerField_validResult() throw
public void xmlAdaptedFromFile_fileWithInvalidVolunteerField_validResult() throws Exception {
XmlAdaptedVolunteer actualVolunteer = XmlUtil.getDataFromFile(
INVALID_VOLUNTEER_FIELD_FILE, XmlAdaptedVolunteerWithRootElement.class);
XmlAdaptedVolunteer expectedVolunteer = new XmlAdaptedVolunteer(VALID_NAME, VALID_ID, VALID_GENDER, VALID_BIRTHDAY,
INVALID_PHONE, VALID_EMAIL, VALID_ADDRESS, VALID_VOLUNTEER_TAGS);
XmlAdaptedVolunteer expectedVolunteer = new XmlAdaptedVolunteer(VALID_NAME, VALID_ID, VALID_GENDER,
VALID_BIRTHDAY, INVALID_PHONE, VALID_EMAIL, VALID_ADDRESS, VALID_VOLUNTEER_TAGS);
assertEquals(expectedVolunteer, actualVolunteer);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package seedu.address.logic.commands;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;
import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY;
import static seedu.address.logic.commands.CommandTestUtil.DESC_BOB;
Expand Down
4 changes: 3 additions & 1 deletion src/test/java/seedu/address/model/AddressBookTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ private static class AddressBookStub implements ReadOnlyAddressBook {
}

@Override
public ObservableList<Volunteer> getVolunteerList() { return volunteers; }
public ObservableList<Volunteer> getVolunteerList() {
return volunteers;
}

@Override
public ObservableList<Event> getEventList() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void toModelType_nullName_throwsIllegalValueException() {
@Test
public void toModelType_invalidId_throwsIllegalValueException() {
XmlAdaptedVolunteer volunteer =
new XmlAdaptedVolunteer(VALID_NAME, INVALID_VOLUNTEERID,VALID_GENDER,
new XmlAdaptedVolunteer(VALID_NAME, INVALID_VOLUNTEERID, VALID_GENDER,
VALID_BIRTHDAY, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS, VALID_TAGS);
String expectedMessage = VolunteerId.MESSAGE_ID_CONSTRAINTS;
Assert.assertThrows(IllegalValueException.class, expectedMessage, volunteer::toModelType);
Expand All @@ -95,7 +95,7 @@ public void toModelType_invalidGender_throwsIllegalValueException() {

@Test
public void toModelType_nullGender_throwsIllegalValueException() {
XmlAdaptedVolunteer volunteer = new XmlAdaptedVolunteer(VALID_NAME, VALID_VOLUNTEERID,null,
XmlAdaptedVolunteer volunteer = new XmlAdaptedVolunteer(VALID_NAME, VALID_VOLUNTEERID, null,
VALID_BIRTHDAY, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS, VALID_TAGS);
String expectedMessage = String.format(MISSING_FIELD_MESSAGE_FORMAT, Gender.class.getSimpleName());
Assert.assertThrows(IllegalValueException.class, expectedMessage, volunteer::toModelType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import seedu.address.model.volunteer.Name;
import seedu.address.model.volunteer.Phone;
import seedu.address.model.volunteer.Volunteer;
import seedu.address.model.volunteer.VolunteerId;

/**
* A utility class to help with building EditVolunteerDescriptor objects.
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/seedu/address/ui/VolunteerListPanelTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ private Path createXmlFileWithVolunteers(int volunteerCount) throws Exception {
for (int i = 0; i < volunteerCount; i++) {
builder.append("<volunteers>\n");
builder.append("<name>John</name>\n");
builder.append("<volunteerId>S").append(i+1000000).append("B</volunteerId>\n");
builder.append("<volunteerId>S").append(i + 1000000).append("B</volunteerId>\n");
builder.append("<gender>m</gender>\n");
builder.append("<birthday>01-01-1991</birthday>\n");
builder.append("<phone>000</phone>\n");
Expand Down
9 changes: 0 additions & 9 deletions src/test/java/systemtests/EditCommandSystemTest.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package systemtests;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;
import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;
import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;
Expand All @@ -11,16 +10,13 @@
import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;
import static seedu.address.logic.commands.CommandTestUtil.GENDER_DESC_AMY;
import static seedu.address.logic.commands.CommandTestUtil.GENDER_DESC_BOB;
import static seedu.address.logic.commands.CommandTestUtil.ID_DESC_AMY;
import static seedu.address.logic.commands.CommandTestUtil.ID_DESC_BOB;
import static seedu.address.logic.commands.CommandTestUtil.INVALID_ADDRESS_DESC;
import static seedu.address.logic.commands.CommandTestUtil.INVALID_BIRTHDAY_DESC;
import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;
import static seedu.address.logic.commands.CommandTestUtil.INVALID_GENDER_DESC;
import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;
import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;
import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;
import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;
import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;
import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;
import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;
Expand All @@ -30,17 +26,12 @@
import static seedu.address.logic.commands.CommandTestUtil.VALID_BIRTHDAY_AMY;
import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;
import static seedu.address.logic.commands.CommandTestUtil.VALID_GENDER_AMY;
import static seedu.address.logic.commands.CommandTestUtil.VALID_ID_AMY;
import static seedu.address.logic.commands.CommandTestUtil.VALID_ID_BOB;
import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;
import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;
import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;
import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_DRIVER;
import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;
import static seedu.address.model.Model.PREDICATE_SHOW_ALL_VOLUNTEERS;
import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_VOLUNTEER;
import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_VOLUNTEER;
import static seedu.address.testutil.TypicalVolunteers.AMY;
import static seedu.address.testutil.TypicalVolunteers.BOB;
import static seedu.address.testutil.TypicalVolunteers.KEYWORD_MATCHING_MEIER;
import static seedu.address.testutil.VolunteerBuilder.DEFAULT_VOLUNTEERID;
Expand Down

0 comments on commit a0dc394

Please sign in to comment.