2
我有一个Wicket面板,它有AbstractAjaxTimeBehavior,我想单元测试。在单元测试期间,如何触发ajax事件,最终调用AbstractAjaxTimeBehavior
的.onTimer(AjaxRequestTarget target)
方法?如何使用AbstractAjaxTimerBehavior对Wicket组件进行单元测试?
behavior = new AbstractAjaxTimerBehavior(Duration.seconds(pollingPeriodInSeconds)) {
protected void onTimer(AjaxRequestTarget target) {
// how to unit test this?
}
}
add(behavior);