|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Object GroovyTestCase grails.test.GroovyPagesTestCase
class GroovyPagesTestCase extends GroovyTestCase
A test harness that eases testing of GSP and tag libraries for Grails.
Property Summary | |
---|---|
GroovyPagesTemplateEngine |
groovyPagesTemplateEngine
The GroovyPagesTemplateEngine which gets wired into this GSP. |
Method Summary | |
---|---|
java.lang.String
|
applyTemplate(java.lang.Object template, java.lang.Object params = [:])
Applies a GSP template and returns its output as a String. |
void
|
applyTemplate(java.io.StringWriter sw, java.lang.Object template, java.lang.Object params = [:])
|
void
|
assertOutputEquals(java.lang.Object expected, java.lang.Object template, java.lang.Object params = [:], groovy.lang.Closure transform = { it.toString()
Asserts the output of a given template against the specified expected value. |
void
|
setControllerName(java.lang.String name)
Sets the controller name to use. |
Property Detail |
---|
GroovyPagesTemplateEngine groovyPagesTemplateEngine
Method Detail |
---|
java.lang.String applyTemplate(java.lang.Object template, java.lang.Object params = [:])
template
- The GSP templateparams
- An optional parameter that allows the specification of the binding
void applyTemplate(java.io.StringWriter sw, java.lang.Object template, java.lang.Object params = [:])
void assertOutputEquals(java.lang.Object expected, java.lang.Object template, java.lang.Object params = [:], groovy.lang.Closure transform = { it.toString()
expected
- The expected outputtemplate
- A snippet of GSPparams
- An optional parameter that allows variables to be placed in the binding of the GSPtransform
- An optional parameter that allows the specification of a closure to transform the passed StringWriter
void setControllerName(java.lang.String name)
Groovy Documentation