-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Description
Scenario
- extension-kotlin version: 0.1.0
- Axon Framework version: 4.4.x
- Description of your use case: (detailed description or executable reproducer, e.g. GitHub repo)
Current Behaviour
AggregateTestFixture
currently requires aClass<T> aggregateType
to be created.- The method named
when
ofAggregateTestFixture
is used to set up the test, which forces Kotlin users to escape the method name sincewhen
is a keyword in Kotlin
Wanted Behaviour
- instead of passing Java's class object to
AggregateTestFixture
, a factory method with a reified generic parameter can be used instead. That would allow for a syntax like zaggregateTestFixture()instead of
AggregateTestFixture(GiftCard.javaClass)` - An extension method on
AggregateTestFixture
which will alias/delegate towhen
, but will be called something else that is not a keyword. One option could bewhenever
, but anything else that make sense will do. - This will require a new
test
module of the extension, to allow extension users to use the module only for testing.