GH-355 - Polish Kotlin code samples in event section of reference documentation.

This commit is contained in:
Oliver Drotbohm
2023-11-02 08:26:00 +01:00
parent e8898c1da1
commit 792b69c25e

View File

@@ -423,11 +423,11 @@ class ExternalizationConfiguration {
@Bean
EventExternalizationConfiguration eventExternalizationConfiguration() {
return EventExternalizationConfiguration.externalizing() // <1>
.select(EventExternalizationConfiguration.annotatedAsExternalized()) // <2>
.mapping(SomeEvent.class, it -> …) // <3>
.routeKey(WithKeyProperty.class, WithKeyProperty::getKey) // <4>
.build();
return EventExternalizationConfiguration.externalizing() // <1>
.select(EventExternalizationConfiguration.annotatedAsExternalized()) // <2>
.mapping(SomeEvent.class, it -> …) // <3>
.routeKey(WithKeyProperty.class, WithKeyProperty::getKey) // <4>
.build();
}
}
----
@@ -441,11 +441,11 @@ class ExternalizationConfiguration {
@Bean
fun eventExternalizationConfiguration(): EventExternalizationConfiguration {
EventExternalizationConfiguration.externalizing() // <1>
.select(EventExternalizationConfiguration.annotatedAsExternalized()) // <2>
.mapping(SomeEvent::class, it -> …) // <3>
.routeKey(WithKeyProperty::class, WithKeyProperty::getKey) // <4>
.build()
EventExternalizationConfiguration.externalizing() // <1>
.select(EventExternalizationConfiguration.annotatedAsExternalized()) // <2>
.mapping(SomeEvent::class, it -> …) // <3>
.routeKey(WithKeyProperty::class, WithKeyProperty::getKey) // <4>
.build()
}
}
----
@@ -503,6 +503,7 @@ class OrderIntegrationTests {
// …
var matchingMapped = events.ofType(OrderCompleted::class)
.matching(OrderCompleted::getOrderId, reference.getId())
assertThat(matchingMapped).hasSize(1)
}
}