use of com.github.bordertech.wcomponents.WFieldLayout in project wcomponents by BorderTech.
the class WFieldRenderer_Test method testNoInputField.
@Test
public void testNoInputField() throws IOException, SAXException, XpathException {
// No Input field, so label created by WTextWithColon.
WText text = new WText("text1");
WFieldLayout test = new WFieldLayout();
WField field = test.addField("label1", text);
// Validate Schema
assertSchemaMatch(test);
// Check Attributes
assertXpathEvaluatesTo(field.getId(), "//ui:field/@id", field);
// Check Label
assertXpathEvaluatesTo("label1", "//ui:field/ui:label", field);
// Check Input
assertXpathEvaluatesTo("text1", "//ui:field/ui:input", field);
}
use of com.github.bordertech.wcomponents.WFieldLayout in project wcomponents by BorderTech.
the class WFieldRenderer_Test method testRendererCorrectlyConfigured.
/**
* Test the Layout is correctly configured.
*/
@Test
public void testRendererCorrectlyConfigured() {
WField field = new WFieldLayout().addField("test1", new WTextArea());
Assert.assertTrue("Incorrect renderer supplied", getWebXmlRenderer(field) instanceof WFieldRenderer);
}
Aggregations