public async Task Handle_WhenHandlingTransferRequestApprovedEvent_ThenShouldSendLegacyEventCohortApprovedByTransferSender() { var f = new TransferRequestApprovedEventHandlerTestsFixture().AddCohortToMemoryDb(); await f.Handle(); f.VerifyLegacyEventCohortApprovedByTransferSenderIsPublished(); }
public void Handle_WhenHandlingTransferRequestApprovedEventAndItThrowsException_ThenWelogErrorAndRethrowError() { var f = new TransferRequestApprovedEventHandlerTestsFixture(); Assert.ThrowsAsync <InvalidOperationException>(() => f.Handle()); Assert.IsTrue(f.Logger.HasErrors); }
public async Task Handle_WhenHandlingTransferRequestApprovedEvent_ThenShouldFindCohortAndSetTransferApprovalProperties() { var f = new TransferRequestApprovedEventHandlerTestsFixture().AddCohortToMemoryDb(); await f.Handle(); f.VerifyCohortApprovalPropertiesAreSet(); }