| org.springframework.webflow.test.execution.AbstractFlowExecutionTests org.springframework.webflow.test.execution.AbstractExternalizedFlowExecutionTests org.springframework.webflow.test.execution.AbstractXmlFlowExecutionTests
AbstractXmlFlowExecutionTests | abstract public class AbstractXmlFlowExecutionTests extends AbstractExternalizedFlowExecutionTests (Code) | | Base class for flow integration tests that verify an XML flow definition
executes as expected.
Example usage:
public class SearchFlowExecutionTests extends AbstractXmlFlowExecutionTests {
protected FlowDefinitionResource getFlowDefinitionResource() {
return createFlowDefinitionResource("src/main/webapp/WEB-INF/flows/search-flow.xml");
}
public void testStartFlow() {
startFlow();
assertCurrentStateEquals("displaySearchCriteria");
}
public void testDisplayCriteriaSubmitSuccess() {
startFlow();
MockParameterMap parameters = new MockParameterMap();
parameters.put("firstName", "Keith");
parameters.put("lastName", "Donald");
ViewSelection view = signalEvent("search", parameters);
assertCurrentStateEquals("displaySearchResults");
assertModelAttributeCollectionSize(1, "results", view);
}
}
author: Keith Donald author: Erwin Vervaet |
AbstractXmlFlowExecutionTests | public AbstractXmlFlowExecutionTests(String name)(Code) | | Constructs an XML flow execution test with given name.
Parameters: name - the name of the test since: 1.0.2 |
registerLocalMockServices | protected void registerLocalMockServices(Flow flow, ConfigurableBeanFactory beanFactory)(Code) | | Template method subclasses may override to register mock implementations of
services used locally by the flow being tested.
Parameters: flow - the flow to register the services for Parameters: beanFactory - the local flow service registry; register mock services with itusing ConfigurableBeanFactory.registerSingleton(StringObject) since: 1.0.4 |
Methods inherited from org.springframework.webflow.test.execution.AbstractFlowExecutionTests | protected ApplicationView applicationView(ViewSelection viewSelection)(Code)(Java Doc) protected void assertActiveFlowEquals(String expectedActiveFlowId)(Code)(Java Doc) protected void assertCurrentStateEquals(String expectedCurrentStateId)(Code)(Java Doc) protected void assertFlowExecutionActive()(Code)(Java Doc) protected void assertFlowExecutionEnded()(Code)(Java Doc) protected void assertModelAttributeCollectionSize(int expectedSize, String attributeName, ApplicationView viewSelection)(Code)(Java Doc) protected void assertModelAttributeEquals(Object expectedValue, String attributeName, ApplicationView viewSelection)(Code)(Java Doc) protected void assertModelAttributeNotNull(String attributeName, ApplicationView viewSelection)(Code)(Java Doc) protected void assertModelAttributeNull(String attributeName, ApplicationView viewSelection)(Code)(Java Doc) protected void assertViewNameEquals(String expectedViewName, ApplicationView viewSelection)(Code)(Java Doc) protected ExternalContext createExternalContext(ParameterMap requestParameters)(Code)(Java Doc) protected FlowExecutionFactory createFlowExecutionFactory()(Code)(Java Doc) protected Object evaluateModelAttributeExpression(String attributeName, Map model)(Code)(Java Doc) protected ExternalRedirect externalRedirect(ViewSelection viewSelection)(Code)(Java Doc) protected FlowDefinitionRedirect flowDefinitionRedirect(ViewSelection viewSelection)(Code)(Java Doc) protected FlowExecutionRedirect flowExecutionRedirect(ViewSelection viewSelection)(Code)(Java Doc) protected Object getConversationAttribute(String attributeName)(Code)(Java Doc) protected Object getFlashAttribute(String attributeName)(Code)(Java Doc) protected Object getFlowAttribute(String attributeName)(Code)(Java Doc) abstract protected FlowDefinition getFlowDefinition()(Code)(Java Doc) protected FlowExecution getFlowExecution() throws IllegalStateException(Code)(Java Doc) protected FlowExecutionFactory getFlowExecutionFactory()(Code)(Java Doc) protected Object getRequiredConversationAttribute(String attributeName) throws IllegalStateException(Code)(Java Doc) protected Object getRequiredConversationAttribute(String attributeName, Class requiredType) throws IllegalStateException(Code)(Java Doc) protected Object getRequiredFlashAttribute(String attributeName) throws IllegalStateException(Code)(Java Doc) protected Object getRequiredFlashAttribute(String attributeName, Class requiredType) throws IllegalStateException(Code)(Java Doc) protected Object getRequiredFlowAttribute(String attributeName) throws IllegalStateException(Code)(Java Doc) protected Object getRequiredFlowAttribute(String attributeName, Class requiredType) throws IllegalStateException(Code)(Java Doc) protected void nullView(ViewSelection viewSelection)(Code)(Java Doc) protected ViewSelection refresh() throws FlowExecutionException(Code)(Java Doc) protected ViewSelection refresh(ExternalContext context) throws FlowExecutionException(Code)(Java Doc) public void setExpressionParser(ExpressionParser expressionParser)(Code)(Java Doc) protected ViewSelection signalEvent(String eventId) throws FlowExecutionException(Code)(Java Doc) protected ViewSelection signalEvent(String eventId, ParameterMap requestParameters) throws FlowExecutionException(Code)(Java Doc) protected ViewSelection signalEvent(String eventId, ExternalContext context) throws FlowExecutionException(Code)(Java Doc) protected ViewSelection startFlow() throws FlowExecutionException(Code)(Java Doc) protected ViewSelection startFlow(MutableAttributeMap input) throws FlowExecutionException(Code)(Java Doc) protected ViewSelection startFlow(MutableAttributeMap input, ExternalContext context) throws FlowExecutionException(Code)(Java Doc) protected void updateFlowExecution(FlowExecution flowExecution)(Code)(Java Doc)
|
|
|