@Test public void checkSetRuleNameWhenEmpty() { ruleSelector.setRuleName(""); verify(ruleNameSelector, never()).setValue(anyString()); }
public void setRuleName(final String ruleName) { if (ruleName != null && !ruleName.isEmpty()) { if (ruleNamesLoaded) { ruleNameSelector.setValue(ruleName); } else { onRulesLoadedCommand = Optional.of(() -> setRuleName(ruleName)); } } }
RuleSelector extends Composite implements HasValueChangeHandlers<String>,
                   HasEnabled { public void setRuleName(final String ruleName) { if (ruleName != null && !ruleName.isEmpty()) { if (ruleNamesLoaded) { ruleNameSelector.setValue(ruleName); } else { onRulesLoadedCommand = Optional.of(() -> setRuleName(ruleName)); } } } }
RuleSelector extends Composite implements HasValueChangeHandlers<String>,
                   HasEnabled { public void setRuleName(final String ruleName) { if (ruleName != null && !ruleName.isEmpty()) { if (ruleNamesLoaded) { ruleNameSelector.setValue(ruleName); } else { onRulesLoadedCommand = Optional.of(() -> setRuleName(ruleName)); } } } RuleSelector(); }
RuleSelector extends Composite implements HasValueChangeHandlers<String>,
                   HasEnabled { public void setRuleName(final String ruleName) { if (ruleName != null && !ruleName.isEmpty()) { if (ruleNamesLoaded) { ruleNameSelector.setValue(ruleName); } else { onRulesLoadedCommand = Optional.of(() -> setRuleName(ruleName)); } } } RuleSelector(); void setRuleNames(final Collection<String> ruleNames,
                             final String exclude); void setRuleNames(final Collection<String> ruleNames); String getRuleName(); void setRuleName(final String ruleName); @Override HandlerRegistration addValueChangeHandler(final ValueChangeHandler<String> handler); @Override boolean isEnabled(); @Override void setEnabled(final boolean enabled); }
RuleSelector extends Composite implements HasValueChangeHandlers<String>,
                   HasEnabled { public void setRuleName(final String ruleName) { if (ruleName != null && !ruleName.isEmpty()) { if (ruleNamesLoaded) { ruleNameSelector.setValue(ruleName); } else { onRulesLoadedCommand = Optional.of(() -> setRuleName(ruleName)); } } } RuleSelector(); void setRuleNames(final Collection<String> ruleNames,
                             final String exclude); void setRuleNames(final Collection<String> ruleNames); String getRuleName(); void setRuleName(final String ruleName); @Override HandlerRegistration addValueChangeHandler(final ValueChangeHandler<String> handler); @Override boolean isEnabled(); @Override void setEnabled(final boolean enabled); final static String NONE_SELECTED; }