Axon 3.0 testing expectVoidReturnType no longer available

28 views
Skip to first unread message

Dominic Heutelbeck

unread,
Jan 10, 2017, 6:45:01 AM1/10/17
to Axon Framework Users
Hello.

First off, congratulations to the 3.0 release!

I just tried to switch my code from 3.0-RC1 to 3.0, and noticed, that the expectVoidReturnType method has been removed from the test fixture.

How are we supposed to test for this now? On the other hand, as the command handlers are usually unique, and the fact that it returns "void" is a-priori known makes it useless to test for this fact anyhow? Or o I have to construct a cusom matcher for this scenario now?

Thanks,
Dominic

Allard Buijze

unread,
Jan 11, 2017, 11:16:01 AM1/11/17
to Axon Framework Users
Hi Dominic,

the expectVoidReturnType() method is a misleading name, because it suggests that the method should declare a void return type. It doesn't check that. It checked whether the method returned normally (but in the case of void methods, with a null value).

So in 3.0, this method was renamed to expect expectSuccessfulHandlerExecution().

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.

Dominic Heutelbeck

unread,
Jan 12, 2017, 4:10:29 AM1/12/17
to Axon Framework Users
Thanks, Allard. Thats straight forward and makes sense. Dominic
Reply all
Reply to author
Forward
0 new messages