- 17 8月, 2019 1 次提交
-
-
由 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
-
- 07 8月, 2019 1 次提交
-
-
由 Sam Brannen 提交于
This commit avoids the use of the deprecated GenericTypeResolver.resolveParameterType() method in tests in order to avoid warnings in the Gradle build.
-
- 31 7月, 2019 1 次提交
-
-
由 Juergen Hoeller 提交于
See gh-23366
-
- 30 7月, 2019 2 次提交
-
-
由 Arjen Poutsma 提交于
Added support for status codes that do not occur in HttpStatus in DefaultClientResponseBuilder and made ClientResponse::statusCode ClientHttpResponse::getStatusCode @Nullable. Closed gh-23366
-
由 Arjen Poutsma 提交于
- Add onRawStatus to WebClient.ResponseSpec, allowing users to deal with raw status codes that are not in HttpStatus. - No longer throw an exception status codes not in HttpStatus. Closes gh-23367
-
- 28 7月, 2019 1 次提交
-
-
由 Sam Brannen 提交于
Prior to this commit, the SimpleUrlHandlerMapping classes in Spring MVC and Spring Webflux only had default constructors. This lead to the fact that users often had to explicitly invoke setUrlMap() and setOrder() on the newly instantiated SimpleUrlHandlerMapping. In order to simplify the programmatic setup of a SimpleUrlHandlerMapping in common scenarios, this commit introduces the following constructors. - SimpleUrlHandlerMapping() - SimpleUrlHandlerMapping(Map<String, ?> urlMap) - SimpleUrlHandlerMapping(Map<String, ?> urlMap, int order) Closes gh-23362
-
- 22 7月, 2019 1 次提交
-
-
由 Arjen Poutsma 提交于
Closes gh-22872
-
- 21 7月, 2019 1 次提交
-
-
由 Sam Brannen 提交于
-
- 18 7月, 2019 1 次提交
-
-
由 Arjen Poutsma 提交于
This commit copies the toEntity and toEntityList methods from ClientResponse to ResponseSpec, so that it is possible to retrieve a ResponseEntity when using retrieve(). Closes gh-22368
-
- 16 7月, 2019 1 次提交
-
-
由 Arjen Poutsma 提交于
Prior to this commit, returning an empty mono from an exception handler registered through ResponseSpec::onStatus would result in memory leaks (since the response was not read) and in an empty response from bodyTo* methods of the webclient. As of this commit, that same empty mono is now interpreted to return the body (and not an exception), offering a way to override the default status handlers and return a normal response for 4xx and 5xx status codes.
-
- 13 7月, 2019 1 次提交
-
-
由 Rossen Stoyanchev 提交于
As a follow-up to the recent commit #37f9ce, this change replaces the raised IllegalStateException with HttpMessageNotWritableException. See gh-23205
-
- 12 7月, 2019 2 次提交
-
-
由 Arjen Poutsma 提交于
This commit adds the createException() method to ClientResponse, returning a delayed WebClientResponseException based on the status code, headers, and body as well as the corresponding request. Closes gh-22825
-
由 Rob Winch 提交于
See gh-22839
-
- 11 7月, 2019 1 次提交
-
-
由 Sebastien Deleuze 提交于
This commit adds an engineSupplier property to ScriptTemplateConfigurer and ScriptTemplateView in order to be able to customize the ScriptEngine when sharedEngine is set to false. This can be useful with Graal.js for example. Closes gh-23258
-
- 10 7月, 2019 1 次提交
-
-
由 Arjen Poutsma 提交于
Revert to state before DefaultMultipartMessageReader
-
- 08 7月, 2019 1 次提交
-
-
由 Sebastien Deleuze 提交于
The commit deprecates syncBody(Object) in favor of body(Object) which has the same behavior in ServerResponse, WebClient and WebTestClient. It also adds body(Object, Class) and body(Object, ParameterizedTypeReference) methods in order to support any reactive type that can be adapted to a Publisher via ReactiveAdapterRegistry. Related BodyInserters#fromProducer methods are provided as well. Shadowed Kotlin body<T>() extensions are deprecated in favor of bodyWithType<T>() ones, including dedicated Publisher<T> and Flow<T> variants. Coroutines extensions are adapted as well, and body(Object) can now be used with suspending functions. Closes gh-23212
-
- 05 7月, 2019 3 次提交
-
-
由 Juergen Hoeller 提交于
Closes gh-23208
-
由 Rossen Stoyanchev 提交于
Closes gh-23230
-
由 Rossen Stoyanchev 提交于
If content-type is preset in the returned ResponseEntity, then any failure to find a matching converter is a server error. Closes gh-23205
-
- 02 7月, 2019 2 次提交
-
-
由 Rossen Stoyanchev 提交于
-
由 Ilya Lukyanovich 提交于
Closes gh-23060
-
- 21 6月, 2019 1 次提交
-
-
由 Arjen Poutsma 提交于
This commit introduces Flux<Part> ServerRequest.parts() that delegates to ServerWebExchange.getParts() and offers an alternative, streaming way of accessing multipart data. Closes gh-23131
-
- 20 6月, 2019 1 次提交
-
-
由 Sebastien Deleuze 提交于
As of 1.3.40, Kotlin now provides a kotlin-scripting-jsr223-embeddable dependency which: - Fixes classloading related issues - Provides out of the box JSR 223 support - Is compatible with Spring Boot Fat Jar mechanism This commit updates Spring Framework tests and documentation accordingly. Closes gh-23165
-
- 14 6月, 2019 1 次提交
-
-
由 Arjen Poutsma 提交于
This commit makes sure that in DefaultMultipartMessageReader's DefaultFilePart, the file is not closed before all bytes are written, by using DataBufferUtils.write (see c1b6885191d6a50347aeaa14da994f0db88f26fe). The commit also improves on the logging of the DefaultMultipartMessageReader. Closes gh-23130
-
- 13 6月, 2019 1 次提交
-
-
由 Sam Brannen 提交于
Prior to this commit, if a subclass of org.springframework.web.servlet.view.AbstractView or org.springframework.web.reactive.result.view.AbstractUrlBasedView configured a custom value for the requestContextAttribute, that value was overwritten with null whenever the View was dynamically instantiated by a UrlBasedViewResolver, and this could lead to confusing behavior for users of the View. This commit addresses this issue by ensuring that the UrlBasedViewResolvers in spring-webmvc and spring-webflux do not override the requestContextAttribute in a View if the UrlBasedViewResolver has not been explicitly configured with a custom requestContextAttribute value. Closes gh-23129
-
- 12 6月, 2019 1 次提交
-
-
由 Sam Brannen 提交于
This commit improves the FreeMarker macro support in spring-webflux by automatically exposing a RequestContext under the name "springMacroRequestContext" for use with Spring's FreeMarker macros in spring.ftl. This aligns with the user experience for FreeMarkerView in spring-webmvc. Closes gh-23105
-
- 10 6月, 2019 1 次提交
-
-
由 Sam Brannen 提交于
See gh-23002
-
- 09 6月, 2019 1 次提交
-
-
由 Issam EL-ATIF 提交于
Closes gh-23002
-
- 05 6月, 2019 1 次提交
-
-
由 Sebastien Deleuze 提交于
-
- 28 5月, 2019 1 次提交
-
-
由 Sam Brannen 提交于
This commit migrates to the MockitoJUnitRunner where sensible, which will later allow for an easier migration to Mockito's extension for JUnit Jupiter. In addition, this commit deletes unnecessary stubbing for various mocks and polishes test fixture setup in various test classes.
-
- 24 5月, 2019 2 次提交
-
-
由 Phillip Webb 提交于
Migrate all existing JUnit 4 `assert...` based assertions to AssertJ and add a checkstyle rule to ensure they don't return. See gh-23022
-
由 Phillip Webb 提交于
Migrate all existing `assertThat(..., Matcher)` assertions to AssertJ and add checkstyle rules to ensure they don't return. See gh-23022
-
- 21 5月, 2019 2 次提交
-
-
由 Arjen Poutsma 提交于
This commit adds a leading slash for path predicates in both WebFlux.fn and WebMvc.fn. Closes gh-22795
-
由 Phillip Webb 提交于
Migrate tests that use `@test(expectedException=...)` or `try...fail...catch` to use AssertJ's `assertThatException` instead.
-
- 17 5月, 2019 3 次提交
-
-
由 Rossen Stoyanchev 提交于
-
由 Rossen Stoyanchev 提交于
ViewResolutionResultHandler no longer adds BindingResult objects for async model attributes. Instead AbstractView adds them later when those attributes are resolved to concrete values. Closes gh-22933
-
由 Rossen Stoyanchev 提交于
-
- 12 5月, 2019 2 次提交
-
-
由 Sam Brannen 提交于
This commit configures Checkstyle to enforces static imports for JUnit 4 assertions and assumptions. See gh-22932
-
由 Sam Brannen 提交于
This commit also ensures that the JSR-330 TCK is executed with the normal build by adhering to naming conventions for test classes. See gh-22894
-
- 09 5月, 2019 1 次提交
-
-
由 Phillip Webb 提交于
Migrate all tests to consistently use BDD Mockito. Also add checksyle rule to enforce going forwards.
-