use of com.github.bordertech.wcomponents.autocomplete.type.Numeric in project wcomponents by BorderTech.
the class WNumberField_Test method testSetAutocomplete.
@Test
public void testSetAutocomplete() {
WNumberField field = new WNumberField();
for (Numeric number : Numeric.values()) {
field.setAutocomplete(number);
Assert.assertEquals(number.getValue(), field.getAutocomplete());
}
}
use of com.github.bordertech.wcomponents.autocomplete.type.Numeric in project wcomponents by BorderTech.
the class WDropdown_Test method testSetAutocompleteNumeric.
// with number field autocomplete
@Test
public void testSetAutocompleteNumeric() {
WDropdown field = new WDropdown();
for (Numeric number : Numeric.values()) {
field.setAutocomplete(number);
Assert.assertEquals(number.getValue(), field.getAutocomplete());
}
}
use of com.github.bordertech.wcomponents.autocomplete.type.Numeric in project wcomponents by BorderTech.
the class WTextField_Test method testSetAutocompleteNumeric.
// with number field autocomplete
@Test
public void testSetAutocompleteNumeric() {
WTextField field = new WTextField();
for (Numeric number : Numeric.values()) {
field.setAutocomplete(number);
Assert.assertEquals(number.getValue(), field.getAutocomplete());
}
}
use of com.github.bordertech.wcomponents.autocomplete.type.Numeric in project wcomponents by BorderTech.
the class WNumberFieldRenderer_Test method testSetAutocomplete.
@Test
public void testSetAutocomplete() throws IOException, SAXException, XpathException {
WNumberField field = new WNumberField();
for (Numeric number : Numeric.values()) {
field.setAutocomplete(number);
assertSchemaMatch(field);
assertXpathEvaluatesTo(number.getValue(), "//ui:numberfield/@autocomplete", field);
}
}
use of com.github.bordertech.wcomponents.autocomplete.type.Numeric in project wcomponents by BorderTech.
the class WNumberField_Test method testAddAutocompleteSectionAfterSetting.
@Test
public void testAddAutocompleteSectionAfterSetting() {
WNumberField field = new WNumberField();
String sectionName = "foo";
String expected;
for (Numeric number : Numeric.values()) {
expected = AutocompleteUtil.getCombinedForSection(sectionName, number.getValue());
field.setAutocomplete(number);
field.addAutocompleteSection(sectionName);
Assert.assertEquals(expected, field.getAutocomplete());
}
}
Aggregations