コード例 #1
0
        public void CalculateTest(double firstValue, double expected)
        {
            var calculator   = new sqrt_of_x();
            var actualResult = calculator.OneArgumentOperation(firstValue);

            Assert.AreEqual(expected, actualResult);
        }
コード例 #2
0
        public void ErrorTest()
        {
            var calculator = new sqrt_of_x();

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