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 AssertCanCalculateNutidsVaerdiOfHenningsData() { var r = new RenteReserveDiskontoCalculator(TestConstants.DiskonteringsRente19September2012); var buildComparer = BuildComparer(0.00001); CollectionAssert.AreEqual(r.RenteReserverAfEnKrone.GetRange(0, TestConstants.NutidsVaerdiAfEnKroneVerified.Count), TestConstants.NutidsVaerdiAfEnKroneVerified, buildComparer); }
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)); }