Jul 22nd, 2010, 05:36 PM
I'd like to create tests that check the EventBus is dispatching expected events using mocking. I attempted to use ASMock, but the expect call fails because the event object being dispatched is created in the tested method. What is a recommended design to write tests for the use of EventBus.dispatchEvent?
myclass.loadData(); //within this class eventBus.dispatchEvent method is called
mockRepository.verify(eventBus); //failing, even though the proper event is dispatched
Jul 27th, 2010, 08:16 AM
this seems to be more of an ASmock specific question, have you tried the ASMock forums already?
I have the feeling that people over there will be better able to help you out.
Jul 27th, 2010, 10:17 AM
Thanks for the reply. I decided to not use a mock and instead created a wrapper for EventBusFacade for my testing purposes.