示例#1
0
        public void SquaringTest2(double firstValue, double expected)
        {
            IOneArgumentCalculate calculator = new Squaring();
            double result = calculator.Calculate(firstValue);

            Assert.AreEqual(expected, result, 0.00001);
        }
示例#2
0
        public void CalculateTest(double firstValue, double expected)
        {
            var calculator   = new Squaring();
            var actualResult = calculator.Calculate(firstValue);

            Assert.AreEqual(expected, actualResult);
        }
示例#3
0
        public void TestSquaring(double firstArgument, double output)
        {
            var calculator = new Squaring();
            var testResult = calculator.Calculate(firstArgument);

            Assert.AreEqual(output, testResult, 0.0000001);
        }
示例#4
0
        public void SquaringTest(double value, double expected)
        {
            var calculator   = new Squaring();
            var actualResult = calculator.Calculate(value);

            Assert.AreEqual(expected, actualResult, 0.001);
        }
示例#5
0
        public void SquaringTest2()
        {
            IOneArgumentCalculate calculator = new Squaring();

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