public async Task SetsStatusToApproved()
        {
            await approval.Approve(notificationId, financialGuaranteeId, new ApprovalData(today, "456", 5, false, (decimal)12.34, (decimal)56.78));

            var financialGuarantee = financialGuaranteeCollection.GetFinancialGuarantee(financialGuaranteeId);

            Assert.Equal(FinancialGuaranteeStatus.Approved, financialGuarantee.Status);
        }
Exemplo n.º 2
0
        public async Task <Unit> HandleAsync(ApproveFinancialGuarantee message)
        {
            await financialGuaranteeApproval.Approve(message.NotificationId, message.FinancialGuaranteeId,
                                                     new ApprovalData(message.DecisionDate,
                                                                      message.ReferenceNumber, message.ActiveLoadsPermitted, message.IsBlanketbond,
                                                                      message.CoverAmount, message.CalculationContinued));

            await context.SaveChangesAsync();

            return(Unit.Value);
        }