-
Jul 28th, 2012, 06:30 PM
#1
Testing Spring Webflow Action Classes
I am writing test case for my webflow using org.springframework.webflow.test.execution.Abstrac tXmlFlowExecutionTests
public class MyFlowExecutionTests extends AbstractXmlFlowExecutionTests { }
In some cases my logic is simple, So I invoke my service layer directly from the Spring webflow. In some cases I use an extenstion of org.springframework.webflow.action.MultiAction classes and I invoke my service layer from the action classes.
In the first scenario, wrting test case is straight forward. In the second scenario, I found it really complex to write the test cases using org.springframework.webflow.test.execution.Abstrac tXmlFlowExecutionTests for the Action class. In the first scenario, I can mock all the service classes used from my flow. In the second scenario, using easy mock class extension, I can mock the action class. But then I need to mock the service layers used inside, which I think mock can't handle that well.
I am now thinking of somehow moving the Action class code to Spring EL. Or Anybody have a better idea for testing the action class code along with webflow code?..
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules