infinite / mockito-flex

0 stars 0 forks source link

Allow original EventDispatcher function stubs #25

Open infinite opened 10 years ago

infinite commented 10 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() );