예제 #1
0
        public void CalculateTest(double argument, double result, double accuracy)
        {
            var calculator = new CosCalculator();
            var testResult = calculator.Calculate(argument);

            Assert.AreEqual(result, testResult, accuracy);
        }
예제 #2
0
        public void CalculationTest(double firstArgument, double result)
        {
            var calculator   = new CosCalculator();
            var actualResult = calculator.Calculate(firstArgument);

            Assert.AreEqual(result, actualResult, 0.00001);
        }
예제 #3
0
        public void CalculateTests(double firstValue, double expected)
        {
            CosCalculator cosCalculator = new CosCalculator();
            double        result        = cosCalculator.Calculate(firstValue);

            Assert.AreEqual(expected, result, 0.001);
        }
예제 #4
0
        void CalcSinTests()
        {
            CosCalculator cosc = new CosCalculator();
            double        ExpResult = Cos(33), ActResult = cosc.CalcCos(33);

            Assert.AreEqual(ExpResult, ActResult);
        }
예제 #5
0
        public void CalculateTest(double firstValue, double expected)
        {
            var calculator   = new CosCalculator();
            var actualResult = calculator.Calculate(firstValue);

            Assert.AreEqual(expected, actualResult);
        }
예제 #6
0
        public void CalculateTest(double argument, double result,double accuracy)
        {
            var calculator = new CosCalculator();
            var testResult = calculator.Calculate(argument);

            Assert.AreEqual(result, testResult, accuracy);
        }
예제 #7
0
        public void CalculateTest()
        {
            IOneArgumentCalculator cosCalculator = new CosCalculator();
            double actualResult    = cosCalculator.Calculate(Math.PI);
            double estimatedResult = -1;

            Assert.AreEqual(estimatedResult, actualResult);
        }
예제 #8
0
        public void CalculateTest()

        {
            IOneArgumentCalculator calculator = new CosCalculator();
            double result = calculator.Calculate(1);

            Assert.AreEqual(0.5403, result, 0.0001);
        }
예제 #9
0
        public void CosCalculatorTest()
        {
            CosCalculator calculator = new CosCalculator();

            Assert.AreEqual(1, calculator.Calculate(0));
        }
 public void CosTest(double first, double expected)
 {
     IOneArgumentsCalculator calculator = new CosCalculator();
     double result = calculator.Calculator(first);
     Assert.AreEqual(expected, result, 0.0001);
 }