|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object GroovyTestCase grails.test.GrailsUnitTestCase grails.test.MvcUnitTestCase
class MvcUnitTestCase extends GrailsUnitTestCase
Common test case support class for controllers, tag libraries, and anything else that has access to the standard web properties such as "request", "response", and "session".
Field Summary | |
---|---|
protected java.util.Map |
forwardArgs
|
protected java.util.Map |
mockFlash
|
protected java.util.Map |
mockParams
|
protected GrailsMockHttpServletRequest |
mockRequest
|
protected GrailsMockHttpServletResponse |
mockResponse
|
protected MockHttpSession |
mockSession
|
protected java.util.Map |
redirectArgs
|
protected java.util.Map |
renderArgs
|
protected GrailsWebRequest |
webRequest
|
Constructor Summary | |
MvcUnitTestCase(java.lang.String suffix)
Creates a new test case for the class whose name and package matches this test's class up to and including the given suffix. |
|
MvcUnitTestCase(java.lang.Class clazz)
Creates a new test case for the given class. |
Method Summary | |
---|---|
java.lang.Class
|
getTestClass()
|
protected java.lang.Object
|
newInstance()
|
protected void
|
reset()
|
protected void
|
tearDown()
|
Methods inherited from class GrailsUnitTestCase | |
---|---|
addConverters, enableCascadingValidation, loadCodec, mockConfig, mockController, mockDomain, mockFor, mockForConstraintsTests, mockLogging, mockTagLib, registerMetaClass, setUp, tearDown |
Field Detail |
---|
protected java.util.Map forwardArgs
protected java.util.Map mockFlash
protected java.util.Map mockParams
protected GrailsMockHttpServletRequest mockRequest
protected GrailsMockHttpServletResponse mockResponse
protected MockHttpSession mockSession
protected java.util.Map redirectArgs
protected java.util.Map renderArgs
protected GrailsWebRequest webRequest
Constructor Detail |
---|
MvcUnitTestCase(java.lang.String suffix)
org.example.MyControllerTests
then the class under test is org.example.MyController
.
This example assumes that the suffix is "Controller".
MvcUnitTestCase(java.lang.Class clazz)
Method Detail |
---|
java.lang.Class getTestClass()
protected java.lang.Object newInstance()
protected void reset()
protected void tearDown()
Groovy Documentation