Hi
I am not native English speaker.
sorry for poor English.
I use wicket 1.2.6 .
I have question to use WicketTester.
i want to make Global object ,create instance in WebApplication Class and
create method to access the instance.
In WebPage class ,access the instance like this
SingleClass class = ((FooApplication)getApplication()).getSingleClass();
'FooApplication' extends WebApplication and 'SingleClass' is Global object's
class.
To test the above WebPage class, make the class 'FooApplicationTester' that
extends WicketTester and
Copy & Paste the FooApplication's method .
when run the test code, ClassCastException happens.
I declared interface IFooApplication and implement at FooApplication and
FooApplicationTester.
I changed the WebPage class like this
SingleClass class = ((IFooApplication)getApplication()).getSingleClass();
This way, I can run without exception.
But I don't want to create interface.
Is there other way to solve ?
best regards
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user