@Test public void testOnAppLauncherAddEvent() { final String appName = "appName"; final String url = "url"; final String css = "fa"; presenter.onAppLauncherAddEvent(new AppLauncherAddEvent(appName, url, css)); verify(view).addAppLauncher(appName, url, css); verify(updatedEvent).fire(any(AppLauncherUpdatedEvent.class)); assertFalse(presenter.isAppLauncherEmpty()); }
public void onAppLauncherAddEvent(@Observes final AppLauncherAddEvent event) { appLauncherAddEvents.add(event); view.addAppLauncher(event.getAppName(), event.getUrl(), event.getIconClass()); updatedEvent.fire(new AppLauncherUpdatedEvent()); }
AppLauncherPresenter { public void onAppLauncherAddEvent(@Observes final AppLauncherAddEvent event) { appLauncherAddEvents.add(event); view.addAppLauncher(event.getAppName(), event.getUrl(), event.getIconClass()); updatedEvent.fire(new AppLauncherUpdatedEvent()); } }
AppLauncherPresenter { public void onAppLauncherAddEvent(@Observes final AppLauncherAddEvent event) { appLauncherAddEvents.add(event); view.addAppLauncher(event.getAppName(), event.getUrl(), event.getIconClass()); updatedEvent.fire(new AppLauncherUpdatedEvent()); }  }
AppLauncherPresenter { public void onAppLauncherAddEvent(@Observes final AppLauncherAddEvent event) { appLauncherAddEvents.add(event); view.addAppLauncher(event.getAppName(), event.getUrl(), event.getIconClass()); updatedEvent.fire(new AppLauncherUpdatedEvent()); }  IsWidget getView(); void onAppLauncherRemoveEvent(@Observes final AppLauncherRemoveEvent event); void onAppLauncherAddEvent(@Observes final AppLauncherAddEvent event); boolean isAppLauncherEmpty(); }
AppLauncherPresenter { public void onAppLauncherAddEvent(@Observes final AppLauncherAddEvent event) { appLauncherAddEvents.add(event); view.addAppLauncher(event.getAppName(), event.getUrl(), event.getIconClass()); updatedEvent.fire(new AppLauncherUpdatedEvent()); }  IsWidget getView(); void onAppLauncherRemoveEvent(@Observes final AppLauncherRemoveEvent event); void onAppLauncherAddEvent(@Observes final AppLauncherAddEvent event); boolean isAppLauncherEmpty();  }