Browse Source

Update documentation about WebTestClient Kotlin issue

Issue: SPR-16057
pull/1579/head
Sebastien Deleuze 8 years ago
parent
commit
b9a0e6bbf2
  1. 7
      spring-test/src/main/java/org/springframework/test/web/reactive/server/WebTestClient.java
  2. 12
      src/docs/asciidoc/languages/kotlin.adoc
  3. 4
      src/docs/asciidoc/testing-webtestclient.adoc

7
spring-test/src/main/java/org/springframework/test/web/reactive/server/WebTestClient.java

@ -66,6 +66,13 @@ import org.springframework.web.util.UriBuilderFactory; @@ -66,6 +66,13 @@ import org.springframework.web.util.UriBuilderFactory;
*
* <p>See the static {@code bindToXxx} entry points for creating an instance.
*
* <p><strong>Warning</strong>: {@code WebTestClient} is not usable yet in Kotlin due to a
* <a href="https://youtrack.jetbrains.com/issue/KT-5464">type inference issue</a> which is
* expected to be fixed as of Kotlin 1.3. You can watch
* <a href="https://jira.spring.io/browse/SPR-16057">SPR-16057</a> for up-to-date information.
* Meanwhile, the proposed alternative is to use directly {@link WebClient} with its Reactor
* and Spring Kotlin extensions to perform integration tests on an embedded WebFlux server.
*
* @author Rossen Stoyanchev
* @since 5.0
*/

12
src/docs/asciidoc/languages/kotlin.adoc

@ -654,6 +654,17 @@ class SpecificationLikeTests { @@ -654,6 +654,17 @@ class SpecificationLikeTests {
----
[[kotlin-webtestclient-issue]]
==== `WebTestClient` type inference issue in Kotlin
`WebTestClient` is not usable yet in Kotlin due to a
https://youtrack.jetbrains.com/issue/KT-5464[type inference issue] which is
expected to be fixed as of Kotlin 1.3. You can watch
https://jira.spring.io/browse/SPR-16057[SPR-16057] for up-to-date information. Meanwhile,
the proposed alternative is to use directly `WebClient` with its Reactor and Spring Kotlin
extensions to perform integration tests on an embedded WebFlux server.
[[kotlin-getting-started]]
@ -729,6 +740,7 @@ Here is a list of pending issues related to Spring + Kotlin support. @@ -729,6 +740,7 @@ Here is a list of pending issues related to Spring + Kotlin support.
==== Spring Framework
* https://jira.spring.io/browse/SPR-16057[Unable to use WebTestClient with mock server in Kotlin]
* https://jira.spring.io/browse/SPR-15413[Add support for Kotlin coroutines]

4
src/docs/asciidoc/testing-webtestclient.adoc

@ -8,6 +8,10 @@ to any server over an HTTP connection. It can also bind directly to WebFlux appl @@ -8,6 +8,10 @@ to any server over an HTTP connection. It can also bind directly to WebFlux appl
with <<testing.adoc#mock-objects-web-reactive,mock request and response>> objects,
without the need for an HTTP server.
[NOTE]
====
`WebTestClient` is not usable yet in Kotlin, see <<languages.adoc#kotlin-webtestclient-issue, this section>> for more details.
====

Loading…
Cancel
Save