use of com.github.bordertech.wcomponents.BeanProviderBound in project wcomponents by BorderTech.
the class WProgressBarRenderer_Test method testDoPaint.
@Test
public void testDoPaint() throws IOException, SAXException, XpathException {
BeanProvider provider = new BeanProvider() {
@Override
public Object getBean(final BeanProviderBound beanProviderBound) {
return 13;
}
};
WProgressBar progressBar = new WProgressBar(WProgressBar.ProgressBarType.NORMAL, WProgressBar.UnitType.FRACTION);
progressBar.setBeanProvider(provider);
progressBar.setMax(33);
assertXpathExists("//html:progress[@max='33']", progressBar);
progressBar = new WProgressBar(WProgressBar.ProgressBarType.SMALL, WProgressBar.UnitType.PERCENTAGE);
progressBar.setBeanProvider(provider);
progressBar.setMax(33);
assertXpathExists("//html:progress[@max='33' and contains(@class, 'wc-progressbar-type-small')]", progressBar);
}
Aggregations