1. 20 8月, 2019 1 次提交
  2. 17 8月, 2019 4 次提交
    • S
      Introduce @EnabledForTestGroups in Spring's test suite · 288461a5
      Sam Brannen 提交于
      Closes gh-23476
      288461a5
    • S
      Remove JUnit 4 dependency from all modules except spring-test · 979508a7
      Sam Brannen 提交于
      This commit removes the JUnit 4 dependency from all modules except
      spring-test which provides explicit JUnit 4 support.
      
      This commit also includes the following.
      
      - migration from JUnit 4 assertions to JUnit Jupiter assertions in all
        Kotlin tests
      - migration from JUnit 4 assumptions in Spring's TestGroup support to
        JUnit Jupiter assumptions, based on org.opentest4j.TestAbortedException
      - introduction of a new TestGroups utility class than can be used from
        existing JUnit 4 tests in the spring-test module in order to perform
        assumptions using JUnit 4's Assume class
      
      See gh-23451
      979508a7
    • S
      Migrate parameterized tests in spring-core · 3df85c78
      Sam Brannen 提交于
      This commit migrates parameterized tests in spring-core using the
      "composed @ParameterizedTest" approach. This approach is reused in
      follow-up commits for the migration of the remaining modules.
      
      For a concrete example, see AbstractDataBufferAllocatingTests and its
      subclasses (e.g., DataBufferTests).
      
      Specifically, AbstractDataBufferAllocatingTests declares a custom
      @ParameterizedDataBufferAllocatingTest annotation that is
      meta-annotated with @ParameterizedTest and
      @MethodSource("org.springframework.core.io.buffer.AbstractDataBufferAllocatingTests#dataBufferFactories()").
      
      Individual methods in concrete subclasses are then annotated with
      @ParameterizedDataBufferAllocatingTest instead of @ParameterizedTest or
      @test.
      
      The approach makes the migration from JUnit 4 to JUnit Jupiter rather
      straightforward; however, there is one major downside. The arguments
      for a @ParameterizedTest test method can only be accessed by the test
      method itself. It is not possible to access them in an @BeforeEach
      method (see https://github.com/junit-team/junit5/issues/944).
      Consequently, we are forced to declare the parameters in each such
      method and delegate to a custom "setup" method. Although this is a bit
      cumbersome, I feel it is currently the best way to achieve fine grained
      parameterized tests within our test suite without implementing a custom
      TestTemplateInvocationContextProvider for each specific use case.
      
      Once https://github.com/junit-team/junit5/issues/878 is resolved, we
      should consider migrating to parameterized test classes.
      
      See gh-23451
      3df85c78
    • S
      Migrate test suite from JUnit 4 to JUnit Jupiter · 32cc32f9
      Sam Brannen 提交于
      This first commit for this issue:
      
      - allows JUnit Jupiter to be used for all tests
      - adds a dependency on mockito-junit-jupiter
      - migrates tests in spring-core to JUnit Jupiter, except parameterized
        tests
      
      The following script was developed in order to semi-automate the
      migration process.
      
      https://github.com/sbrannen/junit-converters/blob/master/junit4ToJUnitJupiter.zsh
      
      See gh-23451
      32cc32f9
  3. 12 8月, 2019 1 次提交
  4. 07 8月, 2019 3 次提交
  5. 01 8月, 2019 3 次提交
    • P
      Deprecate mutable methods of MethodParameter · 62a3e414
      Phillip Webb 提交于
      Deprecate all mutation methods in `MethodParameter` in favor of factory
      methods that return a new instance. Existing code that previously relied
      on mutation has been updated to use the replacement methods.
      
      Closes gh-23385
      62a3e414
    • S
      Fix bug in TYPE_HIERARCHY_AND_ENCLOSING_CLASSES strategy · de3c1156
      Sam Brannen 提交于
      Prior to this commit, the new `TYPE_HIERARCHY_AND_ENCLOSING_CLASSES`
      annotation search strategy failed to find annotations on enclosing
      classes if the source class was a nested class that itself had no
      annotations present.
      
      This commit fixes this by adding special logic to AnnotationsScanner's
      isWithoutHierarchy() method to properly support nested classes.
      
      Closes gh-23378
      de3c1156
    • S
      Remove duplicate assertion · b03dd475
      Sam Brannen 提交于
      b03dd475
  6. 31 7月, 2019 2 次提交
  7. 30 7月, 2019 2 次提交
  8. 24 7月, 2019 2 次提交
  9. 20 7月, 2019 3 次提交
  10. 19 7月, 2019 2 次提交
  11. 10 7月, 2019 1 次提交
    • A
      Removed DataBufferUtils::split · 09572e7b
      Arjen Poutsma 提交于
      DataBuffers::split (and underlying algorithm) should not be returning
      a Flux<DataBuffer>, but rather a Flux<Flux<DataBuffer>>. In other words,
      it should not join all data buffers that come before a delimiter.
      
      Providing an implementation of a such a fully reactive split method
      proved to be beyond the scope of this release, so this commit removes
      the method altogether.
      09572e7b
  12. 05 7月, 2019 1 次提交
  13. 25 6月, 2019 2 次提交
  14. 24 6月, 2019 1 次提交
  15. 14 6月, 2019 1 次提交
  16. 12 6月, 2019 1 次提交
  17. 30 5月, 2019 1 次提交
  18. 28 5月, 2019 1 次提交
    • S
      Introduce support for sorted Properties · c39c4211
      Sam Brannen 提交于
      This commit introduces an internal SortedProperties class that is a
      specialization of java.util.Properties which sorts properties
      alphanumerically based on their keys.
      
      This can be useful when storing a java.util.Properties instance in a
      properties file, since it allows such files to be generated in a
      repeatable manner with consistent ordering of properties.
      
      Comments in generated properties files can also be optionally omitted.
      
      An instance of SortedProperties can be created via two new
      createSortedProperties() factory methods in
      org.springframework.core.CollectionFactory.
      
      Closes gh-23018
      c39c4211
  19. 27 5月, 2019 1 次提交
    • P
      Use less confusing MergedAnnotation method names · e386e53f
      Phillip Webb 提交于
      Rename some `MergedAnnotation` methods to prevent using parent/child
      terminology, specifically:
      
      	`getDepth()` has been renamed `getDistance()`
      	`getParent()` has been renamed `getMetaSource()`
      	`getTypeHierarchy()` has been renamed `getMetaTypes()`
      
      The parent child naming was particularly confusing given that the
      parent/child relationships were inverted from the way that a lot of
      users think about meta-annotations. For example, a `@RequestMapping`
      having a parent of `@GetMapping` feels odd given that `@GetMapping`
      is the thing declaring the meta-annotation relationship.
      
      The new method names are designed to align more closely with existing
      terms. For example, `getMetaSource` hints at the relationship with
      `isMetaAnnotated` and `getSource`.
      
      Closes gh-22946
      e386e53f
  20. 24 5月, 2019 2 次提交
  21. 21 5月, 2019 2 次提交
  22. 15 5月, 2019 1 次提交
    • A
      Make StringDecoder use DataBufferUtils.split · a30a134c
      Arjen Poutsma 提交于
      * Added DataBufferUtils.split variant that takes multiple delimiters
        as argument (instead of 1).
      * Use this new split() variant from within StringDecoder, replacing
        its inefficient algorithm with the Knuth-Morris-Pratt algorithm.
      a30a134c
  23. 13 5月, 2019 1 次提交
  24. 12 5月, 2019 1 次提交