Contract Tests in JUnit 4

Published May 28th, 2010 Under Unit Testing | Leave a Comment

As part of his talk on integration tests J.B. Rainsberger talked about how contract tests can be used to test the interaction between classes when using a mockist approach to developer testing. He wondered aloud if it would be possible to write these kinds of tests using abstract classes and JUnit 4. The answer is yes, with some caveats, as Ben Rady demonstrates it.

Video produced by Ben Rady

Related Videos:


Comments

Name (required)

Email (required)

Website

Speak your mind

*