Remove bodyWithType extension from WebTestClient

Since there is no more clash with the new bodyValue
method name.

See gh-23523
This commit is contained in:
Sebastien Deleuze
2019-08-31 11:40:44 +02:00
parent 3dfd0a24dc
commit 57f0c2b7df
2 changed files with 10 additions and 23 deletions

View File

@@ -40,24 +40,24 @@ class WebTestClientExtensionsTests {
@Test
fun `RequestBodySpec#bodyWithType with Publisher and reified type parameters`() {
fun `RequestBodySpec#body with Publisher and reified type parameters`() {
val body = mockk<Publisher<Foo>>()
requestBodySpec.bodyWithType(body)
requestBodySpec.body(body)
verify { requestBodySpec.body(body, object : ParameterizedTypeReference<Foo>() {}) }
}
@Test
@ExperimentalCoroutinesApi
fun `RequestBodySpec#bodyWithType with Flow and reified type parameters`() {
fun `RequestBodySpec#body with Flow and reified type parameters`() {
val body = mockk<Flow<Foo>>()
requestBodySpec.bodyWithType(body)
requestBodySpec.body(body)
verify { requestBodySpec.body(body, object : ParameterizedTypeReference<Foo>() {}) }
}
@Test
fun `RequestBodySpec#bodyWithType with CompletableFuture and reified type parameters`() {
fun `RequestBodySpec#body with CompletableFuture and reified type parameters`() {
val body = mockk<CompletableFuture<Foo>>()
requestBodySpec.bodyWithType<Foo>(body)
requestBodySpec.body<Foo>(body)
verify { requestBodySpec.body(body, object : ParameterizedTypeReference<Foo>() {}) }
}