Updates to version 5.0.0-SNAPSHOT

Changes for Framework 7
This commit is contained in:
spencergibb
2025-06-06 14:47:41 -04:00
parent ae4612311c
commit 24bc1f28c9
64 changed files with 106 additions and 98 deletions

View File

@@ -34,7 +34,7 @@ open class KotlinLambdasConfiguration {
open fun uppercase(): Function<String, String> = KotlinComponentFunction()
@Bean
open fun kotlinFunction(): (String) -> String {
return { it.toUpperCase() }
return { it.uppercase() }
}
@Bean

View File

@@ -36,7 +36,7 @@ open class KotlinSuspendFlowLambdasConfiguration {
@Bean
open fun kotlinFunction(): suspend (Flow<String>) -> Flow<String> = { flow ->
flow.map { value -> value.toUpperCase() }
flow.map { value -> value.uppercase() }
}
@Bean

View File

@@ -56,7 +56,7 @@ open class HeadersToMessageSuspendTests {
)
Assertions.assertThat(postForEntity.body).isEqualTo("[{\"name\":\"Bob\",\"age\":25}]")
Assertions.assertThat(postForEntity.headers.containsKey("x-content-type")).isTrue
Assertions.assertThat(postForEntity.headers.headerNames()).contains("x-content-type")
Assertions.assertThat(postForEntity.headers["x-content-type"]!![0])
.isEqualTo("application/xml")
Assertions.assertThat(postForEntity.headers["foo"]!![0]).isEqualTo("bar")
@@ -67,7 +67,7 @@ open class HeadersToMessageSuspendTests {
"HELLO", String::class.java
)
Assertions.assertThat(postForEntity.body).isEqualTo("[\"HELLO\"]")
Assertions.assertThat(postForEntity.headers.containsKey("x-content-type")).isTrue
Assertions.assertThat(postForEntity.headers.headerNames()).contains("x-content-type")
Assertions.assertThat(postForEntity.headers["x-content-type"]!![0])
.isEqualTo("application/xml")
Assertions.assertThat(postForEntity.headers["foo"]!![0]).isEqualTo("bar")

View File

@@ -55,7 +55,7 @@ open class HeadersToMessageTests {
.body("{\"name\":\"Bob\",\"age\":25}"), String::class.java
)
Assertions.assertThat(postForEntity.body).isEqualTo("{\"name\":\"Bob\",\"age\":25}")
Assertions.assertThat(postForEntity.headers.containsKey("x-content-type")).isTrue
Assertions.assertThat(postForEntity.headers.headerNames()).contains("x-content-type")
Assertions.assertThat(postForEntity.headers["x-content-type"]!![0])
.isEqualTo("application/xml")
Assertions.assertThat(postForEntity.headers["foo"]!![0]).isEqualTo("bar")
@@ -66,7 +66,7 @@ open class HeadersToMessageTests {
"{\"name\":\"Bob\",\"age\":25}", String::class.java
)
Assertions.assertThat(postForEntity.body).isEqualTo("{\"name\":\"Bob\",\"age\":25}")
Assertions.assertThat(postForEntity.headers.containsKey("x-content-type")).isTrue
Assertions.assertThat(postForEntity.headers.headerNames().contains("x-content-type"))
Assertions.assertThat(postForEntity.headers["x-content-type"]!![0])
.isEqualTo("application/xml")
Assertions.assertThat(postForEntity.headers["foo"]!![0]).isEqualTo("bar")
@@ -76,9 +76,9 @@ open class HeadersToMessageTests {
@org.springframework.boot.test.context.TestConfiguration
open class TestConfiguration {
@Bean("string")
open fun functiono(): (message: Message<String?>) -> Message<String?> = { request: Message<String?> ->
val message =
MessageBuilder.withPayload(request.payload)
open fun functiono(): (message: Message<String>) -> Message<String> = { request: Message<String> ->
val message: Message<String> =
MessageBuilder.withPayload(request.payload as String)
.setHeader("X-Content-Type", "application/xml")
.setHeader("foo", "bar").build()
message