@Test public void testShow() throws Exception { final String iconTitle = "iconTitle"; doReturn(iconTitle).when(presenter).getTypeIconTitle(dataSetDef); final SafeUri iconUri = mock(SafeUri.class); doReturn(iconUri).when(presenter).getTypeIconUri(dataSetDef); final String parentPanelId = "parentPanel"; presenter.show(dataSetDef, parentPanelId); assertEquals(dataSetDef, presenter.getDataSetDef()); verify(view, times(0)).init(presenter); verify(view, times(0)).configure(any(DataSetSummary.View.class)); verify(view, times(1)).showHeader("uuid1", parentPanelId, iconUri, iconTitle, "name1"); verify(view, times(0)).showSummary(); verify(view, times(0)).hideSummary(); verify(view, times(0)).enableActionButton(anyString(), any(ClickHandler.class)); verify(view, times(0)).disableActionButton(); }
public void show(final DataSetDef def, final String parentPanelId) { this.def = def; if (def != null) { final String name = def.getName(); final SafeUri typeIconUri = getTypeIconUri(def); final String typeName = getTypeIconTitle(def); view.showHeader(def.getUUID(), parentPanelId, typeIconUri, typeName, name); } }
DataSetPanel implements IsWidget { public void show(final DataSetDef def, final String parentPanelId) { this.def = def; if (def != null) { final String name = def.getName(); final SafeUri typeIconUri = getTypeIconUri(def); final String typeName = getTypeIconTitle(def); view.showHeader(def.getUUID(), parentPanelId, typeIconUri, typeName, name); } } }
DataSetPanel implements IsWidget { public void show(final DataSetDef def, final String parentPanelId) { this.def = def; if (def != null) { final String name = def.getName(); final SafeUri typeIconUri = getTypeIconUri(def); final String typeName = getTypeIconTitle(def); view.showHeader(def.getUUID(), parentPanelId, typeIconUri, typeName, name); } } @Inject  DataSetPanel(final DataSetSummary dataSetSummary, 
                        final Event<EditDataSetEvent> editDataSetEvent, 
                        final View view); }
DataSetPanel implements IsWidget { public void show(final DataSetDef def, final String parentPanelId) { this.def = def; if (def != null) { final String name = def.getName(); final SafeUri typeIconUri = getTypeIconUri(def); final String typeName = getTypeIconTitle(def); view.showHeader(def.getUUID(), parentPanelId, typeIconUri, typeName, name); } } @Inject  DataSetPanel(final DataSetSummary dataSetSummary, 
                        final Event<EditDataSetEvent> editDataSetEvent, 
                        final View view); @PostConstruct void init(); @Override Widget asWidget(); void show(final DataSetDef def, final String parentPanelId); void close(); void disable(); DataSetDef getDataSetDef(); }
DataSetPanel implements IsWidget { public void show(final DataSetDef def, final String parentPanelId) { this.def = def; if (def != null) { final String name = def.getName(); final SafeUri typeIconUri = getTypeIconUri(def); final String typeName = getTypeIconTitle(def); view.showHeader(def.getUUID(), parentPanelId, typeIconUri, typeName, name); } } @Inject  DataSetPanel(final DataSetSummary dataSetSummary, 
                        final Event<EditDataSetEvent> editDataSetEvent, 
                        final View view); @PostConstruct void init(); @Override Widget asWidget(); void show(final DataSetDef def, final String parentPanelId); void close(); void disable(); DataSetDef getDataSetDef();  }