I have Application Service classes that are responsible for coordinating
behaviour contained in Aggregates. I have nice simple unit tests for the
actual behaviour in the aggregates (I'm using an event sourcing approach so
I'm comparing events generated by the invoked behaviour against an expected
list of events), but I'd like to test the Application Services as well.
Since the aggregates are being tested I want to test the application
services in as simple a fashion as possible. I'm considering mocks of
aggregates and other services used by the application services so I can
assert that they invoke the correct behaviour, but that would require
Aggregates to have interfaces (so mocks or fakes can be instantiated).
What are people's thoughts on having interfaces for ARs?
Many thanks in advance.