Mastering Grails: Mock testing with Grails

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

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

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.