Skip to content

Commit

Permalink
Merge pull request #81 from yentheng0110/YenTheng_JUnitTestForDelete
Browse files Browse the repository at this point in the history
Implement JUnit Test for [delete] command
  • Loading branch information
kaboomzxc authored Oct 10, 2024
2 parents 0a83d54 + 69273a3 commit ce672b4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/test/java/bookbob/BookBobTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,15 @@ void testList_emptyList_noPatientFoundMessage() {
String expectedOutput = "No patients found.";
}

//@@author yentheng0110
@Test
void testDelete_deleteNonExistingPatient_recordsSizeRemainsTheSame() throws IOException {
command.add("add n/Jack Wong ic/S9765432T p/87658976 d/Gastric m/Gaviscon ha/Bukit Gombak dob/06071997",
records);
command.delete("S9587690H", records);
assertEquals(1, records.getPatients().size());
}

//@@author yentheng0110
@Test
void testAdd_addPatientWithoutNRIC_patientNotAdded() throws IOException {
Expand Down

0 comments on commit ce672b4

Please sign in to comment.