Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Interfaces for Aggregates?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
@nbarnwell  
View profile  
 More options Jul 4 2012, 6:43 pm
From: "@nbarnwell" <mail...@neilbarnwell.co.uk>
Date: Wed, 4 Jul 2012 15:43:41 -0700 (PDT)
Local: Wed, Jul 4 2012 6:43 pm
Subject: Interfaces for Aggregates?

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.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
opie  
View profile  
 More options Jul 5 2012, 3:12 am
From: opie <nichols.mik...@gmail.com>
Date: Thu, 5 Jul 2012 00:12:19 -0700 (PDT)
Local: Thurs, Jul 5 2012 3:12 am
Subject: Re: Interfaces for Aggregates?

These seem like integration tests you are composing, not specifications.
Introducing interfaces in test-after development so you can simplify tests
is missing the point of an interface (a contract) IMO. Unfortunately the
static typed languages make this kind of stuff a PITA, it might be
justified if the cost of interface explosion and maintaining them is worth
it. If these are just tests on the command handlers, then personally I
don't test them since they are supposed to be dead simple anyways. If there
is something more complicated, you might consider doing more of a black-box
testing where you test the events being emitted from a higher level.

hth
mike


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »