use of com.github.bordertech.wcomponents.Placeholderable in project wcomponents by BorderTech.
the class HtmlRenderUtilTest method testGetEffectivePlaceholder.
@Test
public void testGetEffectivePlaceholder() {
Placeholderable field = new WTextField();
String actual = HtmlRenderUtil.getEffectivePlaceholder(field);
Assert.assertNull("Placeholder should not be set for an optional field with no explicit placeholder text", actual);
}
use of com.github.bordertech.wcomponents.Placeholderable in project wcomponents by BorderTech.
the class HtmlRenderUtilTest method testGetEffectivePlaceholderWithExplicitValue.
@Test
public void testGetEffectivePlaceholderWithExplicitValue() {
Placeholderable field = new WTextField();
String expected = "my placeholder is boring";
field.setPlaceholder(expected);
String actual = HtmlRenderUtil.getEffectivePlaceholder(field);
Assert.assertEquals(expected, actual);
}
Aggregations