In this article, you’ll learn how the mocking capabilities of GrailsUnitTestCase and ControllerUnitTestCase make it easy to unit test Grails artifacts that you’d otherwise assume need to be tested using an integration test. The mockForConstraintsTests(), mockDomain(), and mockLogging() methods all leverage Groovy’s metaprogramming magic to make testing your domain classes, services, and controllers a breeze.
(Link: Mastering Grails: Mock testing with Grails)
Advertisement


October 21, 2009

No comments yet... Be the first to leave a reply!