@Test public void testCreateTreeListItem() { final TreeListItem item = mock(TreeListItem.class); when(items.get()).thenReturn(item); final String myClass = "my class"; final DataObject data = new DataObject(myClass); final TreeListItem actual = view.createTreeListItem(data); assertEquals(item, actual); verify(item).setDescription(myClass); }
TreeListItem createTreeListItem(final DataObject data) { final TreeListItem item = items.get(); item.setDataSource(data); item.setDescription(data.getClassType()); return item; }
ImportDataObjectModalView implements ImportDataObjectModal.View { TreeListItem createTreeListItem(final DataObject data) { final TreeListItem item = items.get(); item.setDataSource(data); item.setDescription(data.getClassType()); return item; } }
ImportDataObjectModalView implements ImportDataObjectModal.View { TreeListItem createTreeListItem(final DataObject data) { final TreeListItem item = items.get(); item.setDataSource(data); item.setDescription(data.getClassType()); return item; } @Inject  ImportDataObjectModalView(final HTMLDivElement header,
                                     final HTMLDivElement body,
                                     final HTMLDivElement footer,
                                     final TreeList treeList,
                                     @Named("span") final HTMLElement noteText,
                                     final HTMLLabelElement noteLabel,
                                     final HTMLDivElement itemsContainer,
                                     final HTMLAnchorElement clearSelection,
                                     final ManagedInstance<TreeListItem> items,
                                     final HTMLButtonElement buttonImport,
                                     final HTMLButtonElement buttonCancel,
                                     final HTMLDivElement warningContainer); }
ImportDataObjectModalView implements ImportDataObjectModal.View { TreeListItem createTreeListItem(final DataObject data) { final TreeListItem item = items.get(); item.setDataSource(data); item.setDescription(data.getClassType()); return item; } @Inject  ImportDataObjectModalView(final HTMLDivElement header,
                                     final HTMLDivElement body,
                                     final HTMLDivElement footer,
                                     final TreeList treeList,
                                     @Named("span") final HTMLElement noteText,
                                     final HTMLLabelElement noteLabel,
                                     final HTMLDivElement itemsContainer,
                                     final HTMLAnchorElement clearSelection,
                                     final ManagedInstance<TreeListItem> items,
                                     final HTMLButtonElement buttonImport,
                                     final HTMLButtonElement buttonCancel,
                                     final HTMLDivElement warningContainer); @PostConstruct void setup(); @Override String getHeader(); @Override HTMLElement getBody(); @Override HTMLElement getFooter(); @Override void init(final ImportDataObjectModal presenter); @Override void addItems(final List<DataObject> dataObjects); @Override void clear(); @Override void showDataTypeWithSameNameWarning(); @Override void hideDataTypeWithSameNameWarning(); }
ImportDataObjectModalView implements ImportDataObjectModal.View { TreeListItem createTreeListItem(final DataObject data) { final TreeListItem item = items.get(); item.setDataSource(data); item.setDescription(data.getClassType()); return item; } @Inject  ImportDataObjectModalView(final HTMLDivElement header,
                                     final HTMLDivElement body,
                                     final HTMLDivElement footer,
                                     final TreeList treeList,
                                     @Named("span") final HTMLElement noteText,
                                     final HTMLLabelElement noteLabel,
                                     final HTMLDivElement itemsContainer,
                                     final HTMLAnchorElement clearSelection,
                                     final ManagedInstance<TreeListItem> items,
                                     final HTMLButtonElement buttonImport,
                                     final HTMLButtonElement buttonCancel,
                                     final HTMLDivElement warningContainer); @PostConstruct void setup(); @Override String getHeader(); @Override HTMLElement getBody(); @Override HTMLElement getFooter(); @Override void init(final ImportDataObjectModal presenter); @Override void addItems(final List<DataObject> dataObjects); @Override void clear(); @Override void showDataTypeWithSameNameWarning(); @Override void hideDataTypeWithSameNameWarning();  }