public void ConvertTest(double firstArgument, double expectedResult) { var converter = new GradToRadConverter(); var actualResult = converter.Calculate(firstArgument); Assert.AreEqual(expectedResult, actualResult, 0.001); }
/// <summary> /// Method of calculating the sine in degrees /// </summary> /// <param name="argument">Parametr that is entered by user</param> /// <returns></returns> public double Calculate(double argument) { var converter = new GradToRadConverter(); var calculator = new SineCalculator(); return(calculator.Calculate(converter.Calculate(argument))); }
/// <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))); }