コード例 #1
0
        public void CalculateTests(double firstValue, double expected)
        {
            AbsCalculator absCalculator = new AbsCalculator();
            double        result        = absCalculator.Calculate(firstValue);

            Assert.AreEqual(expected, result, 0.001);
        }
コード例 #2
0
        public void CalculateTest(double firstArgument, double expectedResult)
        {
            var calculator   = new AbsCalculator();
            var actualResult = calculator.Calculate(firstArgument);

            Assert.AreEqual(expectedResult, actualResult, 0.001);
        }