event-centric/when — pull request #3 by simensen (2014-07-07 23:54:07+00:00)
Title: Added the concept of Understands.

I'm not exactly sure the best way to integrate this concept. The vanilla convention based when is really nice. This is useful in some cases, though, like with the other project I was working on. The "when" and "understands" seems like things that are nice and go together well but not mashed up for everyone to always have to use?

I tried putting the understands stuff directly in the convention based when and it felt weird. We could explore that more, though.

As-is, I left the understands stuff as its own trait that can be used and I created the convention based "where understands" that sews together the standalone "where" and "understands" concepts with a single "whereUnderstands" method. I thought this was pretty nice.

One thing I didn't like was the understoodDomainEvents method. I really wanted this to be static but the trait wouldn't let me have a static method call. :-/ If you know a way around this we can try to fix that somehow.