I have a testcase that runs like it should using jUnit4.
I´m curious if anyone can tell me how I would write the same testcase
using jMock?
@Test
public void testNextDateButton() {
HandlerManager eventBus = new HandlerManager(null);
GreetingServiceAsync service =
GWT.create(GreetingService.class);
MockNavigationWidget navigationWidget = new
MockNavigationWidget();
NavigationPresenter navigationPresenter = new
NavigationPresenter
(navigationWidget, eventBus, service);
MockOrderListWidget listWidget = new MockOrderListWidget();
OrderListPresenter orderListPresenter = new OrderListPresenter
(listWidget, eventBus);
Date date = new Date();
navigationWidget.hasValueDate.setValue(date);
Assert.assertEquals(date,navigationWidget.hasValueDate.getValue());
navigationWidget.nextClickHandler.lastClickHandler.onClick(new
MockClickEvent());
Assert.assertEquals(date.getTime() + 86400000L,
navigationWidget.hasValueDate.lastValue.getTime());
}
Cheers!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---