Commit Graph

291 Commits (fb846f434fb91182d40c7bdf3a9a9a087232ad60)

Author SHA1 Message Date
Phillip Webb 68aec8b6ee Polish 6 years ago
Andy Wilkinson 86380ab8db Add missing package-info.java files 6 years ago
Johnny Lim d8e5169f5f Polish
Closes gh-16948
6 years ago
Andy Wilkinson 23f803c6b6 Upgrade to Hamcrest 2.1, switch to hamcrest artifact from -core and -library
Closes gh-15555
6 years ago
dreis2211 27ca7e17d9 Fix deprecated StandardAnnotationMetadata usages
Closes gh-16930
6 years ago
Phillip Webb ed998ef0d3 Update copyright header of changed files 6 years ago
Andy Wilkinson 552345fcd1 Disable more @Bean method proxying
Previously, due to a quirk in Spring Framework, it was necessary to use bean method
proxying in @Configuration classes that define one or more FactoryBeans. This quirk has
now been addressed so this commit disables bean method proxying where it is now no longer
needed.

Closes gh-16533
6 years ago
Andy Wilkinson ca51609cdf Align mock with Selenium HtmlUnit's new behaviour
See gh-16801
6 years ago
Madhura Bhave 1db1c8b03c Validate our own tests work with JUnit5 and the vintage engine
Closes gh-14737

Co-authored-by: Stephane Nicoll <snicoll@pivotal.io>
6 years ago
Madhura Bhave d15347d4e5 Add Junit5 OutputCapture Extension
Closes gh-14738
6 years ago
Stephane Nicoll c91578bbae Define surefire test provider to use
The `spring-boot-test` module has a dependency to TestNG to validate
some part of the test infrastructure but no tests are actually written
using TestNG. The presence of TestNG is a trigger for the maven surefire
plugin and it attempts to run tests using it.

This commit defines the explicit provider to use (JUnit 4)

Closes gh-16735
6 years ago
Phillip Webb 32040e355b Merge branch '2.1.x'
Closes gh-16649
6 years ago
Phillip Webb d4151e0b51 Polish "Use Jackson configuration with JsonPath"
Polish contribution to use a factory method in `AbstractJsonMarshalTester`
rather than additional constructor arguments.

Also change the `JsonContent` tests so that the `Configuration` constructor
is package private. This keeps JsonPath classes out of our public API, at
the expense of limiting custom JsonPath configurations to just our code.

See gh-16629
6 years ago
Phillip Webb 17aaf26590 Use consistent javadoc style for annotation links
Closes gh-13920
6 years ago
Phillip Webb 1e44aba772 Fix compiler warnings and polish
Fix various compiler warnings and apply a little polish.
6 years ago
Diego Berrueta 756a7f12a3 Use Jackson configuration with JsonPath
Update `JacksonTester` so that the JsonPath instance is explicitly configured
with both a `JacksonJsonProvider` and a `JacksonMappingProvider`.

Prior to this commit, the handling of special characters was not symmetrical
between the serialization (handled via the JacksonTester) and the parsing (handled
via JsonPath) due to the fact that JsonPath used `SimpleJson` as its parser.

See gh-16629
6 years ago
Phillip Webb b879972d0d Migrate to MergedAnnotations API
Migrate away from `AnnotationUtils` and `AnnotatedElementUtils`
when possible to the new `MergedAnnotations` API.

Closes gh-16551
6 years ago
Phillip Webb 5f1bbf8c72 Update copyright header of changed files 6 years ago
Phillip Webb 7d4118a0fe Align withBean methods with ApplicationContext
Rework `AbstractApplicationContextRunner.withBean` methods to
align signatures as much as possible with those provided by
the `ApplicationContext`.

Also update the implementation to use a dedicate member
variable rather than adding initializers.

Closes gh-16011
6 years ago
Phillip Webb 2dfd916c96 Polish 6 years ago
Stephane Nicoll a780875390 Allow `ApplicationContextRunner` to accept simple bean definitions
This commit adds `withBean` methods to the `ApplicationContextRunner`
abstraction so that simple beans can be registered inline. This is a
nice alternative for cases where a inner configuration class has to be
defined for the purpose of creating a simple bean.

Closes gh-16011
6 years ago
Stephane Nicoll c432288ed1 Migrate ApplicationContext to common hierarchy
This commit migrates `AnnotationConfigReactiveWebApplicationContext`
parent to the `GenericApplicationContext` abstraction. Any use of
`AnnotationConfigWebApplicationContext` is also removed as it also
inherits from the `AbstractRefreshableApplicationContext` outdated
hierarchy.

A new `AnnotationConfigServletWebApplicationContext` context is
introduced instead, extending from `GenericApplicationContext` and
providing the counter part of the reactive context for the Servlet-based
web app tests.

See gh-16096
6 years ago
Phillip Webb ad7eebee9e Merge branch '2.1.x' 6 years ago
Phillip Webb f12ab1ff90 Update copyright header of changed files 6 years ago
Phillip Webb 2376f973f4 Merge branch '2.1.x' 6 years ago
Phillip Webb 47c6bf741d Merge branch '2.0.x' into 2.1.x 6 years ago
Phillip Webb 07c000c5b7 Merge branch '1.5.x' into 2.0.x 6 years ago
Madhura Bhave 8daa8c48fb Merge branch '2.1.x' 6 years ago
Madhura Bhave c592e71449 Override missing methods in FilteredClassLoader
Closes gh-16404
6 years ago
Andy Wilkinson 878a635bfb Merge branch '2.1.x' 6 years ago
Andy Wilkinson 5a3474c7a8 Polish "Use HTTPS for external links wherever possible"
See gh-16320
6 years ago
Andy Wilkinson 864942ad4f Merge branch '2.0.x' into 2.1.x 6 years ago
Spring Operator 1a4c6f2dac Use HTTPS for external links wherever possible
See gh-16319
6 years ago
Andy Wilkinson ba4671f0ab Merge branch '1.5.x' into 2.0.x 6 years ago
Andy Wilkinson 4900505425 Merge branch '2.0.x' into 2.1.x 6 years ago
Andy Wilkinson fedb40a2bf Merge branch '1.5.x' into 2.0.x 6 years ago
Madhura Bhave 95d10388dd Merge branch '2.1.x' 6 years ago
Madhura Bhave 0c2e71cd08 Prevent early initialization of factory beans in text context customizers
Until Spring Framework 5.1.15, a FactoryBean with a non-default constructor
defined via component scanning would cause an error. This behavior has changed
as of https://github.com/spring-projects/spring-framework/issues/22409.
Regardless of this change we want to ensure that we avoid triggering eager
initialisation. `SimpleFactoryBean` has been written this way so that the tests
fail if early initialization is triggered regardless of the Spring Framework version.

Fixes gh-15898
6 years ago
Andy Wilkinson 36c1c051b8 Merge branch '2.1.x' 6 years ago
Andy Wilkinson e23f72c8b0 Merge branch '2.0.x' into 2.1.x 6 years ago
Andy Wilkinson 9fbd38ab3c Merge branch '1.5.x' into 2.0.x 6 years ago
Spring Operator 00ab30362c Use HTTPS for external links in XML files
See gh-16270
6 years ago
Andy Wilkinson b828b398b5 Merge branch '2.1.x' 6 years ago
Andy Wilkinson a36aa67b52 Merge branch '2.0.x' into 2.1.x 6 years ago
Spring Operator 3e2b6ac8ed Update build and setup configuration to use HTTPS
See gh-16246
6 years ago
Madhura Bhave 0611eb49c8 Merge branch '2.1.x' 6 years ago
Madhura Bhave 7ea8770524 Polish "Fix request factory used with withBasicAuth"
Fixes gh-15982
6 years ago
Dmytro Nosan 756bd890eb Fix request factory used with TestRestTemplate withBasicAuth
This commit updates the behavior of withBasicAuth on TestRestTemplate
by trying to use the same request factory type as the underlying restTemplate.
If creation of a new instance of the configured request factory class fails,
it falls back to the `ClientHttpRequestFactorySupplier`.

See gh-15982
6 years ago
Madhura Bhave 1893eeef4f Merge branch '2.1.x' 6 years ago
Dmytro Nosan 2f3e5d65be Test server port shouldn't affect management port when random
Closes gh-16108
6 years ago
Madhura Bhave 2cdc93cf19 Make TestRestTemplate withBasicAuth fault tolerant
It's part of TestRestTemplate's contract that it's fault tolerant. This
commit aligns the behavior of `withBasicAuth` with that expectation.

Closes gh-15780
6 years ago
Andy Wilkinson 68bfb020aa Reduce need for bean method proxying and disable where not needed
Closes gh-9068
6 years ago
Phillip Webb dd3e8154d9 Merge branch '2.1.x' 6 years ago
Phillip Webb fc3aa43cc2 Update copyright year for changed files 6 years ago
Andy Wilkinson aa2008bc5a Merge branch '2.1.x' 6 years ago
Andy Wilkinson 8c3cec8f13 Merge branch '2.0.x' into 2.1.x 6 years ago
Andy Wilkinson 361437f4e2 Merge branch '1.5.x' into 2.0.x 6 years ago
Stephane Nicoll b34b217d1e Upgrade to Kotlin 1.3.21
Closes gh-16195
6 years ago
Andy Wilkinson d6a869fa98 Switch to Jakarta EE API dependencies where possible
Closes gh-16113
Closes gh-16112
Closes gh-16111
Closes gh-15916
Closes gh-15689
6 years ago
Andy Wilkinson f2e3e274a8 Merge branch '2.1.x' 6 years ago
Andy Wilkinson 53326695ea Polish 6 years ago
Stephane Nicoll 4992b7fb29 Polish "Migrate Kotlin tests to Mockk"
Closes gh-15993
6 years ago
Sebastien Deleuze cca79b8d4d Migrate Kotlin tests to Mockk
See gh-15993
6 years ago
Stephane Nicoll 7413584b00 Polish "Support expressing application `args` in `@SpringBootTest`"
Closes gh-14823
6 years ago
Justin Griffin 422e6b7d41 Support expressing application `args` in `@SpringBootTest`
Add `args` property to the `@SpringBootTest` annotation so tests
can easily supply application arguments to pass to their app under test.

See gh-14823
6 years ago
Andy Wilkinson c04eba7ebc Polish "Add TestNG support in TestTypeExcludeFilter"
See gh-7630
6 years ago
Eddú Meléndez b005008cac Add TestNG support in TestTypeExcludeFilter
See gh-7630
6 years ago
Andy Wilkinson 89bf486d0c Merge branch '2.1.x' 6 years ago
Andy Wilkinson 1f67707509 Fix cast in TestRestTemplateContextCustomizer
Closes gh-15843
6 years ago
Andy Wilkinson 45cc649c7d Merge branch '2.1.x' 6 years ago
Andy Wilkinson 82bc87560c Use AssertJ’s exception assertions rather than fail
Closes gh-15761
6 years ago
Andy Wilkinson 2cb147af7c Merge branch '2.1.x' 6 years ago
Andy Wilkinson e15e140f8c Polish "Fix typos in JsonContentAssert failure messages"
See gh-15752
6 years ago
Johnny Lim 3744082996 Fix typos in JsonContentAssert failure messages
Closes gh-15752
6 years ago
Stephane Nicoll 32b14f3098 Merge branch '2.1.x' 6 years ago
Stephane Nicoll f0a20b1821 Polish contribution
Closes gh-15733
6 years ago
NAIT BELKACEM 6a0053c8bc Fix typo
See gh-15733
6 years ago
Stephane Nicoll 33f2bd4d61 Merge branch '2.1.x' 6 years ago
Stephane Nicoll 485bdc9901 Polish "Remove redundant interface modifiers"
Closes gh-15694
6 years ago
igor-suhorukov 2d873c78fe Remove redundant interface modifiers
See gh-15694
6 years ago
Stephane Nicoll 6baa6b291e Polish contribution
Closes gh-15695
6 years ago
Johnny Lim af3ed9ff9f Polish
See gh-15695
6 years ago
Stephane Nicoll 1e98c78ab9 Fix typo 6 years ago
Camille Vienot ff8edf8d98 Use assertJ to generate AssertionError and filter its stacktrace
Closes gh-15569
6 years ago
Andy Wilkinson 064f6478df Move back to JUnit 4 until SUREFIRE-1614 has been resolved
See gh-14736
See gh-14737
See gh-14738
6 years ago
Stephane Nicoll dfd477aa74 Merge branch '2.1.x' 6 years ago
Stephane Nicoll 38e4d330b0 Merge branch '2.0.x' into 2.1.x 6 years ago
dreis2211 0f92b139f3 Remove Mockito 1 leftover
Closes gh-15422
6 years ago
Madhura Bhave e367b54928 Merge branch '2.1.x' 6 years ago
Madhura Bhave 31a5e85ab6 Perform placeholder resolution in test env post processor
Fixes gh-15354
6 years ago
Andy Wilkinson bbf0932f0f Exclude jcl-over-slf4j in favour of spring-jcl
Closes gh-15392
6 years ago
Stephane Nicoll d5f90ffcfb Polish "Replace this lambda with a method reference"
Closes gh-15401
6 years ago
igor-suhorukov 5c1813aef8 Replace this lambda with a method reference
See gh-15401
6 years ago
Madhura Bhave 5a18df2d69 Fix tests 6 years ago
Madhura Bhave 59d2b0a3fb Upgrade tests to Junit5
See gh-14737
6 years ago
Madhura Bhave 12e1d9a6a4 Add Junit5 OutputCapture Extension
See gh-14738
6 years ago
Johnny Lim fd5aa3ebf1 Polish
See gh-15134
6 years ago
Phillip Webb f3fa20b2d1 Polish 6 years ago
Phillip Webb 683484e4a8 Fix primary beans with ApplicationContextAssert
Update `ApplicationContextAssert.getBean` so that multiple beans are
supported as long as one of them is primary. This aligns better with
the way that the standard `ApplicationContext.getBean` method works.

Closes gh-14874
6 years ago
dreis2211 8b14754cda Remove usages of BasicAuthorizationInterceptor
See gh-14830
6 years ago