@Test public void testOnConfigUpdate() { final RuleConfigUpdated ruleConfigUpdated = new RuleConfigUpdated(); ruleConfigUpdated.setContainerSpecKey(containerSpec); ruleConfigUpdated.setRuleConfig(ruleConfig); presenter.setup(containerSpec, ruleConfig); presenter.onConfigUpdate(ruleConfigUpdated); verify(view, times(2)).setContent(anyString(), anyString(), any(State.class), any(State.class), any(State.class), any(State.class)); }
public void onConfigUpdate(@Observes final RuleConfigUpdated configUpdated) { if (configUpdated != null && configUpdated.getContainerSpecKey() != null && configUpdated.getContainerSpecKey().equals(containerSpec)) { setup(containerSpec, configUpdated.getRuleConfig()); } else { logger.warn("Illegal event argument."); } }
ContainerRulesConfigPresenter { public void onConfigUpdate(@Observes final RuleConfigUpdated configUpdated) { if (configUpdated != null && configUpdated.getContainerSpecKey() != null && configUpdated.getContainerSpecKey().equals(containerSpec)) { setup(containerSpec, configUpdated.getRuleConfig()); } else { logger.warn("Illegal event argument."); } } }
ContainerRulesConfigPresenter { public void onConfigUpdate(@Observes final RuleConfigUpdated configUpdated) { if (configUpdated != null && configUpdated.getContainerSpecKey() != null && configUpdated.getContainerSpecKey().equals(containerSpec)) { setup(containerSpec, configUpdated.getRuleConfig()); } else { logger.warn("Illegal event argument."); } } @Inject  ContainerRulesConfigPresenter(final Logger logger,
                                         final View view,
                                         final Caller<RuleCapabilitiesService> ruleCapabilitiesService,
                                         final Event<NotificationEvent> notification); }
ContainerRulesConfigPresenter { public void onConfigUpdate(@Observes final RuleConfigUpdated configUpdated) { if (configUpdated != null && configUpdated.getContainerSpecKey() != null && configUpdated.getContainerSpecKey().equals(containerSpec)) { setup(containerSpec, configUpdated.getRuleConfig()); } else { logger.warn("Illegal event argument."); } } @Inject  ContainerRulesConfigPresenter(final Logger logger,
                                         final View view,
                                         final Caller<RuleCapabilitiesService> ruleCapabilitiesService,
                                         final Event<NotificationEvent> notification); @PostConstruct void init(); View getView(); void setup(final ContainerSpec containerSpec,
                      final RuleConfig ruleConfig); void setVersion(final String version); void startScanner(final String interval,
                             final String timeUnit); void stopScanner(); void scanNow(); void upgrade(final String version); void onConfigUpdate(@Observes final RuleConfigUpdated configUpdated); void onRuleConfigUpdate(@Observes final RuleConfigUpdated configUpdate); }
ContainerRulesConfigPresenter { public void onConfigUpdate(@Observes final RuleConfigUpdated configUpdated) { if (configUpdated != null && configUpdated.getContainerSpecKey() != null && configUpdated.getContainerSpecKey().equals(containerSpec)) { setup(containerSpec, configUpdated.getRuleConfig()); } else { logger.warn("Illegal event argument."); } } @Inject  ContainerRulesConfigPresenter(final Logger logger,
                                         final View view,
                                         final Caller<RuleCapabilitiesService> ruleCapabilitiesService,
                                         final Event<NotificationEvent> notification); @PostConstruct void init(); View getView(); void setup(final ContainerSpec containerSpec,
                      final RuleConfig ruleConfig); void setVersion(final String version); void startScanner(final String interval,
                             final String timeUnit); void stopScanner(); void scanNow(); void upgrade(final String version); void onConfigUpdate(@Observes final RuleConfigUpdated configUpdated); void onRuleConfigUpdate(@Observes final RuleConfigUpdated configUpdate);  }