Posts Tagged testing

Ode to MockFor(March): Part 2 - mockDomain

I know March has long passed. My intentions to do this series during the month of March feel grossly short due to time constrains and a little bit of laziness. In [Part 1][] we started our discussion of the Testing Plugin and how it helps the Grails developer test the constraints on their domain classes. This time around we are going to look at how the Testing Plugin helps you write tests that use all those methods that are injected into your Domain Class at runtime.

Read the rest of this entry »

,

5 Comments

Ode to MockFor(March): Part 1 - Testing Constraints

Last March, Glen Smith did a wonderfull series on how to write unit tests for your Grails application. This series addressed a major pain point in Grails development at the time: Testing.

A year later and testing your Grails application is much less painfull thanks to the Testing Plugin and its author Peter Ledbrook which has been now been integrated into Grails 1.1

This series is ment to give new users of Grails an overview of how to do Unit Testing using the Testing Plugin (pre Grails 1.1) or just Grails 1.1, and to highlight what the plugin gives you. This will not be an account of what you had to do prior to the Testing Plugin. Just be thankfull you don’t have to travel that road, I know I’m happy to be off it.

First off: Testing Constraints in your Domain Class

Read the rest of this entry »

,

No Comments