use of org.openmrs.api.handler.ExistingOrNewVisitAssignmentHandler in project openmrs-core by openmrs.
the class EncounterServiceTest method getVisitAssignmentHandlers_shouldReturnTheExistingOrNewVisitAssignmentHandler.
/**
* @see EncounterService#getVisitAssignmentHandlers()
*/
@Test
public void getVisitAssignmentHandlers_shouldReturnTheExistingOrNewVisitAssignmentHandler() {
List<EncounterVisitHandler> handlers = Context.getEncounterService().getEncounterVisitHandlers();
boolean found = false;
for (EncounterVisitHandler handler : handlers) {
if (handler instanceof ExistingOrNewVisitAssignmentHandler) {
found = true;
break;
}
}
Assert.assertTrue("The 'existing or new visit only assignment' handler was not found", found);
}
use of org.openmrs.api.handler.ExistingOrNewVisitAssignmentHandler in project openmrs-core by openmrs.
the class ContextTest method getRegisteredComponent_shouldReturnBeanHaveBeenRegisteredOfThePassedTypeAndName.
/**
* @see Context#getRegisteredComponent(String,Class)
*/
@Test
public void getRegisteredComponent_shouldReturnBeanHaveBeenRegisteredOfThePassedTypeAndName() {
EncounterVisitHandler registeredComponent = Context.getRegisteredComponent("existingOrNewVisitAssignmentHandler", EncounterVisitHandler.class);
Assert.assertTrue(registeredComponent instanceof ExistingOrNewVisitAssignmentHandler);
}
Aggregations