Commit Graph

265 Commits (c108629311085c0a41c12ddac062d3dc552effdd)

Author SHA1 Message Date
Phillip Webb a66c4d3096 Unify method visibility of private classes
Apply checkstyle rule to ensure that private and package private
classes do not have unnecessary public methods. Test classes have
also been unified as much as possible to use default scoped
inner-classes.

Closes gh-7316
5 years ago
Phillip Webb 605599138e Merge branch '2.1.x' 5 years ago
Phillip Webb 92bff3c328 Merge branch '2.0.x' into 2.1.x 5 years ago
Phillip Webb cfeb0239b7 Merge branch '1.5.x' into 2.0.x 5 years ago
Stephane Nicoll e560b7f6ba Remove public modifier on JUnit5 lifecycle methods
See gh-17292
5 years ago
Andy Wilkinson a189e4cf96 Merge branch '2.1.x'
Closes gh-17220
6 years ago
Andy Wilkinson 645514f848 Polish "Honour base path from @WebAppConfiguration in @WebMvcTest"
See gh-16485
6 years ago
Lorenzo Dee 7340d546b8 Honour base path from @WebAppConfiguration in @WebMvcTest
See gh-16485
6 years ago
Madhura Bhave 30cfe7b4c5 Polish 6 years ago
Phillip Webb aad21d1996 Polish "Support default headers with RestTemplateBuilder"
Broaden the scope of customizer support so that instead of focusing
just on headers, we can now customize any outgoing `HttpClientRequest`.
Also update auto-configuration to automatically add any
`RestTemplateRequestCustomizer` beans to the builder.

See gh-17091
6 years ago
Ilya Lukyanovich 43b1a667ce Support default headers with RestTemplateBuilder
Update `RestTemplateBuilder` so that it is easier to apply custom
headers to the outgoing request. The update is particularly useful
for setting the `User-Agent` header, for example so that a GitHub
username can be used when calling `api.github.com`.

See gh-17091
6 years ago
Phillip Webb 266d6334b2 Fix checkstyle RedundantModifier test violations 6 years ago
Andy Wilkinson b18fffaf14 Move tests to JUnit 5 wherever possible 6 years ago
Andy Wilkinson aef92b9295 Merge branch '2.1.x'
Closes gh-17079
6 years ago
Andy Wilkinson 24925c3dae Merge branch '2.0.x' into 2.1.x
Closes gh-17078
6 years ago
Andy Wilkinson c6c139d980 Merge branch '1.5.x' into 2.0.x 6 years ago
Phillip Webb db75347eb6 Merge branch '2.1.x' 6 years ago
Phillip Webb 0ef331018e Merge branch '2.0.x' into 2.1.x 6 years ago
Phillip Webb 7fc01971ed Merge branch '1.5.x' into 2.0.x 6 years ago
Phillip Webb 76e075ddd0 Polish "Use request factory to support Basic Authentication"
Reduce the surface area of the public API by making the
`BasicAuthentication` and `BasicAuthenticationClientHttpRequestFactory`
class package private.

This commit also attempts to simplify `TestRestTemplate` by keeping
the `RestTemplateBuilder` and reusing it, rather than needing to deal
only with a `RestTemplate` instance.

See gh-17010
6 years ago
Dmytro Nosan 18a0a7a2e8 Use request factory to support Basic Authentication
Update `RestTemplateBuilder` to use a custom request factory to add
authentication headers rather than an interceptor.

Prior to this commit, the use of the `BasicAuthenticationInterceptor`
interceptor could cause `OutOfMemoryError` whenever a large file is
uploaded.

See gh-17010
6 years ago
Madhura Bhave 898a903d2f Fix typos in javadoc 6 years ago
Andy Wilkinson 0644a79401 Repackage output capture and always use extension declaratively
Closes gh-17029
6 years ago
Phillip Webb d11d5ceb29 Split up JUnit 5 OutputCapture class
Split the JUnit 5 `OutputCapture` class into separate `OutputExtension`
and `CapturedOutput` classes. The JUnit 5 callback methods are now
contained only in the `OutputExtension` class so no longer pollute the
public API that users will interact with.

The `CapturedOutput` class has also been updated to capture System.err
and System.out separately to allow distinct assertions if required.

Closes gh-17029
6 years ago
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