public void TestGeometrischProgressiv1() { var data = new CalculationData(150000, 18000, 5); var rounding = new DefaultRounding(); var calc = new GeometricProgressive(); TestResult(rounding.Calculate(calc, data, 0), 150000, 0); TestResult(rounding.Calculate(calc, data, 1), 140493, 9507); TestResult(rounding.Calculate(calc, data, 2), 125966, 14527); TestResult(rounding.Calculate(calc, data, 3), 103766, 22200); TestResult(rounding.Calculate(calc, data, 4), 69842, 33924); TestResult(rounding.Calculate(calc, data, 5), 18000, 51842); }
public void TestLinear1() { var data = new CalculationData(10000, 0, 5); var rounding = new DefaultRounding(); var calc = new Linear(); TestResult(rounding.Calculate(calc, data, 0), 10000, 0); TestResult(rounding.Calculate(calc, data, 1), 8000, 2000); TestResult(rounding.Calculate(calc, data, 2), 6000, 2000); TestResult(rounding.Calculate(calc, data, 3), 4000, 2000); TestResult(rounding.Calculate(calc, data, 4), 2000, 2000); TestResult(rounding.Calculate(calc, data, 5), 0, 2000); }
public void TestArithmetischDegressiv1() { var data = new CalculationData(150000, 18000, 5); var rounding = new DefaultRounding(); var calc = new ArithmeticDegressive(); TestResult(rounding.Calculate(calc, data, 0), 150000, 0); TestResult(rounding.Calculate(calc, data, 1), 106000, 44000); TestResult(rounding.Calculate(calc, data, 2), 70800, 35200); TestResult(rounding.Calculate(calc, data, 3), 44400, 26400); TestResult(rounding.Calculate(calc, data, 4), 26800, 17600); TestResult(rounding.Calculate(calc, data, 5), 18000, 8800); }
public void TestGeometrischDegressiv2() { var data = new CalculationData(60000, 10678.71m, 6); var rounding = new DefaultRounding(2); var calc = new GeometricDegressive(); TestResult(rounding.Calculate(calc, data, 0), 60000.00m, 0); TestResult(rounding.Calculate(calc, data, 1), 45000.00m, 15000.00m); TestResult(rounding.Calculate(calc, data, 2), 33750.00m, 11250.00m); TestResult(rounding.Calculate(calc, data, 3), 25312.50m, 8437.50m); TestResult(rounding.Calculate(calc, data, 4), 18984.37m, 6328.13m); TestResult(rounding.Calculate(calc, data, 5), 14238.28m, 4746.09m); TestResult(rounding.Calculate(calc, data, 6), 10678.71m, 3559.57m); }
public void TestArithmetischDegressiv3() { var data = new CalculationData(42000, 0, 6); var rounding = new DefaultRounding(); var calc = new ArithmeticDegressive(); TestResult(rounding.Calculate(calc, data, 0), 42000, 0); TestResult(rounding.Calculate(calc, data, 1), 30000, 12000); TestResult(rounding.Calculate(calc, data, 2), 20000, 10000); TestResult(rounding.Calculate(calc, data, 3), 12000, 8000); TestResult(rounding.Calculate(calc, data, 4), 6000, 6000); TestResult(rounding.Calculate(calc, data, 5), 2000, 4000); TestResult(rounding.Calculate(calc, data, 6), 0, 2000); }
public void TestLinear1() { var data = new CalculationData(10000, 0, 5); var rounding = new DefaultRounding(); var calc = new DegressiveToLinear(new PercentDegressive(0.30m)); TestResult(rounding.Calculate(calc, data, 0), 10000, 0); TestResult(rounding.Calculate(calc, data, 1), 7000, 3000); TestResult(rounding.Calculate(calc, data, 2), 4900, 2100); // Ab hier wird zur linearen Abrechnung gewechselt TestResult(rounding.Calculate(calc, data, 3), 3267, 1633); TestResult(rounding.Calculate(calc, data, 4), 1633, 1634); TestResult(rounding.Calculate(calc, data, 5), 0, 1633); }
public void TestArithmetischDegressiv2() { var data = new CalculationData(100000, 0, 10); var rounding = new DefaultRounding(2); var calc = new ArithmeticDegressive(); TestResult(rounding.Calculate(calc, data, 0), 100000, 0); TestResult(rounding.Calculate(calc, data, 1), 81818.18m, 18181.82m); TestResult(rounding.Calculate(calc, data, 2), 65454.55m, 16363.63m); TestResult(rounding.Calculate(calc, data, 3), 50909.09m, 14545.46m); TestResult(rounding.Calculate(calc, data, 4), 38181.82m, 12727.27m); TestResult(rounding.Calculate(calc, data, 5), 27272.73m, 10909.09m); TestResult(rounding.Calculate(calc, data, 6), 18181.82m, 9090.91m); TestResult(rounding.Calculate(calc, data, 7), 10909.09m, 7272.73m); TestResult(rounding.Calculate(calc, data, 8), 5454.55m, 5454.54m); TestResult(rounding.Calculate(calc, data, 9), 1818.18m, 3636.37m); TestResult(rounding.Calculate(calc, data, 10), 0, 1818.18m); }
public void TestGeometrischDegressiv1() { var data = new CalculationData(150000, 18000, 5); var rounding = new DefaultRounding(); var calc = new GeometricDegressive(); // Das waren die Werte aus dem Beispiel, doch die scheinen ungenau zu sein: // http://www.rechnungswesen-portal.de/Fachinfo/Anlagevermoegen/Geometrisch-degressive-Abschreibung.html //TestResult(rounding.Calculate(calc, data, 0), 150000, 0); //TestResult(rounding.Calculate(calc, data, 1), 98160, 51840); //TestResult(rounding.Calculate(calc, data, 2), 64236, 33924); //TestResult(rounding.Calculate(calc, data, 3), 42036, 22200); //TestResult(rounding.Calculate(calc, data, 4), 27508, 14528); //TestResult(rounding.Calculate(calc, data, 5), 18000, 9508); TestResult(rounding.Calculate(calc, data, 0), 150000, 0); TestResult(rounding.Calculate(calc, data, 1), 98158, 51842); TestResult(rounding.Calculate(calc, data, 2), 64234, 33924); TestResult(rounding.Calculate(calc, data, 3), 42034, 22200); TestResult(rounding.Calculate(calc, data, 4), 27507, 14527); TestResult(rounding.Calculate(calc, data, 5), 18000, 9507); }