Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERXLocalizer is not initialized properly #25

Open
hprange opened this issue Dec 19, 2011 · 2 comments
Open

ERXLocalizer is not initialized properly #25

hprange opened this issue Dec 19, 2011 · 2 comments
Labels

Comments

@hprange
Copy link
Owner

hprange commented Dec 19, 2011

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.

@jlafourc
Copy link

Hi.

We face the same problems in our unit tests. Any solutions ?

@hprange
Copy link
Owner Author

hprange commented Jan 11, 2013

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants