@Test public void testUpdateView() { final ToolAdminPresenterImpl uuti = new ToolAdminPresenterImpl(toolAdminViewFactoryMock, toolAdminServiceFacadeMock, toolAutoBeanFactoryMock, toolPropertiesMock, toolAdminViewAppearanceMock) { @Override ListStore<Tool> createListStore(ToolProperties toolProps) { return listStoreToolMock; } }; String searchTermMock = "searchTermMock"; uuti.updateView(searchTermMock); verify(toolAdminServiceFacadeMock).getTools(eq(searchTermMock), asyncCallbackToolListCaptor.capture()); AsyncCallback<List<Tool>> listAsyncCallback = asyncCallbackToolListCaptor.getValue(); List<Tool> toolListMock = Lists.newArrayList(mock(Tool.class)); listAsyncCallback.onSuccess(toolListMock); verify(listStoreToolMock).replaceAll(eq(toolListMock)); verifyNoMoreInteractions(listStoreToolMock, toolAdminServiceFacadeMock); }
void updateView() { String searchTerm = "*"; updateView(searchTerm); }
ToolAdminPresenterImpl implements ToolAdminView.Presenter,
                                               AddToolSelectedEvent.AddToolSelectedEventHandler,
                                               ToolSelectedEvent.ToolSelectedEventHandler,
                                               SaveToolSelectedEvent.SaveToolSelectedEventHandler,
                                               DeleteToolSelectedEvent.DeleteToolSelectedEventHandler { void updateView() { String searchTerm = "*"; updateView(searchTerm); } }
ToolAdminPresenterImpl implements ToolAdminView.Presenter,
                                               AddToolSelectedEvent.AddToolSelectedEventHandler,
                                               ToolSelectedEvent.ToolSelectedEventHandler,
                                               SaveToolSelectedEvent.SaveToolSelectedEventHandler,
                                               DeleteToolSelectedEvent.DeleteToolSelectedEventHandler { void updateView() { String searchTerm = "*"; updateView(searchTerm); } @Inject  ToolAdminPresenterImpl(final ToolAdminViewFactory viewFactory,
                                  ToolAdminServiceFacade toolAdminServiceFacade,
                                  ToolAutoBeanFactory factory,
                                  ToolProperties toolProperties,
                                  ToolAdminView.ToolAdminViewAppearance appearance); }
ToolAdminPresenterImpl implements ToolAdminView.Presenter,
                                               AddToolSelectedEvent.AddToolSelectedEventHandler,
                                               ToolSelectedEvent.ToolSelectedEventHandler,
                                               SaveToolSelectedEvent.SaveToolSelectedEventHandler,
                                               DeleteToolSelectedEvent.DeleteToolSelectedEventHandler { void updateView() { String searchTerm = "*"; updateView(searchTerm); } @Inject  ToolAdminPresenterImpl(final ToolAdminViewFactory viewFactory,
                                  ToolAdminServiceFacade toolAdminServiceFacade,
                                  ToolAutoBeanFactory factory,
                                  ToolProperties toolProperties,
                                  ToolAdminView.ToolAdminViewAppearance appearance); @Override void go(HasOneWidget container); @Override void setViewDebugId(String baseId); @Override void onAddToolSelected(AddToolSelectedEvent event); @Override void onDeleteToolSelected(final DeleteToolSelectedEvent event); @Override void onToolSelected(ToolSelectedEvent event); @Override void onSaveToolSelected(SaveToolSelectedEvent event); }
ToolAdminPresenterImpl implements ToolAdminView.Presenter,
                                               AddToolSelectedEvent.AddToolSelectedEventHandler,
                                               ToolSelectedEvent.ToolSelectedEventHandler,
                                               SaveToolSelectedEvent.SaveToolSelectedEventHandler,
                                               DeleteToolSelectedEvent.DeleteToolSelectedEventHandler { void updateView() { String searchTerm = "*"; updateView(searchTerm); } @Inject  ToolAdminPresenterImpl(final ToolAdminViewFactory viewFactory,
                                  ToolAdminServiceFacade toolAdminServiceFacade,
                                  ToolAutoBeanFactory factory,
                                  ToolProperties toolProperties,
                                  ToolAdminView.ToolAdminViewAppearance appearance); @Override void go(HasOneWidget container); @Override void setViewDebugId(String baseId); @Override void onAddToolSelected(AddToolSelectedEvent event); @Override void onDeleteToolSelected(final DeleteToolSelectedEvent event); @Override void onToolSelected(ToolSelectedEvent event); @Override void onSaveToolSelected(SaveToolSelectedEvent event);  }