Hi Ernesto,
On Wed, Mar 16, 2016 at 7:36 AM, Ernesto Reinaldo Barreiro < reier...@gmail.com> wrote: > Hi, > > We have a simple test like.... > > ================================== > > WicketTester tester = tester(); > tester.startPage(AgencyInquiryPage.class); > > FormTester formTester = tester.newFormTester("form"); > formTester.setValue("businessDetails:firstName:field", "John"); > formTester.setValue("businessDetails:lastName:field", "Smith"); > formTester.setValue("businessDetails:companyName:field", "Comp"); > formTester.setValue("businessDetails:streetAndNumber:field", "str. 13"); > formTester.setValue("businessDetails:zipcode:field", "66666"); > formTester.setValue("businessDetails:city:field", "Munich"); > formTester.select("businessDetails:country:select", 0); > formTester.setValue("phoneNumber:field", "666333"); > formTester.setValue("email:field", "t...@test.com"); > formTester.submit("submit"); > > String actualRedirectUrl = tester.getLastResponse().getRedirectLocation(); > Assert.assertTrue(actualRedirectUrl.endsWith("expected/url")); > > ================================== > > and inside on submit we throw a > > ================================ > > public class RedirectToAbsoluteUrlException extends RedirectToUrlException > { > > private static final long serialVersionUID = 1L; > > public RedirectToAbsoluteUrlException(String redirectUrl) { > this(redirectUrl, HttpServletResponse.SC_MOVED_TEMPORARILY); > } > > public RedirectToAbsoluteUrlException(String redirectUrl, int > statusCode) { > super(UrlUtils.toAbsoluteUrl(redirectUrl), statusCode); > } > } > > ================================ > > Test was passing on 6.22.0 but fails on 7.2.0 because actualRedirectUrl is > NULL. Looking at the migration guide I see. > > > https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+7.0#MigrationtoWicket7.0-(Base)WicketTestercanbereusedafterthrownexception > > Before I dive into the code... > > Questions: > > 1- Is this a known issue? > No. > 2- Are we doing something wrong? > Please create a quickstart if you don't find the solution yourself. > > -- > Regards - Ernesto Reinaldo Barreiro >