Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boost coverage #209

Merged
merged 1 commit into from
Nov 12, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;
import static seedu.address.logic.commands.DeleteCommand.MESSAGE_INVALID_PERSON_ID;
import static seedu.address.logic.parser.CmdTypeCliSyntax.CMDTYPE_APPOINTMENT;
import static seedu.address.logic.parser.CmdTypeCliSyntax.CMDTYPE_PATIENT;
import static seedu.address.model.AddressBookModel.PREDICATE_SHOW_ALL_PERSONS;

Expand Down Expand Up @@ -78,8 +80,19 @@ public void delete_invalidCmdType() throws Exception {
new CommandHistory());
}

@Test
public void checkEqual() {
DeleteCommand deleteCommand = new DeleteCommand(CMDTYPE_PATIENT, "dummy");
DeleteCommand deleteCommand1 = new DeleteCommand(CMDTYPE_PATIENT, "dummy");
DeleteCommand deleteCommand2 = new DeleteCommand(CMDTYPE_APPOINTMENT, "dummy");

assertEquals(deleteCommand, deleteCommand1);
assertNotEquals(deleteCommand1, deleteCommand2);
}

/**
* makes sure that the deleting is successful
*
* @param addressBookModel address book model
* @param target target for deletion
* @throws Exception
Expand Down Expand Up @@ -108,8 +121,9 @@ private void assertDeletePatientSuccess(AddressBookModel addressBookModel, Strin

/**
* Triggers delete failure
*
* @param addressBookModel address book model
* @param target target for deletion
* @param target target for deletion
* @throws Exception
*/
private void triggerDeletePatientFailure(AddressBookModel addressBookModel, String target)
Expand Down