Archive for the 'testing' Category

A couple of days ago I wrote my first post on TDD using Grails. Now let's move on to something more interesting: testing dynamic taglibs.
In another post I showed how to create a simple tag. Which looked like this:
PLAIN TEXT
GROOVY:

import com.plink.plextile.*;

class TextileTagLib {

  TextParser textileParser

  def textile = { attrs ->

    out <<textileParser.parseTextile(attrs.text, true)

  [...]

Writing tests for a Grails applications is really simple. In Groovy code actually compiles when non-existing methods of objects are referenced (as opposed to Java) which makes it possible exercise TDD (test driven development).
Grails supports two types of tests out of the box, unittests and integrationtests. Tests are located in the test folder of [...]




About

Welcome to the weblog of Peter Maas. Here you'll find various posts related to stuff I like (like my kids and espresso) and stuff I do (like developing software).

JavaOne 2008 Pictures


Joshua Bloch at JavaOne2008 Charles Nutter & Guillaume Laforge pub Stage being build in the nearby park Cable Car line sea_lion Stretched Limo Hotel room Golden Gate Okke en Rudie javaone 2008 goodybag Greenland Rudie Community One Keynote nearby hotel Scribbled Sun Logo Moscone Center - JavaOne Java + You on a cab javaone2008 keynote smashmouth
View more photos >

Categories



Meld u aan voor PayPal en begin direct met het accepteren van creditcardbetalingen.