예제 #1
0
        public async Task ShouldCallMediator()
        {
            //Arrange
            var model = new TransferApprovalConfirmationViewModel
            {
                ApprovalConfirmed = true
            };

            //Act
            await EmployerCommitmentOrchestrator.SetTransferRequestApprovalStatus(HashedTransferSenderId, HashedCommitmentId, HashedTransferRequestId, model, "UserId", "UserName", "UserEmail");

            //Assert
            MockMediator.Verify(x => x.SendAsync(It.Is <TransferApprovalCommand>(c =>
                                                                                 c.TransferSenderId == TransferSenderId && c.CommitmentId == CommitmentId && c.TransferRequestId == TransferRequestId && c.UserId == "UserId" && c.UserName == "UserName" && c.UserEmail == "UserEmail")), Times.Once);
        }