Announcement Announcement Module
Collapse
No announcement yet.
Support for adding/using additional PropertySources when running unit tests? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Support for adding/using additional PropertySources when running unit tests?

    Hello,

    Based on this blog entry:

    http://blog.springsource.org/2011/02...ty-management/

    There are two different ways of adding an additional PropertySource:
    1. Programatically - Before loading your context, you can get the environment and add an additional PropertySource to it.
    2. 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.

    Thanks,

    Joe

  • #2
    Looks like this has already been recognized as a gap:

    https://jira.springsource.org/browse/SPR-9011

    Comment

    Working...
    X