Hi,
There are several ways:
1) tester.startComponentInPage(new MyComponent(...) { @Override public void
onEvent(IEvent event) { track(event); } })
2) Same as above for Page
3) dependending on the IEventSink and Broadcast type you use you can track
the events also in YourApplication#onEvent(), YourSession#onEvent() and
YourRequestCycle#onEvent()
4) you can setup custom IFrameworkSettings and track the dispatched events
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
On Sun, Nov 22, 2015 at 12:37 PM, calle sollander <[email protected]>
wrote:
> Hello!I have a question about how to test that an IEvent has been sent.
> Say that I have a Panel with a AjaxLink on it and depending on something
> or other diffrentevents are sent when the user clicks the link.Is there a
> way to set up a unit test using the Wickettester that can detect which
> events are sent?
> Regards Calle S