Search in sources :

Example 1 with ExistingVisitAssignmentHandler

use of org.openmrs.api.handler.ExistingVisitAssignmentHandler in project openmrs-core by openmrs.

the class EncounterServiceTest method getVisitAssignmentHandlers_shouldReturnTheExistingVisitOnlyAssignmentHandler.

/**
 * @see EncounterService#getVisitAssignmentHandlers()
 */
@Test
public void getVisitAssignmentHandlers_shouldReturnTheExistingVisitOnlyAssignmentHandler() {
    List<EncounterVisitHandler> handlers = Context.getEncounterService().getEncounterVisitHandlers();
    boolean found = false;
    for (EncounterVisitHandler handler : handlers) {
        if (handler instanceof ExistingVisitAssignmentHandler) {
            found = true;
            break;
        }
    }
    Assert.assertTrue("The 'existing visit only assignment' handler was not found", found);
}
Also used : EncounterVisitHandler(org.openmrs.api.handler.EncounterVisitHandler) ExistingVisitAssignmentHandler(org.openmrs.api.handler.ExistingVisitAssignmentHandler) BaseContextSensitiveTest(org.openmrs.test.BaseContextSensitiveTest) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 EncounterVisitHandler (org.openmrs.api.handler.EncounterVisitHandler)1 ExistingVisitAssignmentHandler (org.openmrs.api.handler.ExistingVisitAssignmentHandler)1 BaseContextSensitiveTest (org.openmrs.test.BaseContextSensitiveTest)1