/// <summary> /// Method that computes the cosine of the grad angle /// </summary> /// <param name="first">Parameter that is entered by the user</param> /// <returns>Calculated value</returns> public double Calculate(double first) { var converter = new GradToRadConverter(); var calculator = new CosCalc(); return(calculator.Calculate(converter.Calculate(first))); }
public void CosCalcTest(double first, double expected) { var calc = new CosCalc(); double result = calc.Calculate(first); Assert.AreEqual(expected, result, 0.001); }