Hrm? I'm not extending WicketTester -- I'm extending TestCase. It
doesn't have an init() method. I tried adding app.configure
("development"), but it didn't fix the issue.
On Jun 4, 2006, at 4:33 AM, Juergen Donnerstag wrote:
> You need to change init to call the super implementation
>
> public void init()
> {
> super.init();
> configure(DEVELOPMENT);
> }
>
> Juergen
>
> On 5/31/06, Michael Day <[EMAIL PROTECTED]> wrote:
>> I just noticed this thread after posting a bug report:
>>
>> http://sourceforge.net/tracker/index.php?
>> func=detail&aid=1497866&group_id=119783&atid=684975
>>
>> I assume it is related since the exception is the same.
>>
>> Michael Day
>>
>> On May 30, 2006, at 1:46 PM, Eelco Hillenius wrote:
>>
>>> Test case wicket.util.tester.WicketTesterTest#testPageConstructor
>>> has:
>>>
>>> MyMockApplication tester = new MyMockApplication();
>>> Book mockBook = new Book("xxId", "xxName");
>>> Page page = new ViewBook(mockBook);
>>> tester.startPage(page);
>>>
>>> // assertion
>>> tester.assertRenderedPage(ViewBook.class);
>>> tester.clickLink("link");
>>> tester.assertRenderedPage(CreateBook.class);
>>>
>>> and that seems to work... not sure why that wouldn't work for you?
>>>
>>> Eelco
>>>
>>>
>>> On 5/30/06, Michiel Trimpe <[EMAIL PROTECTED]> wrote:
>>>>
>>>>
>>>>
>>>>
>>>> Hey everyone,
>>>>
>>>>
>>>>
>>>> I just finished creating tests in rc2, but after upgrading to
>>>> wicket
>>>> 1.2-final the tests now fail.
>>>>
>>>>
>>>>
>>>>>>>>>>>> AppTester.java >>>>>>>>
>>>>
>>>> public class AppTester extends WicketTester {
>>>>
>>>> public AppTester() {
>>>>
>>>> super("/admin");
>>>>
>>>> }
>>>>
>>>> public void init() {
>>>>
>>>> configure(DEVELOPMENT);
>>>>
>>>> }
>>>>
>>>> @Override
>>>>
>>>> public Class getHomePage() {
>>>>
>>>> return ListPage.class;
>>>>
>>>> }
>>>>
>>>> }
>>>>
>>>>>>>>> TestList.java >>>>>>>
>>>> tester = new AppTester();
>>>>
>>>> tester.startPage(new ListPage());
>>>>
>>>>
>>>>
>>>> And this returns the error:
>>>>
>>>> wicket.WicketRuntimeException: Can not set the attribute. No
>>>> RequestCycle
>>>> available
>>>>
>>>> at wicket.Session.setAttribute(Session.java:918)
>>>>
>>>> at wicket.PageMap.put(PageMap.java:519)
>>>>
>>>> at wicket.Session.touch(Session.java:720)
>>>>
>>>> at
>>>> wicket.util.tester.WicketTester.startPage(WicketTester.java:248)
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Is this because the tester is broken, or am I doing something
>>>> wrong?
>>>>
>>>>
>>>>
>>>> - michiel
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Michiel Trimpe| Java Developer| TomTom | [EMAIL PROTECTED]
>>>> | +31
>>>> (0)6 41482341mobile
>>>>
>>>>
>>>>
>>>>
>>>> ________________________________
>>>> This e-mail message contains information which is confidential
>>>> and may be
>>>> privileged. It is intended for use by the addressee only. If you
>>>> are not the
>>>> intended addressee, we request that you notify the sender
>>>> immediately and
>>>> delete or destroy this e-mail message and any attachment(s),
>>>> without
>>>> copying, saving, forwarding, disclosing or using its contents in
>>>> any other
>>>> way. TomTom N.V., TomTom International BV or any other company
>>>> belonging to
>>>> the TomTom group of companies will not be liable for damage
>>>> relating to the
>>>> communication by e-mail of data, documents or any other
>>>> information.
>>>>
>>>>
>>>
>>>
>>> -------------------------------------------------------
>>> All the advantages of Linux Managed Hosting--Without the Cost and
>>> Risk!
>>> Fully trained technicians. The highest number of Red Hat
>>> certifications in
>>> the hosting industry. Fanatical Support. Click to learn more
>>> http://sel.as-us.falkag.net/sel?
>>> cmd=lnk&kid=107521&bid=248729&dat=121642
>>> _______________________________________________
>>> Wicket-user mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>>
>>>
>>
>>
>>
>> -------------------------------------------------------
>> All the advantages of Linux Managed Hosting--Without the Cost and
>> Risk!
>> Fully trained technicians. The highest number of Red Hat
>> certifications in
>> the hosting industry. Fanatical Support. Click to learn more
>> http://sel.as-us.falkag.net/sel?
>> cmd=lnk&kid=107521&bid=248729&dat=121642
>> _______________________________________________
>> Wicket-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
>
>
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user