infinite / mockito-flex

0 stars 0 forks source link

Allow original EventDispatcher function stubs #25

Open infinite opened 9 years ago

infinite commented 9 years ago

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() );