#3 @Mock annotation to provide mock autowiring

EasyMock_2.4
open
EasyMock (33)
5
2012-10-05
2008-02-17
No

Submitted by Russell Brown.

I sometimes find when testing facades or web components that I have a lot of mocks so I create the @Mock annotation and the helper to make my life even easier.

Discussion

  • Henri Tremblay

    Henri Tremblay - 2008-02-17

    Helper to autowire mocks

     
  • Henri Tremblay

    Henri Tremblay - 2008-02-17

    Mock annotation

     
  • Henri Tremblay

    Henri Tremblay - 2008-02-17

    Logged In: YES
    user_id=893525
    Originator: YES

    File Added: Mock.java

     
  • Henri Tremblay

    Henri Tremblay - 2008-11-22

    I'm ambiguous about this one. I understand why it can be useful. However, it means putting testing annotations in the application code and package EasyMock with the application deployed in production.

    It just doesn't feel right.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks