BIRT 3.7
Written by: Michael Williams
Featured Refcardz: Top Refcardz:
  1. Eclipse for Spring
  2. MVVM Pattern
  3. Eclipse RCP
  4. Silverlight/WP7
  5. Eclipse Plug-ins
  1. BIRT 3.7
  2. Ajax
  3. Eclipse
  4. jQuery Selectors
  5. Spring Config.

Link Details

Link 144213 thumbnail
User 367139 avatar

By Gruss
via gprussell.net
Published: Dec 26 2008 / 14:25

Why implement all the methods on your stub, when you only need a few?
  • 6
  • 2
  • 2219
  • 0

Comments

Add your comment
User 277934 avatar

jfpoilpret replied ago:

0 votes Vote down Vote up Reply

Why not use EasyMock or jMock, but reinvent the wheel?

User 367139 avatar

Gruss replied ago:

0 votes Vote down Vote up Reply

Thanks for your comment; I tried to preempt such comments with my preamble; I guess I failed.

>>>
Setting aside the discussion of stubs Vs. mocks in JUnit testing (that is covered more than adequately elsewhere), let’s say you’ve decided to use stubs, for whatever reason.


Please understand that the simple examples in this article may be more appropriately handled with mocks; they are for illustrative purposes only
<<<

The key phrase being “…let’s say you’ve decided to use stubs, for whatever reason…”

I necessarily had to greatly simplify the example. I had, and have, no intention of getting into a religious war on the subject.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (6)



Voters Against This Link (2)