コード例 #1
0
        public void CalculationAdditionTest(double firstArgument, double result)
        {
            var calculator   = new ArccosCalculator();
            var actualResult = calculator.Calculate(firstArgument);

            Assert.AreEqual(result, actualResult, 0.00001);
        }
コード例 #2
0
        public void ArccosTest()
        {
            IOneArgumentCalculator calculator = new ArccosCalculator();

            Assert.Throws <Exception>(() =>
                                      calculator.Calculate(2));
        }
コード例 #3
0
ファイル: ArccosCalculatorTests.cs プロジェクト: ElenaKuz/AAA
        public void CalculateTest(double firstValue, double expected)
        {
            var calculator   = new ArccosCalculator();
            var actualResult = calculator.Calculate(firstValue);

            Assert.AreEqual(expected, actualResult);
        }
コード例 #4
0
        public void CalculateTests(double firstValue, double expected)
        {
            ArccosCalculator arccosCalculator = new ArccosCalculator();
            double           result           = arccosCalculator.Calculate(firstValue);

            Assert.AreEqual(expected, result, 0.001);
        }
コード例 #5
0
        public void CatchExceptions(double argument)
        {
            var calculator = new ArccosCalculator();

            Assert.Throws <Exception>(() => calculator.Calculate(argument));
        }
コード例 #6
0
        public void DivisionByZeroTest()
        {
            IOneArgumentCalculator calculator = new ArccosCalculator();

            Assert.Throws <Exception>(() => calculator.Calculate(14));
        }
コード例 #7
0
        public void NegativeCalculateTests()
        {
            ArccosCalculator arccosCalculator = new ArccosCalculator();

            Assert.Throws <Exception>(() => arccosCalculator.Calculate(2));
        }
コード例 #8
0
        public void CalculationError()
        {
            var calculator = new ArccosCalculator();

            Assert.Throws <Exception>(() => calculator.Calculate(5));
        }