Skip to content

Commit

Permalink
GH-355 - Polish Kotlin code samples in event section of reference doc…
Browse files Browse the repository at this point in the history
…umentation.
  • Loading branch information
odrotbohm committed Nov 2, 2023
1 parent e8898c1 commit 792b69c
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/docs/antora/modules/ROOT/pages/events.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
----
Expand All @@ -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()
}
}
----
Expand Down Expand Up @@ -503,6 +503,7 @@ class OrderIntegrationTests {
// …
var matchingMapped = events.ofType(OrderCompleted::class)
.matching(OrderCompleted::getOrderId, reference.getId())

assertThat(matchingMapped).hasSize(1)
}
}
Expand Down

0 comments on commit 792b69c

Please sign in to comment.