@Test public void whenEmptyValueShouldBeEqualsTheLabel() { KieSelectOption option = packageListBoxView.newOption("key", "value"); assertEquals(option.label, "key"); assertEquals(option.value, "value"); KieSelectOption anotherOption = packageListBoxView.newOption(PackageItem.DEFAULT_PACKAGE_NAME, ""); assertEquals(PackageItem.DEFAULT_PACKAGE_NAME, anotherOption.label); assertEquals(PackageItem.DEFAULT_PACKAGE_NAME, anotherOption.value); }
KieSelectOption newOption(final String name, String value) { if (value.isEmpty()) { value = name; } return new KieSelectOption(name, value); }
PackageListBoxViewImpl implements PackageListBoxView { KieSelectOption newOption(final String name, String value) { if (value.isEmpty()) { value = name; } return new KieSelectOption(name, value); } }
PackageListBoxViewImpl implements PackageListBoxView { KieSelectOption newOption(final String name, String value) { if (value.isEmpty()) { value = name; } return new KieSelectOption(name, value); } @Inject  PackageListBoxViewImpl(final KieSelectElement kieSelectElement); }
PackageListBoxViewImpl implements PackageListBoxView { KieSelectOption newOption(final String name, String value) { if (value.isEmpty()) { value = name; } return new KieSelectOption(name, value); } @Inject  PackageListBoxViewImpl(final KieSelectElement kieSelectElement); @Override void setPresenter(final PackageListBox presenter); @Override void setUp(final String activePackage,
                      final Map<String, String> packageNames); void clearSelectElement(); }
PackageListBoxViewImpl implements PackageListBoxView { KieSelectOption newOption(final String name, String value) { if (value.isEmpty()) { value = name; } return new KieSelectOption(name, value); } @Inject  PackageListBoxViewImpl(final KieSelectElement kieSelectElement); @Override void setPresenter(final PackageListBox presenter); @Override void setUp(final String activePackage,
                      final Map<String, String> packageNames); void clearSelectElement();  }