use of org.openmrs.module.pihcore.PihCoreActivator in project openmrs-module-mirebalais by PIH.
the class MirebalaisHospitalActivatorIT method beforeEachTest.
@Before
public void beforeEachTest() throws Exception {
initializeInMemoryDatabase();
executeDataSet("requiredDataTestDataset.xml");
executeDataSet("globalPropertiesTestDataset.xml");
executeDataSet("serializedReportingDataset.xml");
executeDataSet("fromMirebalaisMetadataModule.xml");
authenticate();
deployService.installBundle(conceptsFromMetadataSharing);
personAttributeTypeBundle.install();
// run the emrapi activator
EmrApiActivator emrApiActivator = new EmrApiActivator();
emrApiActivator.started();
// set up metatdata from pih core first
PihCoreActivator pihCoreActivator = 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());
pihCoreActivator.setConfig(config);
pihCoreActivator.started();
MirebalaisHospitalActivator activator = new MirebalaisHospitalActivator();
activator.setTestMode(true);
activator.contextRefreshed();
activator.started();
}
use of org.openmrs.module.pihcore.PihCoreActivator in project openmrs-module-mirebalais by PIH.
the class MirebalaisHospitalActivatorComponentTest method beforeEachTest.
@Before
public void beforeEachTest() throws Exception {
initializeInMemoryDatabase();
executeDataSet("requiredDataTestDataset.xml");
executeDataSet("globalPropertiesTestDataset.xml");
executeDataSet("mirebalaisProviderIdentifierGeneratorComponentTestDataset.xml");
executeDataSet("fromMirebalaisMetadataModule.xml");
executeDataSet("serializedReportingDataset.xml");
authenticate();
deployService.installBundle(conceptsFromMetadataSharing);
haitiPersonAttributeTypeBundle.install();
// run the emrapi activator
emrApiActivator = new EmrApiActivator();
emrApiActivator.started();
// run the appointmentschedulingui manager
appointmentSchedulingUIActivator = new AppointmentSchedulingUIActivator();
appointmentSchedulingUIActivator.started();
// set up metadata from pih core first
pihCoreActivator = 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());
pihCoreActivator.setConfig(config);
pihCoreActivator.started();
mirebalaisHospitalActivator = new MirebalaisHospitalActivator();
// TODO: get ReportSetup to work while testing so we no longer need this
mirebalaisHospitalActivator.setTestMode(true);
mirebalaisHospitalActivator.willRefreshContext();
mirebalaisHospitalActivator.contextRefreshed();
mirebalaisHospitalActivator.willStart();
mirebalaisHospitalActivator.started();
}
Aggregations