Question: Hi I need help correcting this j unit test package medical.com.medicalApplication.model; import static org.junit.Assert.*; import org.junit.Test; import java.util.ArrayList; import java.util.List; /** * * This class

Hi I need help correcting this j unit test

package medical.com.medicalApplication.model;

import static org.junit.Assert.*;

import org.junit.Test;

import java.util.ArrayList; import java.util.List; /** * * This class represents a patient history model in the system * */ public class PatientHistory {

private List treatments; private List medications; private List allergy;

public PatientHistory() { this.treatments = new ArrayList(); this.medications = new ArrayList(); this.allergy = new ArrayList(); }

public void addTreatment(Treatment treatment) { treatments.add(treatment); }

public void addAllergy(Allergey allegry) { allergy.add(allegry); }

public void addMedication(Medication medication) { if(treatments != null){ medications.add(medication); } }

public List getAlergies() { return allergy; }

public List getAllTreatments() { return treatments; }

public List getAllMedications() { return medications; }

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!