Esempio n. 1
0
        public void Success()
        {
            _thirdPartyGrv.PVofGuaranteedRV = 1012.2323M;
            _thirdPartyGrv.RateImplicit     = 2.4332M;
            _thirdPartyGrv.NetInvLeaseSTL   = 983.234M;
            _thirdPartyGrv.CuUnearnedIntThirdPartyGrvStl = 183M;

            _thirdPartyGrvExpected.ThirdPartyGrvStl            = 1012.23M;
            _thirdPartyGrvExpected.NetThirdPartyGrvStl         = 1014.13M;
            _thirdPartyGrvExpected.UnearnedIntThirdPartyGrvStl = 184.89M;
            _thirdPartyGrvExpected.NetInvestmentInLeaseStl     = 983.23M;

            _thirdPartyGrvResult = _baseCalculatorService.CalculateThirdPartyGrvStl13(_thirdPartyGrv);
            Assert.That(_thirdPartyGrvResult.ThirdPartyGrvStl, Is.EqualTo(_thirdPartyGrvExpected.ThirdPartyGrvStl));
            Assert.That(_thirdPartyGrvResult.NetThirdPartyGrvStl, Is.EqualTo(_thirdPartyGrvExpected.NetThirdPartyGrvStl));
            Assert.That(_thirdPartyGrvResult.UnearnedIntThirdPartyGrvStl, Is.EqualTo(_thirdPartyGrvExpected.UnearnedIntThirdPartyGrvStl));
            Assert.That(_thirdPartyGrvResult.NetInvestmentInLeaseStl, Is.EqualTo(_thirdPartyGrvExpected.NetInvestmentInLeaseStl));
        }
 public IActionResult CalculateThirdPartyGrvStl13([FromBody] ThirdPartyGrv thirdPartyGrv)
 {
     try
     {
         return(Ok(_baseCalculatorService.CalculateThirdPartyGrvStl13(thirdPartyGrv)));
     }
     catch (Exception ex)
     {
         AMTErrorMessage errorMessage = new AMTErrorMessage
         {
             Message = ex.Message
         };
         return(BadRequest(errorMessage));
     }
 }