Upgrade to Coroutines 1.3.0-M2
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
package org.springframework.test.web.reactive.server
|
||||
|
||||
import kotlinx.coroutines.FlowPreview
|
||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import org.reactivestreams.Publisher
|
||||
import org.springframework.core.ParameterizedTypeReference
|
||||
@@ -70,7 +70,7 @@ inline fun <reified T : Any> RequestBodySpec.bodyWithType(publisher: Publisher<T
|
||||
* @author Sebastien Deleuze
|
||||
* @since 5.2
|
||||
*/
|
||||
@FlowPreview
|
||||
@ExperimentalCoroutinesApi
|
||||
inline fun <reified T : Any> RequestBodySpec.bodyWithType(flow: Flow<T>): RequestHeadersSpec<*> =
|
||||
body(flow, object : ParameterizedTypeReference<T>() {})
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ package org.springframework.test.web.reactive.server
|
||||
|
||||
import io.mockk.mockk
|
||||
import io.mockk.verify
|
||||
import kotlinx.coroutines.FlowPreview
|
||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Test
|
||||
@@ -47,7 +47,7 @@ class WebTestClientExtensionsTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@FlowPreview
|
||||
@ExperimentalCoroutinesApi
|
||||
fun `RequestBodySpec#bodyWithType with Flow and reified type parameters`() {
|
||||
val body = mockk<Flow<Foo>>()
|
||||
requestBodySpec.bodyWithType(body)
|
||||
|
||||
Reference in New Issue
Block a user