public void BeregnReserveWithDiskontoFrom10Oktober2012Other()
 {
     //150182-xxx6
     var db = new DbAdapter(Program.DbConnectionString);
     db.ReadFromDb();
     db.SetDiskontoSatser(TestConstants.DiskonteringsRente10Oktober2012);
     var e = new RenteReserveBeregner(db);
     var foedselsDato = new DateTime(1982, 1, 15);
     var beregningsDato = new DateTime(2012, 12, 31);
     var age = new InsuranceAgeCalculator().CalculateAge(foedselsDato, beregningsDato);
     Expect(age, Is.EqualTo(30.9166666666667).Within(0.001));
     const int comsumerPriceIndexInPercent = 1;
     var reserve = e.BeregnReserve(foedselsDato, beregningsDato, Koen.Kvinde, 10034, comsumerPriceIndexInPercent);
     const double expectedReserveFromSpreadsheet = 3719302.94806157;
     Expect(reserve, Is.EqualTo(expectedReserveFromSpreadsheet).Within(10));
 }
 public void BeregnReserveWithDiskontoFrom10Oktober2012()
 {
     //cpr: 160680-xxx6
     var db = new DbAdapter(Program.DbConnectionString);
     db.ReadFromDb();
     db.SetDiskontoSatser(TestConstants.DiskonteringsRente10Oktober2012);
     var e = new RenteReserveBeregner(db);
     var foedselsDato = new DateTime(1980,6,16);
     var beregningsDato = new DateTime(2012,12,31);
     var age = new InsuranceAgeCalculator().CalculateAge(foedselsDato, beregningsDato);
     Expect(age, Is.EqualTo(32.5).Within(0.001));
     const int comsumerPriceIndexInPercent = 1;
     var reserve = e.BeregnReserve(foedselsDato, beregningsDato, Koen.Kvinde, 6554, comsumerPriceIndexInPercent);
     Expect(reserve, Is.EqualTo(2347852.93480205).Within(10));
 }