Slide 8
Slide 8 text
8
Why Messaging?
CREDIT CARD APPLICATION
CONTROLLER
APPLY FOR
CARD
SERVICE
CREDIT
CARD
DOMAIN
EVENT
PUBLISHER
CREDIT CARD REPOSITORY
CONSUMER
(MAIL, REPORT,
ETC)
def 'should emit CardGranted when client born in 70s or later'() {
when:
applyForCardService.apply("89121514667")
then:
1 * domainEventsPublisher.publish( { it instanceof CardGranted } )
}