Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
Articles




JSPWiki v2.2.33

[RSS]


Hide Menu

AppFuseEasyMock


Difference between current version and version 3:

At line 193 changed 1 line.
I think this form of mocking your test is very simple to understand. The MockControl simply keeps track of the calls you make to the mocked instance. This way it becomes very easy to write down your expectations and the rather complicated setup of expectaions using bare Mocks is not needed anymore. Just like with bare Mocks you can set (void) return values or exceptions to be thrown. There are even convenience methods to specify that a method i supposed to be called n times. For more information on what EasyMock can do for you visit the EasyMock [Documentation|http://www.easymock.org/Documentation.html].
I think this form of mocking your test is very simple to understand. The MockControl simply keeps track of the calls you make to the mocked instance. This way it becomes very easy to write down your expectations and the rather complicated setup of expectations using bare Mocks is not needed anymore. Just like with bare Mocks you can set (void) return values or exceptions to be thrown. There are even convenience methods to specify that a method i supposed to be called n times. For more information on what EasyMock can do for you visit the EasyMock [Documentation|http://www.easymock.org/Documentation.html].

Back to AppFuseEasyMock, or to the Page History.