Esempio n. 1
0
        public void CalculateTest(
            double firstValue,
            double expected)

        {
            var calculator   = new SquareRoot();
            var actualResult = calculator.Calculate(firstValue);

            Assert.AreEqual(expected, actualResult, 0.001);
        }
Esempio n. 2
0
        public void ExceptionTest()
        {
            var calculator = new SquareRoot();

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