@@ -201,42 +201,6 @@ public void parseEmail_validValueWithWhitespace_returnsTrimmedEmail() throws Exc
201201 Email expectedEmail = new Email (VALID_EMAIL );
202202 assertEquals (expectedEmail , ParserUtil .parseEmail (emailWithWhitespace ));
203203 }
204- @ Test
205- public void parseMedicalHistory_null_throwsNullPointerException () {
206- assertThrows (NullPointerException .class , () -> ParserUtil .parseMedicalHistories (null ));
207- }
208-
209- @ Test
210- public void parseMedicalHistory_validValueWithoutWhitespace_returnsTag () throws Exception {
211- MedicalHistory expectedMedicalHistory = new MedicalHistory (VALID_MEDICAL_HISTORY_1 );
212- assertEquals (expectedMedicalHistory , ParserUtil .parseMedicalHistory (VALID_MEDICAL_HISTORY_1 ));
213- }
214-
215- @ Test
216- public void parseMedicalHistory_collectionWithValidTags_returnsMedicalHistorySet () throws Exception {
217- Set <MedicalHistory > actualMedicalHistorySet = ParserUtil .parseMedicalHistories (
218- Arrays .asList (VALID_MEDICAL_HISTORY_1 , VALID_MEDICAL_HISTORY_2 ));
219- Set <MedicalHistory > expectedMedicalHistorySet = new HashSet <>(Arrays .asList (
220- new MedicalHistory (VALID_MEDICAL_HISTORY_1 ), new MedicalHistory (VALID_MEDICAL_HISTORY_2 )));
221- assertEquals (actualMedicalHistorySet , expectedMedicalHistorySet );
222- }
223-
224- @ Test
225- public void parseMedicalHistory_emptyCollection_returnsEmptySet () throws Exception {
226- assertTrue (ParserUtil .parseMedicalHistories (Collections .emptyList ()).isEmpty ());
227- }
228-
229- @ Test
230- public void parseMedicalHistory_invalidValue_throwsParseException () {
231- assertThrows (ParseException .class , () -> ParserUtil .parseMedicalHistory (INVALID_MEDICAL_HISTORY ));
232- }
233-
234-
235- @ Test
236- public void parseTag_emptyValue_throwsParseException () {
237- assertThrows (NullPointerException .class , () -> ParserUtil .parseMedicalHistories (null ));
238- }
239-
240204
241205 @ Test
242206 public void parseAppointment_invalidValue_throwsParseException () {
@@ -266,7 +230,7 @@ public void parseMedicalHistories_emptyHistory_exceptionThrown() {
266230 // Input data with an empty medical history
267231 String input = "History 1, , History 3" ;
268232
269- assertThrows (ParseException .class , () -> ParserUtil .parseMedicalHistories (Arrays .asList (input .split ("," ))));
233+ assertThrows (ParseException .class , () -> ParserUtil .parseMedicals (Arrays .asList (input .split ("," ))));
270234 }
271235
272236 @ Test
0 commit comments