Open hprange opened 12 years ago
Hi.
We face the same problems in our unit tests. Any solutions ?
Currently, you can load the localization configuration in a static method annotated with @BeforeClass
:
@BeforeClass
public static void setup() {
ERXLocalizer.initialize();
ERXValidationFactory.defaultFactory().configureFactory();
}
You may also have to load the Properties file manually to define the available languages and the current language.
Anyway, you can write your assertions based on the validation keys instead of the localized validation values.
The ERXLocalizer class is unable to find the *.strings. It shouldn't load those files by default, but the WOUnit could provide a mechanism to initialize the localizer properly if required.