Stripes

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

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: Release 1.5
  • Fix Version/s: Release 1.5.1, Release 1.6
  • Component/s: None
  • Labels:
    None

Description

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.

Activity

Hide
Ben Gunter added a comment - 22/Oct/08 1:44 PM

This was fixed with STS-616.

Show
Ben Gunter added a comment - 22/Oct/08 1:44 PM This was fixed with STS-616.

People

Vote (0)
Watch (0)

Dates

  • Created:
    20/Sep/08 10:11 AM
    Updated:
    04/Jan/11 1:08 PM
    Resolved:
    22/Oct/08 1:44 PM