grails.test
Class ControllerUnitTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by groovy.util.GroovyTestCase
              extended by grails.test.GrailsUnitTestCase
                  extended by grails.test.MvcUnitTestCase
                      extended by grails.test.ControllerUnitTestCase
All Implemented Interfaces:
groovy.lang.GroovyObject, junit.framework.Test

public class ControllerUnitTestCase
extends MvcUnitTestCase
implements groovy.lang.GroovyObject


Field Summary
protected  Object controller
           
 
Fields inherited from class grails.test.MvcUnitTestCase
forwardArgs, mockFlash, mockParams, mockRequest, mockResponse, mockSession, redirectArgs, renderArgs, webRequest
 
Fields inherited from class groovy.util.GroovyTestCase
log, TEST_SCRIPT_NAME_PREFIX
 
Constructor Summary
ControllerUnitTestCase()
           
ControllerUnitTestCase(Class controllerClass)
           
 
Method Summary
protected  groovy.lang.MetaClass $getStaticMetaClass()
           
 Class getControllerClass()
           
 groovy.lang.MetaClass getMetaClass()
           
 Object getProperty(String property)
           
 Object invokeMethod(String method, Object arguments)
           
protected  Object mockCommandObject(Class clazz)
           
protected  Object newInstance()
           
 void setMetaClass(groovy.lang.MetaClass mc)
           
 void setProperty(String property, Object value)
           
protected  void setUp()
           
protected  void setXmlRequestContent(groovy.lang.Closure c)
           
protected  void setXmlRequestContent(String content)
           
protected  void setXmlRequestContent(String encoding, groovy.lang.Closure c)
           
protected  void setXmlRequestContent(String encoding, String content)
           
 
Methods inherited from class grails.test.MvcUnitTestCase
getTestClass, reset, tearDown
 
Methods inherited from class grails.test.GrailsUnitTestCase
addConverters, enableCascadingValidation, getApplicationContext, getDomainClassesInfo, getErrorsMap, getLoadedCodecs, getSavedMetaClasses, loadCodec, mockConfig, mockController, mockDomain, mockDomain, mockFor, mockFor, mockForConstraintsTests, mockForConstraintsTests, mockLogging, mockLogging, mockTagLib, registerMetaClass, setApplicationContext, setDomainClassesInfo, setErrorsMap, setLoadedCodecs, setSavedMetaClasses
 
Methods inherited from class groovy.util.GroovyTestCase
assertArrayEquals, assertContains, assertContains, assertEquals, assertEquals, assertEquals, assertInspect, assertLength, assertLength, assertLength, assertScript, assertToString, fixEOLs, getMethodName, getName, getTestClassName, notYetImplemented, notYetImplemented, shouldFail, shouldFail, shouldFailWithCause
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

controller

protected Object controller
Constructor Detail

ControllerUnitTestCase

public ControllerUnitTestCase()

ControllerUnitTestCase

public ControllerUnitTestCase(Class controllerClass)
Method Detail

getMetaClass

public groovy.lang.MetaClass getMetaClass()
Specified by:
getMetaClass in interface groovy.lang.GroovyObject
Overrides:
getMetaClass in class MvcUnitTestCase

setMetaClass

public void setMetaClass(groovy.lang.MetaClass mc)
Specified by:
setMetaClass in interface groovy.lang.GroovyObject
Overrides:
setMetaClass in class MvcUnitTestCase

invokeMethod

public Object invokeMethod(String method,
                           Object arguments)
Specified by:
invokeMethod in interface groovy.lang.GroovyObject
Overrides:
invokeMethod in class MvcUnitTestCase

getProperty

public Object getProperty(String property)
Specified by:
getProperty in interface groovy.lang.GroovyObject
Overrides:
getProperty in class MvcUnitTestCase

setProperty

public void setProperty(String property,
                        Object value)
Specified by:
setProperty in interface groovy.lang.GroovyObject
Overrides:
setProperty in class MvcUnitTestCase

setUp

protected void setUp()
Overrides:
setUp in class GrailsUnitTestCase

getControllerClass

public Class getControllerClass()

mockCommandObject

protected Object mockCommandObject(Class clazz)

setXmlRequestContent

protected void setXmlRequestContent(String content)

setXmlRequestContent

protected void setXmlRequestContent(String encoding,
                                    String content)

setXmlRequestContent

protected void setXmlRequestContent(groovy.lang.Closure c)

setXmlRequestContent

protected void setXmlRequestContent(String encoding,
                                    groovy.lang.Closure c)

newInstance

protected Object newInstance()
Overrides:
newInstance in class MvcUnitTestCase

$getStaticMetaClass

protected groovy.lang.MetaClass $getStaticMetaClass()
Overrides:
$getStaticMetaClass in class MvcUnitTestCase