public void Handle_WhenHandlingTransferRequestRejectedEventAndCohortIsNotWithTransferSenderItThrowsException_ThenLogErrorAndRethrowError() { var f = new TransferRequestRejectedEventHandlerTestsFixture().WithEmployerParty().AddCohortToMemoryDb(); Assert.ThrowsAsync <DomainException>(() => f.Handle()); Assert.IsTrue(f.Logger.HasErrors); }
public void Handle_WhenHandlingTransferRequestRejectedEventAndCohortIsNotFoundItThrowsException_ThenLogErrorAndRethrowError() { var f = new TransferRequestRejectedEventHandlerTestsFixture(); Assert.ThrowsAsync <InvalidOperationException>(() => f.Handle()); Assert.IsTrue(f.Logger.HasErrors); }
public async Task Handle_WhenHandlingTransferRequestRejectedEvent_ThenShouldTrackingTheUpdate() { var f = new TransferRequestRejectedEventHandlerTestsFixture().AddCohortToMemoryDb(); await f.Handle(); f.VerifyEntityIsBeingTracked(); }
public async Task Handle_WhenHandlingTransferRequestRejectedEvent_ThenPublishesLegacyEventCohortRejectedByTransferSender() { var f = new TransferRequestRejectedEventHandlerTestsFixture().AddCohortToMemoryDb(); await f.Handle(); f.VerifyLegacyEventCohortRejectedByTransferSenderIsPublished(); }
public async Task Handle_WhenHandlingTransferRequestRejectedEvent_ThenShouldFindCohortAndResetCohortToBeWithEmployer() { var f = new TransferRequestRejectedEventHandlerTestsFixture().AddCohortToMemoryDb(); await f.Handle(); f.VerifyCohortIsWithEmployer(); }