use of com.github.bordertech.wcomponents.UIContextImpl in project wcomponents by BorderTech.
the class WDropdownRenderer_Test method testCrtEntryExpiration.
@Test
public void testCrtEntryExpiration() throws IOException, SAXException, XpathException {
UIContext uic1 = new UIContextImpl();
UIContext uic2 = new UIContextImpl() {
@Override
public long getCreationTime() {
// 01 jan 1970 - should have no options
return 0;
}
};
// Test getOptions accessor
WDropdown drop = new WDropdown(TestLookupTable.YesNoTable.class);
// Test rendered format
setActiveContext(uic1);
assertSchemaMatch(drop);
assertXpathEvaluatesTo("2", "count(//ui:dropdown/ui:option)", drop);
setActiveContext(uic2);
assertSchemaMatch(drop);
assertXpathEvaluatesTo("0", "count(//ui:dropdown/ui:option)", drop);
}
use of com.github.bordertech.wcomponents.UIContextImpl in project wcomponents by BorderTech.
the class UicStats_Test method setUp.
@Before
public void setUp() {
UIContext uic;
uic = new UIContextImpl();
setActiveContext(uic);
app = new WApplication();
button = new WButton("PUSH");
app.add(button);
label = new WLabel("HERE");
app.add(label);
uic.setUI(app);
stats = new UicStats(uic);
}
Aggregations