[JIRA] Created: (STS-706) MockRoundtrip doesn't work with clean url:s

View: New views
7 Messages — Rating Filter:   Alert me  

[JIRA] Created: (STS-706) MockRoundtrip doesn't work with clean url:s

by JIRA jira@stripesframework.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

MockRoundtrip doesn't work with clean url:s
-------------------------------------------

                 Key: STS-706
                 URL: http://www.stripesframework.org/jira/browse/STS-706
             Project: Stripes
          Issue Type: Bug
          Components: ActionBean Dispatching
    Affects Versions: Release 1.5.1
            Reporter: Joakim Kemeny


I'm having some problems after upgrading from Stripes 1.5 to Stripes 1.5.1.

I have a simple ActionBean with a property called path. I try to set this property using @UrlBinding("/test/{path}.html") but this only works half way.

Calling this action using /test/some/path.html will call the correct action and set the path property to "some/path". This behavior is expected.
Calling the same action in a test case using MockRoundtrip however will set the path to "{path}". This behavior is not expected.

After debugging the Stripes code I traced the problem back to STS-616. It seems that the MergedParameterMap contains the following array ["{path}", "some/path"] when it's created from a MockRoundtrip but not during normal execution.

I'll attach a test case for this and hope for a fix or a workaround. Meanwhile I'll have to go back to 1.5.

--
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

       

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-development mailing list
Stripes-development@...
https://lists.sourceforge.net/lists/listinfo/stripes-development

[JIRA] Updated: (STS-706) MockRoundtrip doesn't work with clean url:s

by JIRA jira@stripesframework.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Joakim Kemeny updated STS-706:
------------------------------

    Attachment: TestActionBeanTest.java

TestCase to reproduce this problem.

> MockRoundtrip doesn't work with clean url:s
> -------------------------------------------
>
>                 Key: STS-706
>                 URL: http://www.stripesframework.org/jira/browse/STS-706
>             Project: Stripes
>          Issue Type: Bug
>          Components: ActionBean Dispatching
>    Affects Versions: Release 1.5.1
>            Reporter: Joakim Kemeny
>         Attachments: TestActionBean.java, TestActionBeanTest.java
>
>
> I'm having some problems after upgrading from Stripes 1.5 to Stripes 1.5.1.
> I have a simple ActionBean with a property called path. I try to set this property using @UrlBinding("/test/{path}.html") but this only works half way.
> Calling this action using /test/some/path.html will call the correct action and set the path property to "some/path". This behavior is expected.
> Calling the same action in a test case using MockRoundtrip however will set the path to "{path}". This behavior is not expected.
> After debugging the Stripes code I traced the problem back to STS-616. It seems that the MergedParameterMap contains the following array ["{path}", "some/path"] when it's created from a MockRoundtrip but not during normal execution.
> I'll attach a test case for this and hope for a fix or a workaround. Meanwhile I'll have to go back to 1.5.

--
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

       

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-development mailing list
Stripes-development@...
https://lists.sourceforge.net/lists/listinfo/stripes-development

[JIRA] Updated: (STS-706) MockRoundtrip doesn't work with clean url:s

by JIRA jira@stripesframework.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Joakim Kemeny updated STS-706:
------------------------------

    Attachment: TestActionBean.java

TestCase to reproduce this problem.

> MockRoundtrip doesn't work with clean url:s
> -------------------------------------------
>
>                 Key: STS-706
>                 URL: http://www.stripesframework.org/jira/browse/STS-706
>             Project: Stripes
>          Issue Type: Bug
>          Components: ActionBean Dispatching
>    Affects Versions: Release 1.5.1
>            Reporter: Joakim Kemeny
>         Attachments: TestActionBean.java, TestActionBeanTest.java
>
>
> I'm having some problems after upgrading from Stripes 1.5 to Stripes 1.5.1.
> I have a simple ActionBean with a property called path. I try to set this property using @UrlBinding("/test/{path}.html") but this only works half way.
> Calling this action using /test/some/path.html will call the correct action and set the path property to "some/path". This behavior is expected.
> Calling the same action in a test case using MockRoundtrip however will set the path to "{path}". This behavior is not expected.
> After debugging the Stripes code I traced the problem back to STS-616. It seems that the MergedParameterMap contains the following array ["{path}", "some/path"] when it's created from a MockRoundtrip but not during normal execution.
> I'll attach a test case for this and hope for a fix or a workaround. Meanwhile I'll have to go back to 1.5.

--
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

       

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-development mailing list
Stripes-development@...
https://lists.sourceforge.net/lists/listinfo/stripes-development

[JIRA] Commented: (STS-706) MockRoundtrip doesn't work with clean url:s

by JIRA jira@stripesframework.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://www.stripesframework.org/jira/browse/STS-706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11739#action_11739 ]

Karen commented on STS-706:
---------------------------

I have the same problem here.

Runtime the action bean works great. But when doing a MockRoundTrip on the actionBean that has a URLBinding with parameters, it always binds "{variable-name}" instead of the actual parameter value (even if no parameters are added to the MockRoundTrip and it should not bind anything).

Unfortunately I did not find a work around either and am unable to unit test my actionbeans now.

> MockRoundtrip doesn't work with clean url:s
> -------------------------------------------
>
>                 Key: STS-706
>                 URL: http://www.stripesframework.org/jira/browse/STS-706
>             Project: Stripes
>          Issue Type: Bug
>          Components: ActionBean Dispatching
>    Affects Versions: Release 1.5.1
>            Reporter: Joakim Kemeny
>         Attachments: TestActionBean.java, TestActionBeanTest.java
>
>
> I'm having some problems after upgrading from Stripes 1.5 to Stripes 1.5.1.
> I have a simple ActionBean with a property called path. I try to set this property using @UrlBinding("/test/{path}.html") but this only works half way.
> Calling this action using /test/some/path.html will call the correct action and set the path property to "some/path". This behavior is expected.
> Calling the same action in a test case using MockRoundtrip however will set the path to "{path}". This behavior is not expected.
> After debugging the Stripes code I traced the problem back to STS-616. It seems that the MergedParameterMap contains the following array ["{path}", "some/path"] when it's created from a MockRoundtrip but not during normal execution.
> I'll attach a test case for this and hope for a fix or a workaround. Meanwhile I'll have to go back to 1.5.

--
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

       

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-development mailing list
Stripes-development@...
https://lists.sourceforge.net/lists/listinfo/stripes-development

[JIRA] Commented: (STS-706) MockRoundtrip doesn't work with clean url:s

by JIRA jira@stripesframework.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://www.stripesframework.org/jira/browse/STS-706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11843#action_11843 ]

Karen commented on STS-706:
---------------------------

Joakim,

I had the same problem. The solution is to use the MockRoundTrip constructor that includes an URL. In you're case you could try something like:

    MockRoundtrip trip = new MockRoundtrip(context, "/test/path");
    trip.execute();
    assertNull(trip.getForwardUrl());
    assertEquals("path", trip.getActionBean(TestActionBean.class).getPath());

> MockRoundtrip doesn't work with clean url:s
> -------------------------------------------
>
>                 Key: STS-706
>                 URL: http://www.stripesframework.org/jira/browse/STS-706
>             Project: Stripes
>          Issue Type: Bug
>          Components: ActionBean Dispatching
>    Affects Versions: Release 1.5.1
>            Reporter: Joakim Kemeny
>         Attachments: TestActionBean.java, TestActionBeanTest.java
>
>
> I'm having some problems after upgrading from Stripes 1.5 to Stripes 1.5.1.
> I have a simple ActionBean with a property called path. I try to set this property using @UrlBinding("/test/{path}.html") but this only works half way.
> Calling this action using /test/some/path.html will call the correct action and set the path property to "some/path". This behavior is expected.
> Calling the same action in a test case using MockRoundtrip however will set the path to "{path}". This behavior is not expected.
> After debugging the Stripes code I traced the problem back to STS-616. It seems that the MergedParameterMap contains the following array ["{path}", "some/path"] when it's created from a MockRoundtrip but not during normal execution.
> I'll attach a test case for this and hope for a fix or a workaround. Meanwhile I'll have to go back to 1.5.

--
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

       

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Stripes-development mailing list
Stripes-development@...
https://lists.sourceforge.net/lists/listinfo/stripes-development

[JIRA] Commented: (STS-706) MockRoundtrip doesn't work with clean url:s

by JIRA jira@stripesframework.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://www.stripesframework.org/jira/browse/STS-706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11844#action_11844 ]

Karen commented on STS-706:
---------------------------

This issue seems fixed, I propose to close it.

> MockRoundtrip doesn't work with clean url:s
> -------------------------------------------
>
>                 Key: STS-706
>                 URL: http://www.stripesframework.org/jira/browse/STS-706
>             Project: Stripes
>          Issue Type: Bug
>          Components: ActionBean Dispatching
>    Affects Versions: Release 1.5.1
>            Reporter: Joakim Kemeny
>         Attachments: TestActionBean.java, TestActionBeanTest.java
>
>
> I'm having some problems after upgrading from Stripes 1.5 to Stripes 1.5.1.
> I have a simple ActionBean with a property called path. I try to set this property using @UrlBinding("/test/{path}.html") but this only works half way.
> Calling this action using /test/some/path.html will call the correct action and set the path property to "some/path". This behavior is expected.
> Calling the same action in a test case using MockRoundtrip however will set the path to "{path}". This behavior is not expected.
> After debugging the Stripes code I traced the problem back to STS-616. It seems that the MergedParameterMap contains the following array ["{path}", "some/path"] when it's created from a MockRoundtrip but not during normal execution.
> I'll attach a test case for this and hope for a fix or a workaround. Meanwhile I'll have to go back to 1.5.

--
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

       

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Stripes-development mailing list
Stripes-development@...
https://lists.sourceforge.net/lists/listinfo/stripes-development

[JIRA] Commented: (STS-706) MockRoundtrip doesn't work with clean url:s

by JIRA jira@stripesframework.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://www.stripesframework.org/jira/browse/STS-706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11858#action_11858 ]

Joakim Kemeny commented on STS-706:
-----------------------------------

Thank you Karen. This worked for me as well.
It's still strange that the behaviour changed but I have no problem marking this issue as Won't fix provided this workaround.

> MockRoundtrip doesn't work with clean url:s
> -------------------------------------------
>
>                 Key: STS-706
>                 URL: http://www.stripesframework.org/jira/browse/STS-706
>             Project: Stripes
>          Issue Type: Bug
>          Components: ActionBean Dispatching
>    Affects Versions: Release 1.5.1
>            Reporter: Joakim Kemeny
>         Attachments: TestActionBean.java, TestActionBeanTest.java
>
>
> I'm having some problems after upgrading from Stripes 1.5 to Stripes 1.5.1.
> I have a simple ActionBean with a property called path. I try to set this property using @UrlBinding("/test/{path}.html") but this only works half way.
> Calling this action using /test/some/path.html will call the correct action and set the path property to "some/path". This behavior is expected.
> Calling the same action in a test case using MockRoundtrip however will set the path to "{path}". This behavior is not expected.
> After debugging the Stripes code I traced the problem back to STS-616. It seems that the MergedParameterMap contains the following array ["{path}", "some/path"] when it's created from a MockRoundtrip but not during normal execution.
> I'll attach a test case for this and hope for a fix or a workaround. Meanwhile I'll have to go back to 1.5.

--
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

       

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-development mailing list
Stripes-development@...
https://lists.sourceforge.net/lists/listinfo/stripes-development