Search in sources :

Example 1 with BasicUiUtils

use of org.openmrs.ui.framework.BasicUiUtils in project openmrs-module-coreapps by openmrs.

the class EncounterDiagnosesElementTest method testMessageWithUiUtils.

@Test
public void testMessageWithUiUtils() throws Exception {
    EncounterDiagnosesElement element = new EncounterDiagnosesElement();
    element.setUiUtils(new BasicUiUtils() {

        @Override
        public String message(String code, Object... args) {
            return "Translated";
        }
    });
    assertThat(element.message("code"), is("Translated"));
}
Also used : BasicUiUtils(org.openmrs.ui.framework.BasicUiUtils) Matchers.anyString(org.mockito.Matchers.anyString) BaseContextMockTest(org.openmrs.test.BaseContextMockTest) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 Matchers.anyString (org.mockito.Matchers.anyString)1 BaseContextMockTest (org.openmrs.test.BaseContextMockTest)1 BasicUiUtils (org.openmrs.ui.framework.BasicUiUtils)1