@Test public void testUpdateView() throws Exception { uut.updateView(); verify(viewMock).mask(eq(appearanceMock.loadingMask())); verify(serviceFacadeMock).getMembers(memberListCallbackCaptor.capture()); memberListCallbackCaptor.getValue().onSuccess(memberListMock); verify(listStoreMock).replaceAll(eq(memberListMock)); verify(viewMock).unmask(); }
void updateView() { view.mask(appearance.loadingMask()); serviceFacade.getMembers(new AsyncCallback<List<Member>>() { @Override public void onFailure(Throwable caught) { ErrorHandler.post(caught); view.unmask(); } @Override public void onSuccess(List<Member> members) { listStore.replaceAll(members); view.unmask(); } }); }
WorkshopAdminPresenterImpl implements WorkshopAdminView.Presenter { void updateView() { view.mask(appearance.loadingMask()); serviceFacade.getMembers(new AsyncCallback<List<Member>>() { @Override public void onFailure(Throwable caught) { ErrorHandler.post(caught); view.unmask(); } @Override public void onSuccess(List<Member> members) { listStore.replaceAll(members); view.unmask(); } }); } }
WorkshopAdminPresenterImpl implements WorkshopAdminView.Presenter { void updateView() { view.mask(appearance.loadingMask()); serviceFacade.getMembers(new AsyncCallback<List<Member>>() { @Override public void onFailure(Throwable caught) { ErrorHandler.post(caught); view.unmask(); } @Override public void onSuccess(List<Member> members) { listStore.replaceAll(members); view.unmask(); } }); } @Inject  WorkshopAdminPresenterImpl(final WorkshopAdminViewFactory viewFactory,
                                      final WorkshopAdminServiceFacade serviceFacade,
                                      final GroupAutoBeanFactory groupAutoBeanFactory,
                                      final MemberProperties memberProperties,
                                      final WorkshopAdminView.WorkshopAdminViewAppearance appearance); }
WorkshopAdminPresenterImpl implements WorkshopAdminView.Presenter { void updateView() { view.mask(appearance.loadingMask()); serviceFacade.getMembers(new AsyncCallback<List<Member>>() { @Override public void onFailure(Throwable caught) { ErrorHandler.post(caught); view.unmask(); } @Override public void onSuccess(List<Member> members) { listStore.replaceAll(members); view.unmask(); } }); } @Inject  WorkshopAdminPresenterImpl(final WorkshopAdminViewFactory viewFactory,
                                      final WorkshopAdminServiceFacade serviceFacade,
                                      final GroupAutoBeanFactory groupAutoBeanFactory,
                                      final MemberProperties memberProperties,
                                      final WorkshopAdminView.WorkshopAdminViewAppearance appearance); @Override void go(HasOneWidget container); @Override void setViewDebugId(String baseId); }
WorkshopAdminPresenterImpl implements WorkshopAdminView.Presenter { void updateView() { view.mask(appearance.loadingMask()); serviceFacade.getMembers(new AsyncCallback<List<Member>>() { @Override public void onFailure(Throwable caught) { ErrorHandler.post(caught); view.unmask(); } @Override public void onSuccess(List<Member> members) { listStore.replaceAll(members); view.unmask(); } }); } @Inject  WorkshopAdminPresenterImpl(final WorkshopAdminViewFactory viewFactory,
                                      final WorkshopAdminServiceFacade serviceFacade,
                                      final GroupAutoBeanFactory groupAutoBeanFactory,
                                      final MemberProperties memberProperties,
                                      final WorkshopAdminView.WorkshopAdminViewAppearance appearance); @Override void go(HasOneWidget container); @Override void setViewDebugId(String baseId);  }