caelum/vraptor — pull request #595 by nykolaslima (2014-01-22 21:50:49+00:00)
Title: MockLocalization with Bundle

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 can still use like it was before, with an `EmptyBundle`:
`Localization = new MockLocalization();`