public void WorksWithSinus() { // arrange Func <double, double> func = Math.Sin; // act double actual = IntegralCalculus.Calculate(func, 0, Math.PI, 0.01); // assert Assert.InRange(actual, 1.99, 2.01); }
public void WorksWithPolynomialFunction() { // arrange Func <double, double> func = PolynomialFunction; // act double actual = IntegralCalculus.Calculate(func, 5.4, 6.7, 0.01); // assert Assert.InRange(actual, 162.75975, 162.77975); }