I have a number of (Axon 2) tests in the form
fixture.given(event, event, …).when(command).expectEvents()
(I expect zero events)
I found out that some of the tests pass just because an exception is thrown somewhere during command handling, stopping all further computation. The expectEvents() method, when called without arguments, doesn’t report the exception but simply states that the published events are exactly as expected.
Is this behavior intended? I find it confusing, and It makes me feel less confident about all my successful tests. Of is there a better idiom that I should use?