1. 18 8月, 2014 6 次提交
  2. 16 8月, 2014 3 次提交
  3. 15 8月, 2014 11 次提交
    • S
      Include Groovy source code in published sources jars · 042cfeed
      Sam Brannen 提交于
      In our Gradle build script, we are now assembling 'sources' jars from
      'sourceSets.main.allSource' in order to include Java, Groovy, and
      AspectJ source code as well all other appropriate classpath resources.
      
      Issue: SPR-12086
      042cfeed
    • S
      Include all source artifacts in published sources jars · 9ea646e5
      Sam Brannen 提交于
      This commit updates the Gradle build to ensure that the following are
      including in published 'sources' jars.
      
       - Java source code (previously supported)
       - AspectJ source code (previously supported)
       - META-INF/spring.factories
       - META-INF/services/*
       - Java Properties files
       - XML files
       - MIME types files (mime.types)
      
      Issue: SPR-12085
      9ea646e5
    • S
      a91ab348
    • S
      Polishing · 8b86519b
      Sam Brannen 提交于
      8b86519b
    • S
      Support merging custom TELs with default TELs · 66250b1f
      Sam Brannen 提交于
      Prior to this commit, if a custom TestExecutionListener was registered
      via @TestExecutionListeners the defaults would not be registered. Thus,
      if a user wanted to declare a custom listener and use the default
      listeners, the user was forced to manually declare all default
      listeners in addition to any custom listeners. This unfortunately
      required that the user know exactly which listeners were registered by
      default. Moreover, the set of default listeners can change from release
      to release, and with the support for automatic discovery of default
      listeners introduced in SPR-11466 it is no longer even possible to know
      what the set of default TestExecutionListeners is before runtime.
      
      This commit addresses this issue by introducing a mechanism for merging
      custom declared listeners with the defaults for the current
      environment. Specifically, @TestExecutionListeners supports a new
      MergeMode that is used to control whether or not explicitly declared
      listeners are merged with the default listeners when
      @TestExecutionListeners is declared on a class that does not inherit
      listeners from a superclass.
      
      Issue: SPR-8854
      66250b1f
    • J
      Polishing · b3add794
      Juergen Hoeller 提交于
      b3add794
    • J
      Fixed fragile tests for @Bean method overloading · d2e269e6
      Juergen Hoeller 提交于
      d2e269e6
    • J
      Polishing · 69587f3f
      Juergen Hoeller 提交于
      69587f3f
    • J
      Lookup methods can support arguments, find a target bean based on the return... · eb0ab843
      Juergen Hoeller 提交于
      Lookup methods can support arguments, find a target bean based on the return type, and be identified by an @Lookup annotation
      
      Issue: SPR-7431
      Issue: SPR-5192
      eb0ab843
    • S
      Merge from sbrannen/SPR-11466 · e753f231
      Sam Brannen 提交于
      * SPR-11466:
        Support automatic discovery of default TELs
      e753f231
    • S
      Support automatic discovery of default TELs · e6d16148
      Sam Brannen 提交于
      Prior to this commit, there was no declarative mechanism for a custom
      TestExecutionListener to be registered as a default
      TestExecutionListener.
      
      This commit introduces support for discovering default
      TestExecutionListener implementations via the SpringFactoriesLoader
      mechanism. Specifically, the spring-test module declares all core
      default TestExecutionListeners under the
      org.springframework.test.context.TestExecutionListener key in its
      META-INF/spring.factories properties file, and third-party frameworks
      and developers can contribute to the list of default
      TestExecutionListeners in the same manner.
      
       - AbstractTestContextBootstrapper uses the SpringFactoriesLoader to
         look up the class names of all registered default
         TestExecutionListeners and sorts the instantiated listeners using
         AnnotationAwareOrderComparator.
      
       - DefaultTestContextBootstrapper and WebTestContextBootstrapper now
         rely on the SpringFactoriesLoader mechanism for finding default
         TestExecutionListeners instead of hard coding fully qualified class
         names.
      
       - To ensure that default TestExecutionListeners are registered in the
         correct order, each can implement Ordered or declare @order.
      
       - AbstractTestExecutionListener and all default TestExecutionListeners
         provided by Spring now implement Ordered with appropriate values.
      
       - Introduced "copy constructors" in MergedContextConfiguration and
         WebMergedContextConfiguration
      
       - SpringFactoriesLoader now uses AnnotationAwareOrderComparator
         instead of OrderComparator.
      
      Issue: SPR-11466
      e6d16148
  4. 14 8月, 2014 8 次提交
    • P
      Add tests for ImportSelector meta-data · e142fd11
      Phillip Webb 提交于
      Issue: SPR-12059
      e142fd11
    • S
      ebc726a9
    • S
      Improve ex msg when locations & classes are declared in test hierarchy · 181299cc
      Sam Brannen 提交于
      Prior to this commit, if both locations and classes were declared via
      @ContextConfiguration at differing levels in a test class hierarchy,
      the exception message stated that neither of the default context
      loaders was able to load an ApplicationContext from the merged context
      configuration, but the message didn't explain why.
      
      This commit adds an explicit check for such scenarios and provides a
      more informative exception message similar to the following:
      
      "Neither X nor Y supports loading an ApplicationContext from
      [MergedContextConfiguration ...]: declare either 'locations' or
      'classes' but not both."
      
      Issue: SPR-12060
      181299cc
    • S
      Delete trailing white space in spring-test · f4c23d87
      Sam Brannen 提交于
      f4c23d87
    • S
      2cbd5ba9
    • S
      3e213885
    • S
      Merge from sbrannen/SPR-12051 · f2ac0256
      Sam Brannen 提交于
      * SPR-12051:
        Introduce @TestPropertySource support in the TCF
      f2ac0256
    • S
      Introduce @TestPropertySource support in the TCF · 2cf4147b
      Sam Brannen 提交于
      Spring Framework 3.1 introduced an Environment abstraction with support
      for hierarchical PropertySources that can be configured
      programmatically as well as declaratively via the @PropertySource
      annotation. However, prior to this commit, there was no way to
      declaratively configure PropertySources in integration tests in the
      Spring TestContext Framework (TCF).
      
      This commit introduces declarative support for PropertySources in the
      TCF via a new class-level @TestPropertySource annotation. This
      annotation provides two options for declaring test property sources:
      
       - The 'locations' attribute allows developers to declare external
         resource locations for test properties files.
      
       - The 'properties' attribute allows developers to declare inlined
         properties in the form of key-value pairs.
      
      Test properties files are added to the Environment before all other
      property sources and can therefore override system and application
      property sources. Similarly, inlined properties are added to the
      Environment before all other property sources and can therefore
      override system property sources, application property sources, and
      test properties files.
      
      Specifically, this commit introduces the following major changes:
      
       - Introduced @TestPropertySource annotation along with internal
         TestPropertySourceAttributes, MergedTestPropertySources, and
         TestPropertySourceUtils for working with test property sources
         within the TCF.
      
       - All TestContextBootstrappers have been modified to support the
         merged property resource locations and inlined properties from
         @TestPropertySource.
      
       - MergedContextConfiguration (and consequently the context caching
         key) is now additionally based on the merged property resource
         locations and inlined properties from @TestPropertySource. The same
         applies to WebMergedContextConfiguration.
      
       - AbstractContextLoader's prepareContext() method now adds
         PropertySources for all resource locations and inlined properties
         from the supplied MergedContextConfiguration to the Environment of
         the supplied ApplicationContext. All subclasses of
         AbstractGenericContextLoader and AbstractGenericWebContextLoader
         therefore automatically provide support for @TestPropertySource.
      
      Issue: SPR-12051
      2cf4147b
  5. 13 8月, 2014 6 次提交
  6. 12 8月, 2014 6 次提交