public void A_ClientPassedAway_event_is_raised() { var handlerStub = new EventHandlerStub(); DomainEvent.Current.Subscribe<ClientPassedAway>(handlerStub.Handle); var client = DefaultClient(); client.OpenAccount(DefaultAccountNumber); client.ClientIsDeceased(); handlerStub.RaisedEvents.Count.ShouldBe(1); ((ClientPassedAway)handlerStub.RaisedEvents[0]).ClientId.ShouldBe(DefaultClientId); }
public virtual void TestInit() { Events = new EventHandlerStub(); DomainEvent.Current.ClearSubscribers(); }