Search in sources :

Example 26 with Config

use of org.openmrs.module.pihcore.config.Config in project openmrs-module-pihcore by PIH.

the class MirebalaisActivatorTest method setUp.

@Before
public void setUp() throws Exception {
    initializeInMemoryDatabase();
    executeDataSet("requiredDataTestDataset.xml");
    authenticate();
    deployService.installBundle(conceptsFromMetadataSharing);
    createEmrApiMappingSource(metadataMappingService);
    activator = new PihCoreActivator();
    Config config = mock(Config.class);
    when(config.getCountry()).thenReturn(ConfigDescriptor.Country.HAITI);
    when(config.getSite()).thenReturn(ConfigDescriptor.Site.MIREBALAIS);
    when(config.getBiometricsConfig()).thenReturn(new BiometricsConfigDescriptor());
    activator.setConfig(config);
    activator.started();
}
Also used : BiometricsConfigDescriptor(org.openmrs.module.pihcore.config.registration.BiometricsConfigDescriptor) Config(org.openmrs.module.pihcore.config.Config) Before(org.junit.Before)

Aggregations

Config (org.openmrs.module.pihcore.config.Config)26 Test (org.junit.Test)16 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)12 AppContextModel (org.openmrs.module.appframework.context.AppContextModel)8 VisitContextModel (org.openmrs.module.coreapps.contextmodel.VisitContextModel)8 Location (org.openmrs.Location)6 SimpleObject (org.openmrs.ui.framework.SimpleObject)6 Before (org.junit.Before)5 DateTime (org.joda.time.DateTime)4 EmrApiActivator (org.openmrs.module.emrapi.EmrApiActivator)4 BiometricsConfigDescriptor (org.openmrs.module.pihcore.config.registration.BiometricsConfigDescriptor)4 BaseModuleContextSensitiveTest (org.openmrs.test.BaseModuleContextSensitiveTest)4 File (java.io.File)3 ResourceFactory (org.openmrs.ui.framework.resource.ResourceFactory)3 Encounter (org.openmrs.Encounter)2 Order (org.openmrs.Order)2 Patient (org.openmrs.Patient)2 Module (org.openmrs.module.Module)2 MirebalaisHospitalActivator (org.openmrs.module.mirebalais.MirebalaisHospitalActivator)2 PihCoreActivator (org.openmrs.module.pihcore.PihCoreActivator)2