mocking GWT EventBus with mockito

会有一股神秘感。 提交于 2019-12-06 11:17:14

Shouldn't you pass the spied instance to your activity, instead of spying it afterwards?

Note you can also use a com.google.gwt.event.shared.testing.CountingEventBus which is a simple EventBus (uses new SimpleEventBus unless you pass an EventBus instance to be wrapped) with the addition of a getCount(GwtEvent.Type) method. You'd then do an assertEquals(1, countingEventBus.getCount(AssetEvent.TYPE));

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!