@Test public void testOnSelect() { final ServerTemplateKey serverTemplateKey = new ServerTemplateKey( "ServerTemplateKeyId", "ServerTemplateKeyName" ); presenter.onSelect( new ServerTemplateSelected( serverTemplateKey ) ); verify( view ).select( serverTemplateKey.getId() ); }
public void onSelect(@Observes final ServerTemplateSelected serverTemplateSelected) { if (serverTemplateSelected != null && serverTemplateSelected.getServerTemplateKey() != null && serverTemplateSelected.getServerTemplateKey().getId() != null) { view.select(serverTemplateSelected.getServerTemplateKey().getId()); } else { logger.warn("Illegal event argument."); } }
ServerNavigationPresenter { public void onSelect(@Observes final ServerTemplateSelected serverTemplateSelected) { if (serverTemplateSelected != null && serverTemplateSelected.getServerTemplateKey() != null && serverTemplateSelected.getServerTemplateKey().getId() != null) { view.select(serverTemplateSelected.getServerTemplateKey().getId()); } else { logger.warn("Illegal event argument."); } } }
ServerNavigationPresenter { public void onSelect(@Observes final ServerTemplateSelected serverTemplateSelected) { if (serverTemplateSelected != null && serverTemplateSelected.getServerTemplateKey() != null && serverTemplateSelected.getServerTemplateKey().getId() != null) { view.select(serverTemplateSelected.getServerTemplateKey().getId()); } else { logger.warn("Illegal event argument."); } } @Inject  ServerNavigationPresenter(final Logger logger,
                                     final View view,
                                     final Event<AddNewServerTemplate> addNewServerTemplateEvent,
                                     final Event<ServerTemplateListRefresh> serverTemplateListRefreshEvent,
                                     final Event<ServerTemplateSelected> serverTemplateSelectedEvent); }
ServerNavigationPresenter { public void onSelect(@Observes final ServerTemplateSelected serverTemplateSelected) { if (serverTemplateSelected != null && serverTemplateSelected.getServerTemplateKey() != null && serverTemplateSelected.getServerTemplateKey().getId() != null) { view.select(serverTemplateSelected.getServerTemplateKey().getId()); } else { logger.warn("Illegal event argument."); } } @Inject  ServerNavigationPresenter(final Logger logger,
                                     final View view,
                                     final Event<AddNewServerTemplate> addNewServerTemplateEvent,
                                     final Event<ServerTemplateListRefresh> serverTemplateListRefreshEvent,
                                     final Event<ServerTemplateSelected> serverTemplateSelectedEvent); @PostConstruct void init(); View getView(); void setup(final ServerTemplateKey firstTemplate,
                      final Collection<ServerTemplateKey> serverTemplateKeys); void onSelect(@Observes final ServerTemplateSelected serverTemplateSelected); void onServerTemplateUpdated(@Observes final ServerTemplateUpdated serverTemplateUpdated); void select(final String id); void clear(); void refresh(); void newTemplate(); }
ServerNavigationPresenter { public void onSelect(@Observes final ServerTemplateSelected serverTemplateSelected) { if (serverTemplateSelected != null && serverTemplateSelected.getServerTemplateKey() != null && serverTemplateSelected.getServerTemplateKey().getId() != null) { view.select(serverTemplateSelected.getServerTemplateKey().getId()); } else { logger.warn("Illegal event argument."); } } @Inject  ServerNavigationPresenter(final Logger logger,
                                     final View view,
                                     final Event<AddNewServerTemplate> addNewServerTemplateEvent,
                                     final Event<ServerTemplateListRefresh> serverTemplateListRefreshEvent,
                                     final Event<ServerTemplateSelected> serverTemplateSelectedEvent); @PostConstruct void init(); View getView(); void setup(final ServerTemplateKey firstTemplate,
                      final Collection<ServerTemplateKey> serverTemplateKeys); void onSelect(@Observes final ServerTemplateSelected serverTemplateSelected); void onServerTemplateUpdated(@Observes final ServerTemplateUpdated serverTemplateUpdated); void select(final String id); void clear(); void refresh(); void newTemplate();  }