1. 24 Mar, 2016 17 commits
    • Phillip Webb's avatar
      Support HtmlUnit and Selenium localhost resolution · cbea16ec
      Phillip Webb authored
      Provide variants of `WebClient` and `WebConnectionHtmlUnitDriver` that
      automatically resolve relative URLs to "localhost:${local.server.port}".
      
      Fixes gh-5472
      cbea16ec
    • Phillip Webb's avatar
      Add utilities to help with JSON testing · 24ab2bd8
      Phillip Webb authored
      Add Jackson, Gson and Basic String helper classes that allow AssertJ
      assertions to be used to test JSON.
      
      Fixes gh-5471
      24ab2bd8
    • Phillip Webb's avatar
      Add @MockBean support · 45c4f5f3
      Phillip Webb authored
      Add a `@MockBean` annotation which can be used to setup and inject mocks
      into an application context. The annotation can be used on test classes,
      test fields, configuration classes or configuration fields. When used on
      a field the annotation also acts as an injection point.
      
      Fixes gh-5042
      45c4f5f3
    • Phillip Webb's avatar
      Drop superfluous annotations · 0829a1bd
      Phillip Webb authored
      Update internal tests to drop annotations that can now
      be inferred.
      
      Fixes gh-5470
      0829a1bd
    • Phillip Webb's avatar
      Unify use of @BootStrapWith · 7dffb702
      Phillip Webb authored
      Update @IntegrationTest to use @BootstrapWith rather than an explicitly
      defined set of test execution listeners.
      
      Also introduce a new @SpringApplicationTest annotation that is similar
      to  @SpringApplicationConfiguration but a bootstrapper.
      
      Fixes gh-5230
      7dffb702
    • Phillip Webb's avatar
      Automatically find test configurations · 90950cfb
      Phillip Webb authored
      Allow detection of `@SpringBootConfiguration` classes for both standard
      spring tests and bootstrap (@IntegrationTest @WebIntegrationTest) based
      tests.
      
      Closes gh-5295
      90950cfb
    • Phillip Webb's avatar
      Auto-exclude test components from scanning · 600a06af
      Phillip Webb authored
      Add TestTypeExcludeFilter which will automatically attempt to exclude
      test only configurations. All `@Configuration` annotated inner-classes
      of tests are automatically excluded. The `@TestConfiguration` annotation
      can be used to explicitly if a configuration needs explicit exclusion.
      
      See gh-5295
      See gh-4901
      600a06af
    • Phillip Webb's avatar
      Add TestExcludeFilter for component scanning · 513dec71
      Phillip Webb authored
      Add a new TypeFilter specifically for excluding candidate components.
      The filter is applied to `@SpringBootApplication` and allows tests to
      dynamically contribute exclude filters so that specific classes of
      component can be excluded.
      
      See gh-5295
      See gh-4901
      513dec71
    • Phillip Webb's avatar
      Introduce @SpringBootConfiguration annotation · 965dd33e
      Phillip Webb authored
      Add a new @SpringBootConfiguration annotation that can be used to
      indicate the primary application configuration. The new annotation is
      primarily indented to allow test automatically code to find the main
      configuration class.
      
      See gh-5295
      965dd33e
    • Phillip Webb's avatar
      Fix SpringApplicationContextLoader customizers · 40c2e24a
      Phillip Webb authored
      Update SpringApplicationContextLoader to call ContextCustomizers in the
      same way as other classes in `spring-test`.
      
      Fixes gh-5294
      40c2e24a
    • Phillip Webb's avatar
      Migrate SpringJUnit4ClassRunner to SpringRunner · c28f5528
      Phillip Webb authored
      Replace all existing SpringJUnit4ClassRunner references with the new
      SpringRunner alias.
      
      Fixes gh-5292
      c28f5528
    • Phillip Webb's avatar
      Migrate existing tests from deprecated package · 2f815a90
      Phillip Webb authored
      Update the existing tests to use the relocated `spring-boot-test`
      classes. Restructuring was achieved using the following command:
      
      find . -type f -name '*.java' -exec sed -i '' \
      -e s/org.springframework.boot.test.ConfigFileApplicationContextInitializer/\
      org.springframework.boot.test.context.ConfigFileApplicationContextInitializer/g \
      -e s/org.springframework.boot.test.EnvironmentTestUtils/\
      org.springframework.boot.test.util.EnvironmentTestUtils/g \
      -e s/org.springframework.boot.test.IntegrationTest/\
      org.springframework.boot.test.context.IntegrationTest/g \
      -e s/org.springframework.boot.test.IntegrationTestPropertiesListener/\
      org.springframework.boot.test.context.IntegrationTestPropertiesListener/g \
      -e s/org.springframework.boot.test.OutputCapture/\
      org.springframework.boot.test.rule.OutputCapture/g \
      -e s/org.springframework.boot.test.SpringApplicationConfiguration/\
      org.springframework.boot.test.context.SpringApplicationConfiguration/g \
      -e s/org.springframework.boot.test.SpringApplicationContextLoader/\
      org.springframework.boot.test.context.SpringApplicationContextLoader/g \
      -e s/org.springframework.boot.test.SpringBootMockServletContext/\
      org.springframework.boot.test.mock.web.SpringBootMockServletContext/g \
      -e s/org.springframework.boot.test.TestRestTemplate/\
      org.springframework.boot.test.web.client.TestRestTemplate/g \
      -e s/org.springframework.boot.test.WebIntegrationTest/\
      org.springframework.boot.test.context.web.WebIntegrationTest/g {} \;
      
      See gh-5293
      2f815a90
    • Phillip Webb's avatar
      Restructure spring-boot-test packages · aef7f4bc
      Phillip Webb authored
      Create a new package structure for `spring-boot-test` and deprecate
      existing classes.
      
      Fixes gh-5293
      aef7f4bc
    • Phillip Webb's avatar
      Add JSONassert and JsonPath to the test starter · da1e4970
      Phillip Webb authored
      Update spring-boot-starter-test to include JSONassert and JsonPath.
      Both are generally useful libraries when writing MVC tests.
      
      Fixes gh-5469
      da1e4970
    • Phillip Webb's avatar
      Set "proxy target class" for transaction managers · 47fb614b
      Phillip Webb authored
      Update `@EnableTransactionManagement` so that `proxyTargetClass` is
      set to true. This ensures that @Transactional beans that aren't
      interface based can still be proxied.
      
      Fixes gh-5423
      47fb614b
    • Phillip Webb's avatar
      Call afterProperties set in LogFileMvcEndpoint · 4352707e
      Phillip Webb authored
      Call afterPropertiesSet on the delegate `ResourceHttpRequestHandler`
      to prevent an NPE. This change is required following SPR-13834.
      4352707e
    • Phillip Webb's avatar
      Polish · 1b6c2a3e
      Phillip Webb authored
      1b6c2a3e
  2. 23 Mar, 2016 2 commits
  3. 22 Mar, 2016 4 commits
  4. 21 Mar, 2016 7 commits
  5. 18 Mar, 2016 10 commits