Onward Resolution accesses the stripes configuration in their constructors 
making testing difficult
---------------------------------------------------------------------------------------------------

                 Key: STS-874
                 URL: http://www.stripesframework.org/jira/browse/STS-874
             Project: Stripes
          Issue Type: Bug
          Components: Context Management
    Affects Versions: Release 1.5.6
         Environment: All
            Reporter: Karl Kirch
            Priority: Minor


We have a fairly long interceptor chain and a fairly complicated spring setup 
making MockRoundTrip testing difficult. 
So to avoid this difficulty, we're just testing our action beans directly using 
Mockito and this works fantastically well except for when we use a forward or 
redirect resolution to resolve back to an action bean class instead of a jsp or 
path.
The problem lies in the way onward resolution handles its construction via 
beantype. Because the onward resolution immediately tries to resolve the url to 
the requested bean class, it hits the stripes configuration which doesn't exist 
because we're doing out of container testing. 
If this was done lazily, say like during execute, this would make classes using 
forward and redirect resolution immensely easier to test.

As a workaround right now, we've created a few factories that we can stub out 
the creation of these resolutions, but its not ideal.... 

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to