Package org.openengsb.core.api.l10n

Examples of org.openengsb.core.api.l10n.StringLocalizer


            ONE, TWO
    }

    @Test
    public void testAddEnumValues_shouldWork() throws Exception {
        StringLocalizer mock = Mockito.mock(StringLocalizer.class);
        LocalizableString mock2 = Mockito.mock(LocalizableString.class);
        LocalizableString mock3 = Mockito.mock(LocalizableString.class);
        when(mock2.getKey()).thenReturn("123");
        when(mock2.getString(Locale.getDefault())).thenReturn("ONE");
        when(mock2.getKey()).thenReturn("123");
        when(mock3.getString(Locale.getDefault())).thenReturn("TWO");
        when(mock.getString("ONE")).thenReturn(mock2);
        when(mock.getString("TWO")).thenReturn(mock2);

        Builder builder = AttributeDefinition.builder(mock);
        builder.name("ONE").id("123");
        MethodUtil.addEnumValues(TestEnum.class, builder);
        AttributeDefinition build = builder.build();
View Full Code Here

TOP

Related Classes of org.openengsb.core.api.l10n.StringLocalizer

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.