May 29th, 2012, 12:50 PM
Support for adding/using additional PropertySources when running unit tests?
Based on this blog entry:
There are two different ways of adding an additional PropertySource:
- Programatically - Before loading your context, you can get the environment and add an additional PropertySource to it.
- Using an Initializer - This option seems to be web application specific
If I built my application using either of these approaches, how could I set up/initialize my context for running Unit tests? I saw that there is an annotation that lets you specify the active profile, but I didn't see any hooks that you allow you to add an additional property source.
May 31st, 2012, 12:20 PM
Looks like this has already been recognized as a gap: