use of com.github.bordertech.wcomponents.autocomplete.type.Numeric in project wcomponents by BorderTech.
the class WNumberField_Test method testAddAutocompleteSectionAfterSettingWithSection.
@Test
public void testAddAutocompleteSectionAfterSettingWithSection() {
WNumberField field = new WNumberField();
String sectionName = "foo";
String otherSection = "bar";
String expected;
for (Numeric number : Numeric.values()) {
expected = AutocompleteUtil.getCombinedForSection(sectionName, AutocompleteUtil.getNamedSection(otherSection), number.getValue());
field.setAutocomplete(number);
field.addAutocompleteSection(otherSection);
field.addAutocompleteSection(sectionName);
Assert.assertEquals(expected, field.getAutocomplete());
}
}
use of com.github.bordertech.wcomponents.autocomplete.type.Numeric in project wcomponents by BorderTech.
the class WSingleSelect_Test method testSetAutocompleteNumeric.
// with number field autocomplete
@Test
public void testSetAutocompleteNumeric() {
WSingleSelect field = new WSingleSelect();
for (Numeric number : Numeric.values()) {
field.setAutocomplete(number);
Assert.assertEquals(number.getValue(), field.getAutocomplete());
}
}
Aggregations