Skip to content

Improve AggregateTextFixture #67

@sandjelkovic

Description

@sandjelkovic

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

  1. AggregateTestFixture currently requires a Class<T> aggregateType to be created.
  2. The method named when of AggregateTestFixture is used to set up the test, which forces Kotlin users to escape the method name since when is a keyword in Kotlin

Wanted Behaviour

  1. 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 ofAggregateTestFixture(GiftCard.javaClass)`
  2. An extension method on AggregateTestFixture which will alias/delegate to when, but will be called something else that is not a keyword. One option could be whenever, but anything else that make sense will do.
  3. This will require a new test module of the extension, to allow extension users to use the module only for testing.

Possible Workarounds

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions