public void Check_GetAllOccupations() { _calculatorParameters = new() { Age = 10, DeathSumInsured = 50000, OccupationId = 4, }; decimal?premium = _premiumController.CalculateMonthlyPremium(_calculatorParameters); Assert.IsType <decimal>(premium); Occupation ocpn = _occupationService.GetOccupationById(_calculatorParameters.OccupationId); Assert.Equal(Math.Round(_calculatorParameters.DeathSumInsured * ocpn.Rating.Factor * _calculatorParameters.Age / 1000 * 12, 2), premium); }
public void Check_GetShoppingTrolley_ReturnsNull() { CalculatorParameters calculatorParameters = null; decimal?sumInssured = _sutController.CalculateMonthlyPremium(calculatorParameters); Assert.Null(sumInssured); }