On Wed, Mar 2, 2011 at 9:23 PM, B Smith-Mannschott <[email protected]>wrote:

> I've seen examples of
> hamcrest matchers to record expectations in "modern" junit tests. How
> much overlap is there between Hamcrest and a mocking library such as
> Mockito?


+1 to Mockito. JMock is its main rival, I guess, and was created by the
authors of the GOOS book, but I find it a lot less natural.

I haven't seen Hamcrest used to record expectations, only for assertions.
However, I prefer FEST-Assert <http://code.google.com/p/fest/>, as I find it
easier and more readable.

If you're really into GOOS's test data builders, you might want to check out
Nat Pryce's make-it-easy <http://code.google.com/p/make-it-easy/>. I haven't
used it on a project, though, so I don't know how well it really works.

JUnit 4.8's 
@Rule<http://kentbeck.github.com/junit/javadoc/latest/org/junit/rules/package-summary.html>is
a cool and perhaps under-used feature.

Moandji

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to