@Test public void testGetTitle() throws Exception { final GuidedDecisionTableAccordionItem.Type type = GuidedDecisionTableAccordionItem.Type.CONDITION; final String title = "title"; when(translationService.format(type.getTitleKey())).thenReturn(title); when(item.getType()).thenReturn(type); final String itemTitle = item.getTitle(); assertEquals(title, itemTitle); }
String getTitle() { final String titleKey = getType().getTitleKey(); return translationService.format(titleKey); }
GuidedDecisionTableAccordionItem { String getTitle() { final String titleKey = getType().getTitleKey(); return translationService.format(titleKey); } }
GuidedDecisionTableAccordionItem { String getTitle() { final String titleKey = getType().getTitleKey(); return translationService.format(titleKey); } @Inject  GuidedDecisionTableAccordionItem(final GuidedDecisionTableAccordionItem.View view,
                                            final TranslationService translationService); }
GuidedDecisionTableAccordionItem { String getTitle() { final String titleKey = getType().getTitleKey(); return translationService.format(titleKey); } @Inject  GuidedDecisionTableAccordionItem(final GuidedDecisionTableAccordionItem.View view,
                                            final TranslationService translationService); @PostConstruct void setup(); GuidedDecisionTableAccordionItem.View getView(); void init(final String parentId,
                     final Type type,
                     final Widget content); Type getType(); void setOpen(final boolean isOpen); }
GuidedDecisionTableAccordionItem { String getTitle() { final String titleKey = getType().getTitleKey(); return translationService.format(titleKey); } @Inject  GuidedDecisionTableAccordionItem(final GuidedDecisionTableAccordionItem.View view,
                                            final TranslationService translationService); @PostConstruct void setup(); GuidedDecisionTableAccordionItem.View getView(); void init(final String parentId,
                     final Type type,
                     final Widget content); Type getType(); void setOpen(final boolean isOpen);  }