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

MockLocalization with Bundle #595

Merged
merged 2 commits into from
Jan 23, 2014

Conversation

nykolaslima
Copy link
Contributor

I am writing tests for a component that depend on VRaptor's Localization

I had to mock each bundle key return by hand. Then I saw MockLocalization but it always use an EmptyBundle.
I did some refactoring in MockLocalization to receive a ResourceBundle when needed.

This way, we can use it like this:
Localization l = new MockLocalization(ResourceBundle.getBundle("messages"));
and we are able to use like it was before, with an EmptyBundle:
Localization = new MockLocalization();

lucascs added a commit that referenced this pull request Jan 23, 2014
@lucascs lucascs merged commit 6a4f5e9 into caelum:master Jan 23, 2014
@lucascs
Copy link
Member

lucascs commented Jan 23, 2014

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants