@Test public void testGetMappedLocale() { LocaleCode localeCode = LocaleCode.ZH_HANS; BackendLocaleCode backendLocaleCode = mockBackend.getMappedLocale(localeCode); assertThat(backendLocaleCode.getLocaleCode()) .isEqualTo(localeCode.getId()); localeCode = LocaleCode.DE; backendLocaleCode = mockBackend.getMappedLocale(localeCode); assertThat(backendLocaleCode.getLocaleCode()) .isEqualTo(localeCode.getId()); }
@Override public BackendLocaleCode getMappedLocale(LocaleCode localeCode) { return new BackendLocaleCodeImpl(localeCode); }
MockTranslatorBackend implements TranslatorBackend { @Override public BackendLocaleCode getMappedLocale(LocaleCode localeCode) { return new BackendLocaleCodeImpl(localeCode); } }
MockTranslatorBackend implements TranslatorBackend { @Override public BackendLocaleCode getMappedLocale(LocaleCode localeCode) { return new BackendLocaleCodeImpl(localeCode); } @SuppressWarnings("unused")  MockTranslatorBackend(); }
MockTranslatorBackend implements TranslatorBackend { @Override public BackendLocaleCode getMappedLocale(LocaleCode localeCode) { return new BackendLocaleCodeImpl(localeCode); } @SuppressWarnings("unused")  MockTranslatorBackend(); @Override List<AugmentedTranslation> translate(List<String> contents,
            BackendLocaleCode srcLocale, BackendLocaleCode targetLocale,
            StringType stringType, Optional<String> category); @Override BackendLocaleCode getMappedLocale(LocaleCode localeCode); @Override int getCharLimitPerRequest(); @Override BackendID getId(); }
MockTranslatorBackend implements TranslatorBackend { @Override public BackendLocaleCode getMappedLocale(LocaleCode localeCode) { return new BackendLocaleCodeImpl(localeCode); } @SuppressWarnings("unused")  MockTranslatorBackend(); @Override List<AugmentedTranslation> translate(List<String> contents,
            BackendLocaleCode srcLocale, BackendLocaleCode targetLocale,
            StringType stringType, Optional<String> category); @Override BackendLocaleCode getMappedLocale(LocaleCode localeCode); @Override int getCharLimitPerRequest(); @Override BackendID getId(); final static String PREFIX_MOCK_STRING; final static String UNICODE_SUPPLEMENTARY; final static String UNICODE; }