Search in sources :

Example 6 with EncounterVisitHandler

use of org.openmrs.api.handler.EncounterVisitHandler 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);
}
Also used : ExistingOrNewVisitAssignmentHandler(org.openmrs.api.handler.ExistingOrNewVisitAssignmentHandler) EncounterVisitHandler(org.openmrs.api.handler.EncounterVisitHandler) Test(org.junit.Test) BaseContextSensitiveTest(org.openmrs.test.BaseContextSensitiveTest)

Aggregations

EncounterVisitHandler (org.openmrs.api.handler.EncounterVisitHandler)6 Test (org.junit.Test)5 BaseContextSensitiveTest (org.openmrs.test.BaseContextSensitiveTest)5 ExistingOrNewVisitAssignmentHandler (org.openmrs.api.handler.ExistingOrNewVisitAssignmentHandler)2 GlobalProperty (org.openmrs.GlobalProperty)1 APIException (org.openmrs.api.APIException)1 EncounterTypeLockedException (org.openmrs.api.EncounterTypeLockedException)1 ExistingVisitAssignmentHandler (org.openmrs.api.handler.ExistingVisitAssignmentHandler)1 NoVisitAssignmentHandler (org.openmrs.api.handler.NoVisitAssignmentHandler)1 Transactional (org.springframework.transaction.annotation.Transactional)1