Results 1 to 2 of 2

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

  1. #1
    Join Date
    May 2012
    Posts
    5

    Question 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. #2
    Join Date
    May 2012
    Posts
    5

    Default

    Looks like this has already been recognized as a gap:

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •