Remove bodyWithType extension from WebFlux
Since there is no more clash with the new bodyValue method name. Closes gh-23523
This commit is contained in:
@@ -43,23 +43,23 @@ class WebClientExtensionsTests {
|
||||
|
||||
|
||||
@Test
|
||||
fun `RequestBodySpec#bodyWithType with Publisher and reified type parameters`() {
|
||||
fun `RequestBodySpec#body with Publisher and reified type parameters`() {
|
||||
val body = mockk<Publisher<List<Foo>>>()
|
||||
requestBodySpec.bodyWithType(body)
|
||||
requestBodySpec.body(body)
|
||||
verify { requestBodySpec.body(body, object : ParameterizedTypeReference<List<Foo>>() {}) }
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `RequestBodySpec#body with Flow and reified type parameters`() {
|
||||
val body = mockk<Flow<List<Foo>>>()
|
||||
requestBodySpec.bodyWithType(body)
|
||||
requestBodySpec.body(body)
|
||||
verify { requestBodySpec.body(ofType<Any>(), object : ParameterizedTypeReference<List<Foo>>() {}) }
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `RequestBodySpec#body with CompletableFuture and reified type parameters`() {
|
||||
val body = mockk<CompletableFuture<List<Foo>>>()
|
||||
requestBodySpec.bodyWithType<List<Foo>>(body)
|
||||
requestBodySpec.body<List<Foo>>(body)
|
||||
verify { requestBodySpec.body(ofType<Any>(), object : ParameterizedTypeReference<List<Foo>>() {}) }
|
||||
}
|
||||
|
||||
|
||||
@@ -45,21 +45,21 @@ class ServerResponseExtensionsTests {
|
||||
@Test
|
||||
fun `BodyBuilder#body with Publisher and reified type parameters`() {
|
||||
val body = mockk<Publisher<List<Foo>>>()
|
||||
bodyBuilder.bodyWithType(body)
|
||||
bodyBuilder.body(body)
|
||||
verify { bodyBuilder.body(body, object : ParameterizedTypeReference<List<Foo>>() {}) }
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `BodyBuilder#body with CompletableFuture and reified type parameters`() {
|
||||
val body = mockk<CompletableFuture<List<Foo>>>()
|
||||
bodyBuilder.bodyWithType<List<Foo>>(body)
|
||||
bodyBuilder.body<List<Foo>>(body)
|
||||
verify { bodyBuilder.body(body, object : ParameterizedTypeReference<List<Foo>>() {}) }
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `BodyBuilder#body with Flowable and reified type parameters`() {
|
||||
val body = mockk<Flowable<List<Foo>>>()
|
||||
bodyBuilder.bodyWithType(body)
|
||||
bodyBuilder.body(body)
|
||||
verify { bodyBuilder.body(body, object : ParameterizedTypeReference<List<Foo>>() {}) }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user