AxonFramework/extension-kotlin

Fixture factories can not be used as factory methods

sandjelkovic opened this issue · 1 comments

Basic information

  • Axon Framework version: -
  • JDK version: -
  • Kotlin Extension version: 0.2.0-SNAPSHOT
  • Complete executable reproducer if available (e.g. GitHub Repo):

Steps to reproduce

Try to use call reified aggregateTestFixture or reified sagaTestFixture as a factory method, meaning without an already created fixture instance.

Expected behaviour

Use these methods as they were intended to - factory methods to create new Fixtures.

var fixture: AggregateTestFixture<MyAggregate> = aggregateTestFixture()

These methods can not be extensions to already existing fixtures but should be simple standalone functions that use reified generics.

More information can be found here #73 (comment)

@sandjelkovic Here it is: #93