Changing Locale while executing a junit test

465 views
Skip to first unread message

Norbert

unread,
Apr 24, 2012, 4:30:18 AM4/24/12
to gwt-test-utils-users
Hi,

I've got some problem using the new (0.33.2) version.
We use unittests to detect if some i18n string is missing in the
language property file. To retrieve this information we change the
locale while executing the test.

In version 0.33.1 it is possible to do something like this:

GwtConfig.get().setLocale(new Locale("de"));

In 0.33.2 the setLocale method isn't public anymore.

What's the proper way of changing the Locale in 0.33.2 while executing
a unit test?


regards
Norbert

Gael Lazzari

unread,
Apr 24, 2012, 4:33:23 AM4/24/12
to gwt-test-u...@googlegroups.com
Hi Nobert,

You now have a GwtTest.setLocale(Locale locale) protected method to change your Locale dynamically.

Cheers,


Gaël


2012/4/24 Norbert <vie...@gmail.com>



--
Gaël Lazzari

Norbert

unread,
Apr 24, 2012, 11:03:42 AM4/24/12
to gwt-test-utils-users
Hi Gaël,

thx a lot, this works (of course) fine ;)

Norbert

On 24 Apr., 10:33, Gael Lazzari <gael.lazz...@gmail.com> wrote:
> Hi Nobert,
>
> You now have a GwtTest.setLocale(Locale locale) protected method to change
> your Locale dynamically.
>
> Cheers,
>
> Gaël
>
> 2012/4/24 Norbert <vieg...@gmail.com>

Gael Lazzari

unread,
Apr 24, 2012, 11:15:24 AM4/24/12
to gwt-test-u...@googlegroups.com
Glad to read that :-D

FYI, the GwtConfig object should not be accessed by any client code, as its javadoc says, it is designed to be used internally only ;)


Cheers,


Gaël


2012/4/24 Norbert <vie...@gmail.com>
Hi Gaël,



--
Gaël Lazzari
Reply all
Reply to author
Forward
0 new messages