Created
March 22, 2018 10:59
-
-
Save mks-d/6f7923f1c654f51704a7ff353ad1cece to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.openmrs.module.attachments; | |
import java.util.List; | |
import org.junit.Test; | |
import org.openmrs.Encounter; | |
import org.openmrs.Patient; | |
import org.openmrs.Visit; | |
import org.openmrs.api.EncounterService; | |
import org.openmrs.api.PatientService; | |
import org.openmrs.api.VisitService; | |
import org.openmrs.module.attachments.obs.Attachment; | |
import org.springframework.beans.factory.annotation.Autowired; | |
public class AttachmentsServiceTest { | |
@Autowired | |
private AttachmentsService as; | |
@Autowired | |
private PatientService ps; | |
@Autowired | |
private VisitService vs; | |
@Autowired | |
private EncounterService es; | |
@Test | |
public void getAttachments_shouldReturnAttachments() { | |
// Setup | |
Patient patient = ps.getPatient(2); | |
Visit activeVisit = vs.getActiveVisitsByPatient(patient).get(0); | |
Encounter encounter = es.getEncountersByPatient(patient).get(0); | |
List<Attachment> attachmentList = as.getAttachments(patient, activeVisit, encounter, true); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment