use of com.github.bordertech.wcomponents.WRadioButtonSelect in project wcomponents by BorderTech.
the class WRadioButtonSelectRenderer_Test method testDoPaint.
@Test
public void testDoPaint() throws IOException, SAXException, XpathException {
WRadioButtonSelect buttonGroup = new WRadioButtonSelect(new String[] { "a", "b", "c" });
assertSchemaMatch(buttonGroup);
assertXpathEvaluatesTo("3", "count(//ui:radiobuttonselect/ui:option)", buttonGroup);
// Check selected
assertXpathNotExists("//ui:radiobuttonselect/ui:option[@selected='true']", buttonGroup);
buttonGroup.setSelected("b");
assertSchemaMatch(buttonGroup);
assertXpathEvaluatesTo("1", "count(//ui:radiobuttonselect/ui:option[@selected='true'])", buttonGroup);
assertXpathEvaluatesTo("b", "//ui:radiobuttonselect/ui:option[@selected='true']", buttonGroup);
}
Aggregations