Groovy Documentation

grails.test
[Groovy] Class WebFlowTestCase

java.lang.Object
  org.springframework.webflow.test.execution.AbstractFlowExecutionTests
      grails.test.WebFlowTestCase

abstract class WebFlowTestCase
extends AbstractFlowExecutionTests

A test harness for testing Grails flows.


Field Summary
protected ApplicationContext applicationContext

protected FlowBuilderServices flowBuilderServices

protected FlowDefinitionRegistry flowDefinitionRegistry

protected MockHttpServletRequest mockRequest

protected MockHttpServletResponse mockResponse

protected MockServletContext mockServletContext

protected MvcViewFactoryCreator viewCreator

 
Method Summary
java.lang.Object getFlow()

Subclasses should return the flow closure that within the controller.

FlowDefinition getFlowDefinition()

java.lang.String getFlowId()

Subclasses should override to change flow id.

FlowDefinition registerFlow(java.lang.String flowId, groovy.lang.Closure flowClosure)

protected void setUp()

protected 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()

 

Field Detail

applicationContext

protected ApplicationContext applicationContext


flowBuilderServices

protected FlowBuilderServices flowBuilderServices


flowDefinitionRegistry

protected FlowDefinitionRegistry flowDefinitionRegistry


mockRequest

protected MockHttpServletRequest mockRequest


mockResponse

protected MockHttpServletResponse mockResponse


mockServletContext

protected MockServletContext mockServletContext


viewCreator

protected 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

FlowDefinition getFlowDefinition()


getFlowId

java.lang.String getFlowId()
Subclasses should override to change flow id.


registerFlow

FlowDefinition registerFlow(java.lang.String flowId, groovy.lang.Closure flowClosure)


setUp

protected void setUp()


signalEvent

protected 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