Using GivenWhenThen Test Fixture with AggregateAnnotationCommandHandler

31 views
Skip to first unread message

Setya

unread,
Nov 5, 2015, 12:42:17 AM11/5/15
to Axon Framework Users
Hi All,

I could not find any example of using Axon's GivenWhenThen test fixture with AggregateAnnotationCommmandHandler, is it possible to do so ?

Thanks & Regards,

Setya

Setya

unread,
Nov 5, 2015, 6:23:28 AM11/5/15
to Axon Framework Users
Hi All,

I've found that we don't have to specify the command handler, so the following just works:

@Before
public void setup()
{
   fixture = Fixtures.newGivenWhenThenFixture(MyAggregate.class);
}



Please clarify that above code is sufficient.

Thanks & Regards,
Setya

Allard Buijze

unread,
Nov 5, 2015, 8:36:45 AM11/5/15
to Axon Framework Users
If you have @CommandHandler annotations on your aggregate, this in fact all you need.

Cheers,

Allard
--
You received this message because you are subscribed to the Google Groups "Axon Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to axonframewor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Setts

unread,
Nov 6, 2015, 3:16:27 AM11/6/15
to axonfr...@googlegroups.com
Hi Allard,

Glad to know it's enough.

Thanks & Regards,

Setya
Reply all
Reply to author
Forward
0 new messages