AbstractGrailsControllerTests (Grails 2.3.8)
Date: 2014-04-24

Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD

## org.codehaus.groovy.grails.web.servlet.mvc
[Groovy] Class AbstractGrailsControllerTests

    java.lang.Object
      junit.framework.Assert
          junit.framework.TestCase
              groovy.util.GroovyTestCase
                  org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerTests

    abstract class AbstractGrailsControllerTests
    extends groovy.util.GroovyTestCase

Field Summary

Fields inherited from class groovy.util.GroovyTestCase
TEST_SCRIPT_NAME_PREFIX

Property Summary
`org.springframework.context.ApplicationContext` | `appCtx`
`MockApplicationContext` | `ctx`
`GrailsApplication` | `ga`
`groovy.lang.GroovyClassLoader` | `gcl`
`java.lang.Object` | `mockManager`
`java.lang.Object` | `originalHandler`
`org.springframework.mock.web.MockHttpServletRequest` | `request`
`org.springframework.mock.web.MockHttpServletResponse` | `response`
`java.lang.Object` | `servletContext`
`GrailsWebRequest` | `webRequest`

Method Summary
`void` | `addValidationMethods(java.lang.Class clazz)`
`void` | `addValidationMethods(GrailsDomainClass dc)`
`GrailsWebRequest` | `buildMockRequest(groovy.util.ConfigObject config)`
`protected java.lang.Object` | `createGrailsApplication()`
`protected MockApplicationContext` | `createMockApplicationContext()`
`protected org.springframework.mock.web.MockServletContext` | `createMockServletContext()`
`protected java.util.Collection` | `getControllerClasses()` Subclasses may override this method to return a list of classes which should be added to the GrailsApplication as controller classes
`protected java.util.Collection` | `getDomainClasses()` Subclasses may override this method to return a list of classes which should be added to the GrailsApplication as domain classes
`protected org.springframework.core.io.Resource[]` | `getResources(java.lang.String pattern)`
`protected void` | `onSetUp()`
`void` | `runTest(groovy.lang.Closure callable)`
`protected java.lang.Object` | `setCurrentController(java.lang.Object controller)`
`protected void` | `setUp()`
`protected void` | `tearDown()`
`java.lang.Object` | `withConfig(java.lang.String text, groovy.lang.Closure callable)`

Methods inherited from class groovy.util.GroovyTestCase
groovy.util.GroovyTestCase#getName(), groovy.util.GroovyTestCase#getMethodName(), groovy.util.GroovyTestCase#notYetImplemented(), groovy.util.GroovyTestCase#notYetImplemented(junit.framework.TestCase), groovy.util.GroovyTestCase#assertEquals(java.lang.String, java.lang.String), groovy.util.GroovyTestCase#assertEquals(java.lang.Object, java.lang.Object), groovy.util.GroovyTestCase#assertEquals(java.lang.String, java.lang.Object, java.lang.Object), groovy.util.GroovyTestCase#run(), groovy.util.GroovyTestCase#run(junit.framework.TestResult), groovy.util.GroovyTestCase#toString(), groovy.util.GroovyTestCase#format(java.lang.String, java.lang.Object, java.lang.Object), groovy.util.GroovyTestCase#setName(java.lang.String), groovy.util.GroovyTestCase#fail(java.lang.String), groovy.util.GroovyTestCase#fail(), groovy.util.GroovyTestCase#failNotEquals(java.lang.String, java.lang.Object, java.lang.Object), groovy.util.GroovyTestCase#countTestCases(), groovy.util.GroovyTestCase#runBare(), groovy.util.GroovyTestCase#assertTrue(java.lang.String, boolean), groovy.util.GroovyTestCase#assertTrue(boolean), groovy.util.GroovyTestCase#assertFalse(java.lang.String, boolean), groovy.util.GroovyTestCase#assertFalse(boolean), groovy.util.GroovyTestCase#assertNull(java.lang.String, java.lang.Object), groovy.util.GroovyTestCase#assertNull(java.lang.Object), groovy.util.GroovyTestCase#assertSame(java.lang.String, java.lang.Object, java.lang.Object), groovy.util.GroovyTestCase#assertSame(java.lang.Object, java.lang.Object), groovy.util.GroovyTestCase#assertNotSame(java.lang.String, java.lang.Object, java.lang.Object), groovy.util.GroovyTestCase#assertNotSame(java.lang.Object, java.lang.Object), groovy.util.GroovyTestCase#failSame(java.lang.String), groovy.util.GroovyTestCase#failNotSame(java.lang.String, java.lang.Object, java.lang.Object), groovy.util.GroovyTestCase#assertNotNull(java.lang.String, java.lang.Object), groovy.util.GroovyTestCase#assertNotNull(java.lang.Object), groovy.util.GroovyTestCase#assertEquals(int, int), groovy.util.GroovyTestCase#assertEquals(boolean, boolean), groovy.util.GroovyTestCase#assertEquals(java.lang.String, double, double, double), groovy.util.GroovyTestCase#assertEquals(double, double, double), groovy.util.GroovyTestCase#assertEquals(java.lang.String, float, float, float), groovy.util.GroovyTestCase#assertEquals(float, float, float), groovy.util.GroovyTestCase#assertEquals(java.lang.String, long, long), groovy.util.GroovyTestCase#assertEquals(java.lang.String, java.lang.String, java.lang.String), groovy.util.GroovyTestCase#assertEquals(java.lang.String, char, char), groovy.util.GroovyTestCase#assertEquals(char, char), groovy.util.GroovyTestCase#assertEquals(java.lang.String, short, short), groovy.util.GroovyTestCase#assertEquals(short, short), groovy.util.GroovyTestCase#assertEquals(java.lang.String, int, int), groovy.util.GroovyTestCase#assertEquals(long, long), groovy.util.GroovyTestCase#assertEquals(java.lang.String, boolean, boolean), groovy.util.GroovyTestCase#assertEquals(java.lang.String, byte, byte), groovy.util.GroovyTestCase#assertEquals(byte, byte), groovy.util.GroovyTestCase#wait(long, int), groovy.util.GroovyTestCase#wait(long), groovy.util.GroovyTestCase#wait(), groovy.util.GroovyTestCase#equals(java.lang.Object), groovy.util.GroovyTestCase#hashCode(), groovy.util.GroovyTestCase#getClass(), groovy.util.GroovyTestCase#notify(), groovy.util.GroovyTestCase#notifyAll()

Methods inherited from class junit.framework.TestCase
junit.framework.TestCase#run(), junit.framework.TestCase#run(junit.framework.TestResult), junit.framework.TestCase#toString(), junit.framework.TestCase#getName(), junit.framework.TestCase#format(java.lang.String, java.lang.Object, java.lang.Object), junit.framework.TestCase#setName(java.lang.String), junit.framework.TestCase#fail(java.lang.String), junit.framework.TestCase#fail(), junit.framework.TestCase#failNotEquals(java.lang.String, java.lang.Object, java.lang.Object), junit.framework.TestCase#countTestCases(), junit.framework.TestCase#runBare(), junit.framework.TestCase#assertTrue(java.lang.String, boolean), junit.framework.TestCase#assertTrue(boolean), junit.framework.TestCase#assertFalse(java.lang.String, boolean), junit.framework.TestCase#assertFalse(boolean), junit.framework.TestCase#assertNull(java.lang.String, java.lang.Object), junit.framework.TestCase#assertNull(java.lang.Object), junit.framework.TestCase#assertSame(java.lang.String, java.lang.Object, java.lang.Object), junit.framework.TestCase#assertSame(java.lang.Object, java.lang.Object), junit.framework.TestCase#assertNotSame(java.lang.String, java.lang.Object, java.lang.Object), junit.framework.TestCase#assertNotSame(java.lang.Object, java.lang.Object), junit.framework.TestCase#failSame(java.lang.String), junit.framework.TestCase#failNotSame(java.lang.String, java.lang.Object, java.lang.Object), junit.framework.TestCase#assertNotNull(java.lang.String, java.lang.Object), junit.framework.TestCase#assertNotNull(java.lang.Object), junit.framework.TestCase#assertEquals(int, int), junit.framework.TestCase#assertEquals(boolean, boolean), junit.framework.TestCase#assertEquals(java.lang.String, double, double, double), junit.framework.TestCase#assertEquals(double, double, double), junit.framework.TestCase#assertEquals(java.lang.String, float, float, float), junit.framework.TestCase#assertEquals(float, float, float), junit.framework.TestCase#assertEquals(java.lang.String, long, long), junit.framework.TestCase#assertEquals(java.lang.String, java.lang.Object, java.lang.Object), junit.framework.TestCase#assertEquals(java.lang.Object, java.lang.Object), junit.framework.TestCase#assertEquals(java.lang.String, java.lang.String, java.lang.String), junit.framework.TestCase#assertEquals(java.lang.String, java.lang.String), junit.framework.TestCase#assertEquals(java.lang.String, char, char), junit.framework.TestCase#assertEquals(char, char), junit.framework.TestCase#assertEquals(java.lang.String, short, short), junit.framework.TestCase#assertEquals(short, short), junit.framework.TestCase#assertEquals(java.lang.String, int, int), junit.framework.TestCase#assertEquals(long, long), junit.framework.TestCase#assertEquals(java.lang.String, boolean, boolean), junit.framework.TestCase#assertEquals(java.lang.String, byte, byte), junit.framework.TestCase#assertEquals(byte, byte), junit.framework.TestCase#wait(long, int), junit.framework.TestCase#wait(long), junit.framework.TestCase#wait(), junit.framework.TestCase#equals(java.lang.Object), junit.framework.TestCase#hashCode(), junit.framework.TestCase#getClass(), junit.framework.TestCase#notify(), junit.framework.TestCase#notifyAll()

Property Detail

### appCtx

    org.springframework.context.ApplicationContext appCtx

### ctx

    MockApplicationContext ctx

### ga

    GrailsApplication ga

### gcl

    groovy.lang.GroovyClassLoader gcl

### mockManager

    java.lang.Object mockManager

### originalHandler

    java.lang.Object originalHandler

### request

    org.springframework.mock.web.MockHttpServletRequest request

### response

    org.springframework.mock.web.MockHttpServletResponse response

### servletContext

    java.lang.Object servletContext

### webRequest

    GrailsWebRequest webRequest

Method Detail

### addValidationMethods

    void addValidationMethods(java.lang.Class clazz)

### addValidationMethods

    void addValidationMethods(GrailsDomainClass dc)

### buildMockRequest

    GrailsWebRequest buildMockRequest(groovy.util.ConfigObject config)

### createGrailsApplication

    protected java.lang.Object createGrailsApplication()

### createMockApplicationContext

    protected MockApplicationContext createMockApplicationContext()

### createMockServletContext

    protected org.springframework.mock.web.MockServletContext createMockServletContext()

### getControllerClasses

    protected java.util.Collection getControllerClasses()

  Subclasses may override this method to return a list of classes which should be added to the GrailsApplication as controller classes
  Returns:
    a list of classes

### getDomainClasses

    protected java.util.Collection getDomainClasses()

  Subclasses may override this method to return a list of classes which should be added to the GrailsApplication as domain classes
  Returns:
    a list of classes

### getResources

    protected org.springframework.core.io.Resource[] getResources(java.lang.String pattern)

### onSetUp

    protected void onSetUp()

### runTest

    void runTest(groovy.lang.Closure callable)

### setCurrentController

    protected java.lang.Object setCurrentController(java.lang.Object controller)

### setUp

    protected void setUp()

### tearDown

    protected void tearDown()

### withConfig

    java.lang.Object withConfig(java.lang.String text, groovy.lang.Closure callable)

Groovy Documentation