[
http://www.stripesframework.org/jira/browse/STS-755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ben Gunter resolved STS-755.
----------------------------
Resolution: Fixed
Fix Version/s: Release 1.6
Assignee: Ben Gunter
This was fixed along with STS-777. I just tested your example against 1.5.3
(fail), 1.5.4 (fail) and 1.5.5-SNAPSHOT (pass). Once 1.5.5 is released you
should be in good shape.
> Unit test fails under unknown condition
> ---------------------------------------
>
> Key: STS-755
> URL: http://www.stripesframework.org/jira/browse/STS-755
> Project: Stripes
> Issue Type: Bug
> Affects Versions: Release 1.5.3
> Environment: Ubuntu Linux 10.04 x86_64
> Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
> Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)
> Reporter: Eduardo Franceschi
> Assignee: Ben Gunter
> Fix For: Release 1.5.5, Release 1.6
>
> Attachments: test-stripes.zip
>
>
> Almost all my unit tests fails after I have changed stripes version from 1.5
> to 1.5.3.
> I have created a simple test to simulate the problem, but I cant find a
> solution yet.
> The test prints Param1={param1} instead of Param1=1 and the test fail.
> @UrlBinding("/foo/{param1}/{$event}")
> public class FooActionBean implements ActionBean {
> private ActionBeanContext context;
> @Validate(required = true)
> private int param1;
> @DefaultHandler
> public Resolution bar() {
> return new ForwardResolution("bar.jsp");
> }
> @Override
> public ActionBeanContext getContext() {
> return this.context;
> }
> public int getParam1() {
> return this.param1;
> }
> @Override
> public void setContext(ActionBeanContext context) {
> this.context = context;
> System.out.println("Param1=" +
> context.getRequest().getParameter("param1"));
> }
> public void setParam1(int param1) {
> this.param1 = param1;
> }
> }
> public class FooActionBeanTest {
> @Test
> public void test() throws Exception {
> MockServletContext context = new MockServletContext("test");
> Map<String, String> filterParams = new HashMap<String,
> String>();
> filterParams.put("ActionResolver.Packages", "tld.domain");
> context.addFilter(StripesFilter.class, "StripesFilter",
> filterParams);
> context.setServlet(DispatcherServlet.class,
> "StripesDispatcher", null);
> MockRoundtrip trip = new MockRoundtrip(context,
> FooActionBean.class);
> trip.setParameter("param1", "1");
> trip.execute("foo");
> FooActionBean bean = trip.getActionBean(FooActionBean.class);
> assertEquals(1, bean.getParam1());
> }
> }
--
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
------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development