-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve AggregateTextFixture #67
Comments
Not solving this, but interesting for testing with kotlin : https://github.com/holixon/axon-addons/tree/master/axon-jgiven |
Since A second question is -> what kind of test frameworks we want to support there? As @jangalinski pointed out, we provide a nice integration with JGiven, which can become "the standard" way of testing... And of course there are many Kotlin-test framework out there... What do you think? |
That is what I had in mind, and to mirror how
In the module that enhances the Axon Framework's It might make sense to pull these out in separate modules, depending on the size and dependencies of course. What do you think @zambrovski @smcvb ? |
With my, compared to you guys, limited Kotlin experience, I'd find it hard to gauge which of those testing frameworks would be the go-to solution. Aka, the one which "Axon Kotlin Extension" users would benefit the most from. At least I'd argue putting all options in a single module wouldn't be the ideal solution, so a segregating sounds reasonable to me (indeed depending on the size, and amount of work I'd say). In the end I think it would not be to wrong to be slightly biased to "the best"/"most used" testing framework for Kotlin out there. If that's the bandwagon for Kotlin testing, then I wouldn't see why that shouldn't be this extensions testing-angle too. But as stated, I'd be hard pressed to tell you which that is. Trusting on your guys input on the matter. |
Ok, then I would suggest a "extension-kotlin-test" module fixing the issues with reified classes and the Additional test modules should then not be a part of the extension but can be just separate libraries, like Axon-Jgiven is... |
I just provide an implementation for it including the |
Scenario
Current Behaviour
AggregateTestFixture
currently requires aClass<T> aggregateType
to be created.when
ofAggregateTestFixture
is used to set up the test, which forces Kotlin users to escape the method name sincewhen
is a keyword in KotlinWanted Behaviour
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)`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.test
module of the extension, to allow extension users to use the module only for testing.Possible Workarounds
The text was updated successfully, but these errors were encountered: