i'm using gwtp and i'm writing some tests on my view,i have some events like ChangeEvent, clickEvent in my view so how can i obtain these objects i tried by mocking but it is not working.
the code in my view is
`@UiHandler("submit") void onClickSubmit(ClickEvent e) { doClick(); }
@UiHandler("change")
public void onChange(ChangeEvent e) {
doChange();
}
`
Try to reverse the MVP pattern. This way you will need to test only the presenter. Remember in MVP, the view is supposed to be "dumb". The goal is to avoid testing the view.
http://arcbees.wordpress.com/2010/09/03/reversing-the-mvp-pattern-and-using-uihandler/