use of com.github.bordertech.wcomponents.WLabel in project wcomponents by BorderTech.
the class WColumnRenderer_Test method testPaint.
@Test
public void testPaint() throws IOException, SAXException, XpathException {
WRow row = new WRow();
WColumn column = new WColumn(100);
row.add(column);
column.add(new WLabel("dummy"));
assertSchemaMatch(row);
assertXpathEvaluatesTo(column.getId(), "//ui:column/@id", row);
assertXpathEvaluatesTo("100", "//ui:column/@width", row);
assertXpathNotExists("//ui:column/@align", row);
column.setAlignment(WColumn.Alignment.LEFT);
assertSchemaMatch(row);
assertXpathNotExists("//ui:column/@align", row);
column.setAlignment(WColumn.Alignment.CENTER);
assertSchemaMatch(row);
assertXpathEvaluatesTo("center", "//ui:column/@align", row);
column.setAlignment(WColumn.Alignment.RIGHT);
assertSchemaMatch(row);
assertXpathEvaluatesTo("right", "//ui:column/@align", row);
}
use of com.github.bordertech.wcomponents.WLabel in project wcomponents by BorderTech.
the class WLabelRenderer_Test method testWhatForGroup3.
@Test
public void testWhatForGroup3() throws IOException, SAXException, XpathException {
WMultiTextField comp = new WMultiTextField();
WLabel label = new WLabel("label", comp);
assertSchemaMatch(label);
assertXpathEvaluatesTo("group", "//ui:label/@what", label);
}
use of com.github.bordertech.wcomponents.WLabel in project wcomponents by BorderTech.
the class WLabelRenderer_Test method testRendererCorrectlyConfigured.
/**
* Test the Layout is correctly configured.
*/
@Test
public void testRendererCorrectlyConfigured() {
WLabel label = new WLabel();
Assert.assertTrue("Incorrect renderer supplied", getWebXmlRenderer(label) instanceof WLabelRenderer);
}
use of com.github.bordertech.wcomponents.WLabel in project wcomponents by BorderTech.
the class WLabelRenderer_Test method testHiddenBoth.
@Test
public void testHiddenBoth() throws IOException, SAXException, XpathException {
MyInput comp = new MyInput();
WLabel label = new WLabel("label", comp);
label.setHidden(true);
comp.setHidden(true);
assertSchemaMatch(label);
assertXpathEvaluatesTo("true", "//ui:label/@hidden", label);
assertXpathEvaluatesTo("true", "//ui:label/@hiddencomponent", label);
}
use of com.github.bordertech.wcomponents.WLabel in project wcomponents by BorderTech.
the class WLabelRenderer_Test method testWhatForGroup5.
@Test
public void testWhatForGroup5() throws IOException, SAXException, XpathException {
WRadioButtonSelect comp = new WRadioButtonSelect();
WLabel label = new WLabel("label", comp);
assertSchemaMatch(label);
assertXpathEvaluatesTo("group", "//ui:label/@what", label);
}
Aggregations