Using GWT i18n support without having to start the module?

6 views
Skip to first unread message

dominik_steiner

unread,
Nov 6, 2006, 8:40:13 AM11/6/06
to Google Web Toolkit
Hi there,

is there a way to use GWTs i18n support (eg my Constants defnitions) in
a JUnit Test Case? (not a GWTTestCase)

What I have is a Selenium Test Case in which I would love to be able to
access my Constant classes, in order to make the test more stable.

I fear that this is not possible, because you have to use GWT.create()
in order to be able to access the i18n classes... or is there a
workaround for that situation?

Thanks for any help.

Dominik

Emily

unread,
Nov 6, 2006, 10:27:25 AM11/6/06
to Google Web Toolkit
If you know what languages you want to test with, you can run the GWT
compiler with the -gen <path> directive. Looking in <path>, include
the generated Constant java sources in your unit tests. So your unit
test would have code of the form
"MyConstant ref = new MyConstant_()"

Hope that helps!

Cheers,

Emily

dominik_steiner

unread,
Nov 7, 2006, 2:23:47 AM11/7/06
to Google Web Toolkit
Thank you so much Emily, that's exactly what i need!!!

Dominik

Reply all
Reply to author
Forward
0 new messages