Package org.openmrs.api

Examples of org.openmrs.api.AdministrationService


    @Before
    public void setUp() throws Exception {
        String xml = (new TestUtil()).loadXmlFromFile(XML_HTML_FORM_ENTRY_REGIMEN_UTIL_TEST_DATASET);

        // used to avoid lock timeout on GP#order.nextOrderNumberSeed
        AdministrationService administrationService = mock(AdministrationService.class);

        when(administrationService.getGlobalProperty(OpenmrsConstants.GLOBAL_PROPERTY_STANDARD_DRUG_REGIMENS))
                .thenReturn(xml);

        when(administrationService.getGlobalProperty("")).thenAnswer(new Answer<String>() {
            @Override
            public String answer(InvocationOnMock invocationOnMock) throws Throwable {
                return "" + orderNumberCounter++;
            }
        });
View Full Code Here

TOP

Related Classes of org.openmrs.api.AdministrationService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.