Clean URL parameters with default values aren't bound when using MockRoundtrip
------------------------------------------------------------------------------

                 Key: STS-609
                 URL: http://www.stripesframework.org/jira/browse/STS-609
             Project: Stripes
          Issue Type: Bug
    Affects Versions: Release 1.5
            Reporter: Levi Hoogenberg
            Priority: Critical


I have the following action bean:

    @UrlBinding("/test/{i=1}")
    public class TestActionBean extends BaseActionBean {
        private int i;

        public int getI() {return i;}
        public void setI(int i) {this.i = i;}

        @DefaultHandler
        public Resolution doNothing() {return null;}
    }

When I try to test this action bean using a mock roundtrip:

    MockRoundtrip roundtrip = new MockRoundtrip(getContext(), "/test");
    roundtrip.setParameter("i", "2");
    roundtrip.execute();

setI is called, but with 1 as its value. In other words,

    assertEquals(roundtrip.getActionBean(TestActionBean.class).getI(), 2);

fails.

-- 
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 the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to