Ejemplo n.º 1
0
        /// <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)));
        }
Ejemplo n.º 2
0
        public void CalculateTest(double firstValue, double expected)
        {
            var calculator   = new SineCalculator();
            var actualResult = calculator.Calculate(firstValue);

            Assert.AreEqual(expected, actualResult, 0.0001);
        }
        public void CalculateTest(double firstArgument, double expectedResult)
        {
            var calculator   = new SineCalculator();
            var actualResult = calculator.Calculate(firstArgument);

            Assert.AreEqual(expectedResult, actualResult, 0.001);
        }
Ejemplo n.º 4
0
        public void CalculateTest()
        {
            IOneArgumentCalculator sineCalculator = new SineCalculator();
            double actualResult    = sineCalculator.Calculate(0);
            double estimatedResult = 0;

            Assert.AreEqual(estimatedResult, actualResult);
        }