WebFlowTestCase (Grails 2.2.5)
Date: 2014-03-04

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

## grails.test
[Groovy] Class WebFlowTestCase

    java.lang.Object
      junit.framework.Assert
          junit.framework.TestCase
              org.springframework.webflow.test.execution.AbstractFlowExecutionTests
                  grails.test.WebFlowTestCase

    abstract class WebFlowTestCase
    extends org.springframework.webflow.test.execution.AbstractFlowExecutionTests

A test harness for testing Grails flows.

Field Summary
`protected org.springframework.context.ApplicationContext` | `applicationContext`
`protected org.springframework.webflow.engine.builder.support.FlowBuilderServices` | `flowBuilderServices`
`protected org.springframework.webflow.definition.registry.FlowDefinitionRegistry` | `flowDefinitionRegistry`
`protected org.springframework.mock.web.MockHttpServletRequest` | `mockRequest`
`protected org.springframework.mock.web.MockHttpServletResponse` | `mockResponse`
`protected org.springframework.mock.web.MockServletContext` | `mockServletContext`
`protected org.springframework.webflow.mvc.builder.MvcViewFactoryCreator` | `viewCreator`

Method Summary
`java.lang.Object` | `getFlow()` Subclasses should return the flow closure that within the controller.
`org.springframework.webflow.definition.FlowDefinition` | `getFlowDefinition()`
`java.lang.String` | `getFlowId()` Subclasses should override to change flow id.
`org.springframework.webflow.definition.FlowDefinition` | `registerFlow(java.lang.String flowId, groovy.lang.Closure flowClosure)`
`protected void` | `setUp()`
`protected org.springframework.webflow.context.ExternalContext` | `signalEvent(java.lang.String eventId)` Triggers a web flow event for the given eventId and returns the ExternalContext used to trigger the event.
`protected void` | `startFlow()` Initiates a web flow.
`protected void` | `tearDown()`

Methods inherited from class org.springframework.webflow.test.execution.AbstractFlowExecutionTests
org.springframework.webflow.test.execution.AbstractFlowExecutionTests#run(), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#run(junit.framework.TestResult), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#toString(), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#getName(), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#setName(java.lang.String), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#countTestCases(), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#runBare(), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#fail(java.lang.String), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#fail(), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#format(java.lang.String, java.lang.Object, java.lang.Object), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertNotNull(java.lang.String, java.lang.Object), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertNotNull(java.lang.Object), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertEquals(byte, byte), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertEquals(boolean, boolean), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertEquals(java.lang.String, byte, byte), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertEquals(java.lang.String, boolean, boolean), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertEquals(long, long), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertEquals(int, int), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertEquals(java.lang.String, int, int), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertEquals(short, short), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertEquals(java.lang.String, short, short), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertEquals(char, char), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertEquals(java.lang.String, double, double, double), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertEquals(java.lang.String, java.lang.String), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertEquals(java.lang.String, java.lang.String, java.lang.String), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertEquals(java.lang.Object, java.lang.Object), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertEquals(java.lang.String, java.lang.Object, java.lang.Object), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertEquals(java.lang.String, char, char), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertEquals(float, float, float), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertEquals(java.lang.String, float, float, float), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertEquals(java.lang.String, long, long), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertEquals(double, double, double), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#failNotEquals(java.lang.String, java.lang.Object, java.lang.Object), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertTrue(java.lang.String, boolean), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertTrue(boolean), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertFalse(boolean), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertFalse(java.lang.String, boolean), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertNull(java.lang.Object), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertNull(java.lang.String, java.lang.Object), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertSame(java.lang.String, java.lang.Object, java.lang.Object), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertSame(java.lang.Object, java.lang.Object), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertNotSame(java.lang.Object, java.lang.Object), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#assertNotSame(java.lang.String, java.lang.Object, java.lang.Object), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#failSame(java.lang.String), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#failNotSame(java.lang.String, java.lang.Object, java.lang.Object), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#wait(), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#wait(long, int), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#wait(long), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#equals(java.lang.Object), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#hashCode(), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#getClass(), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#notify(), org.springframework.webflow.test.execution.AbstractFlowExecutionTests#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#setName(java.lang.String), junit.framework.TestCase#countTestCases(), junit.framework.TestCase#runBare(), junit.framework.TestCase#fail(java.lang.String), junit.framework.TestCase#fail(), junit.framework.TestCase#format(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(byte, byte), junit.framework.TestCase#assertEquals(boolean, boolean), junit.framework.TestCase#assertEquals(java.lang.String, byte, byte), junit.framework.TestCase#assertEquals(java.lang.String, boolean, boolean), junit.framework.TestCase#assertEquals(long, long), junit.framework.TestCase#assertEquals(int, int), junit.framework.TestCase#assertEquals(java.lang.String, int, int), junit.framework.TestCase#assertEquals(short, short), junit.framework.TestCase#assertEquals(java.lang.String, short, short), junit.framework.TestCase#assertEquals(char, char), junit.framework.TestCase#assertEquals(java.lang.String, double, double, double), junit.framework.TestCase#assertEquals(java.lang.String, java.lang.String), junit.framework.TestCase#assertEquals(java.lang.String, java.lang.String, java.lang.String), junit.framework.TestCase#assertEquals(java.lang.Object, java.lang.Object), junit.framework.TestCase#assertEquals(java.lang.String, java.lang.Object, java.lang.Object), junit.framework.TestCase#assertEquals(java.lang.String, char, char), junit.framework.TestCase#assertEquals(float, float, float), junit.framework.TestCase#assertEquals(java.lang.String, float, float, float), junit.framework.TestCase#assertEquals(java.lang.String, long, long), junit.framework.TestCase#assertEquals(double, double, double), junit.framework.TestCase#failNotEquals(java.lang.String, java.lang.Object, java.lang.Object), junit.framework.TestCase#assertTrue(java.lang.String, boolean), junit.framework.TestCase#assertTrue(boolean), junit.framework.TestCase#assertFalse(boolean), junit.framework.TestCase#assertFalse(java.lang.String, boolean), junit.framework.TestCase#assertNull(java.lang.Object), junit.framework.TestCase#assertNull(java.lang.String, 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.Object, java.lang.Object), junit.framework.TestCase#assertNotSame(java.lang.String, 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#wait(), junit.framework.TestCase#wait(long, int), junit.framework.TestCase#wait(long), junit.framework.TestCase#equals(java.lang.Object), junit.framework.TestCase#hashCode(), junit.framework.TestCase#getClass(), junit.framework.TestCase#notify(), junit.framework.TestCase#notifyAll()

Field Detail

### applicationContext

    protected org.springframework.context.ApplicationContext applicationContext

### flowBuilderServices

    protected org.springframework.webflow.engine.builder.support.FlowBuilderServices flowBuilderServices

### flowDefinitionRegistry

    protected org.springframework.webflow.definition.registry.FlowDefinitionRegistry flowDefinitionRegistry

### mockRequest

    protected org.springframework.mock.web.MockHttpServletRequest mockRequest

### mockResponse

    protected org.springframework.mock.web.MockHttpServletResponse mockResponse

### mockServletContext

    protected org.springframework.mock.web.MockServletContext mockServletContext

### viewCreator

    protected org.springframework.webflow.mvc.builder.MvcViewFactoryCreator viewCreator

Method Detail

### getFlow

    java.lang.Object getFlow()

  Subclasses should return the flow closure that within the controller. For example: `return new TestController().myFlow`.

### getFlowDefinition

    org.springframework.webflow.definition.FlowDefinition getFlowDefinition()

### getFlowId

    java.lang.String getFlowId()

  Subclasses should override to change flow id.

### registerFlow

    org.springframework.webflow.definition.FlowDefinition registerFlow(java.lang.String flowId, groovy.lang.Closure flowClosure)

### setUp

    protected void setUp()

### signalEvent

    protected org.springframework.webflow.context.ExternalContext signalEvent(java.lang.String eventId)

  Triggers a web flow event for the given eventId and returns the ExternalContext used to trigger the event.

### startFlow

    protected void startFlow()

  Initiates a web flow.

### tearDown

    protected void tearDown()

Groovy Documentation