[ 
http://www.stripesframework.org/jira/browse/STS-484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tim Fennell resolved STS-484.
-----------------------------

       Resolution: Fixed
    Fix Version/s: Release 1.5

I believe this is now largely fixed.  As long as a mock context  (and only one 
mock context) is setup in the JVM Stripes classes will now figure out that 
there is only a single configuration active and use it.  So as long as the mock 
context is around, you can now execute unit tests that depend on the 
configuration without passing through the stripes filter / mock context.

> Make StripesFilter.getConfiguration() work for unit tests that don't use 
> MockRoundtrip etc.
> -------------------------------------------------------------------------------------------
>
>                 Key: STS-484
>                 URL: http://www.stripesframework.org/jira/browse/STS-484
>             Project: Stripes
>          Issue Type: Improvement
>            Reporter: Tim Fennell
>             Fix For: Release 1.5
>
>
> Right now we have a bunch of unit tests that call 
> StripesFilter.getConfiguration() for simple tests that are not routed through 
> MockRoundtrip (or otherwise through the Filter in a MockServletContext).  
> This leads to a lot of exceptions being logged, and makes it impossible to 
> write some unit tests.
> We should setup a way to make that call work for unit tests.  One solution 
> (maybe there is a better one) would be to add a method in the 
> StripesTestFixture that sets the Configuration onto the thread local on the 
> StripesFilter (ideally via a non-public method?).  For the Stripes tests we 
> could then have a BaseTest with a @Before method that sets things up.  For 
> user's tests, they'd be responsible for calling the method on the TestFixture.
> NB. This is a replacement for the last part of STS-324

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://www.stripesframework.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to