use of com.qcadoo.view.api.utils.TranslationUtilsService in project qcadoo by qcadoo.
the class TranslationUtilsServiceTest method init.
@Before
public final void init() {
translationService = mock(TranslationService.class);
item = mock(Entity.class);
category = mock(Entity.class);
locale = Locale.getDefault();
when(item.getStringField("pluginIdentifier")).thenReturn(PLUGIN_IDENTIFIER);
when(category.getStringField("pluginIdentifier")).thenReturn(PLUGIN_IDENTIFIER);
when(item.getStringField("name")).thenReturn(ITEM_NAME);
when(category.getStringField("name")).thenReturn(CATEGORY_NAME);
when(item.getBelongsToField("category")).thenReturn(category);
translationUtilsService = new TranslationUtilsService();
ReflectionTestUtils.setField(translationUtilsService, "translationService", translationService);
}
Aggregations