Unfortunately, even as this book is being written, testing subflows is still cumbersome and there are a lot of bugs opened and unresolved.8
When the scope is to test the subflows too, the getModelResources method of AbstractXmlFlowExecutionTests must be overridden. Add the subflow definition to the flow resources being tested:
import org.springframework.webflow.engine.Flow;import org.springframework.webflow.test.MockExternalContext;import org.springframework.webflow.test.MockFlowBuilderContext;import org.springframework.webflow.test.execution.AbstractXmlFlowExecutionTests; public class NewPersonFlowTest extends AbstractXmlFlowExecutionTests {... @Override protected FlowDefinitionResource getModelResources(FlowDefinitionResourceFactory ...
Get Pivotal Certified Spring Web Application Developer Exam: A Study Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.