Can those arguments be put into PageParameters?
On Thu, May 22, 2008 at 11:24 AM, nitinkc <[EMAIL PROTECTED]> wrote:
>
> That won't work for me b'cos I am also passing constructor arguments to the
> response Page.
> So "new Page()" is actually "new Page(x,y)".
>
>
> jwcarman wrote:
>>
>> You could use the bookmarkable version of setResponsePage(). That
>> just says what type of page to instantiate.
>>
>>
>> On Thu, May 22, 2008 at 10:51 AM, nitinkc <[EMAIL PROTECTED]> wrote:
>>>
>>> I am looking to unit test the following:
>>>
>>> form.add(new AjaxSubmitLink("submitLink"){
>>> private static final long serialVersionUID =
>>> 3239568065916265026L;
>>>
>>> @Override
>>> protected void onSubmit(AjaxRequestTarget target,
>>> Form form){
>>> setResponsePage(new ScheduleEvent(event,
>>> resources));
>>> }
>>>
>>> Calling
>>> tester.clickLink("submitLink", true);
>>>
>>> instantiates the ScheduleEvent class. I want to avoid this as it forces
>>> me
>>> to mock appropriate parameters for ScheduleEvent. All I want to do is
>>> check
>>> that the rendered page is of type ScheduleEvent. ScheduleEvent class will
>>> have it's own unit tests where I want to address issues concerning it.
>>> Has
>>> anyone done this??
>>> --
>>> View this message in context:
>>> http://www.nabble.com/unit-testing-setRenderResponse%28new-Page%28%29%29-without-instantiation-of-Page-tp17405981p17405981.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/unit-testing-setRenderResponse%28new-Page%28%29%29-without-instantiation-of-Page-tp17405981p17406699.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]