public void Create() { var renteReserveDiskontoCalculator = new RenteReserveDiskontoCalculator(TestConstants.DiskonteringsRente19September2012); var mortalityCalculator = new MortalityCalculator(TestConstants.DoedsIntensitetFromFinanstilsynetForFemales2011); var e = new RenteReserveCalculator(mortalityCalculator, renteReserveDiskontoCalculator, comsumerPriceIndexInPercent:2.0 ); }
public void CalculateForEenKrone() { var renteReserveDiskontoCalculator = new RenteReserveDiskontoCalculator(TestConstants.DiskonteringsRente19September2012); var mortalityCalculator = new MortalityCalculator(TestConstants.DoedsIntensitetFromFinanstilsynetForFemales2011); var e = new RenteReserveCalculator(mortalityCalculator, renteReserveDiskontoCalculator, comsumerPriceIndexInPercent: 0); const double expected = 30.2067038390154; //celle N6 i regnearket "beregning af rentereserve" panel "rentekurve" var calculateForEenKrone = e.CalculateForEenKrone(20,47); Expect(expected, Is.EqualTo(calculateForEenKrone).Within(0.001)); calculateForEenKrone = e.CalculateForEenKrone(20); Expect(expected, Is.EqualTo(calculateForEenKrone).Within(0.001)); }