1. loomis
  2. mockito-flex
  3. Issues
Issue #25 new

Allow original EventDispatcher function stubs

loomis
repo owner created an issue

an easier way of mocking events would be a good idea:

mockito.mockEvents( myDelegate );

at the moment you have to do something along the lines of this:

mockito.given( myDelegate.addEventListener( mockito.any(), mockito.any() ) ).will( mockito.callOriginal() ); mockito.given( myDelegate.dispatchEvent( mockito.any() ) ).will( mockito.callOriginal() );

Comments (0)

  1. Log in to comment