コード例 #1
0
        public void NegativeValueTest()
        {
            var x      = -5;
            var solver = new SquareRoot();

            Assert.Throws <ArgumentOutOfRangeException>(() => solver.FindSqrt(x));
        }
コード例 #2
0
        public void NormalBehaviourMultiTest(double x)
        {
            //AAA
            var solver = new SquareRoot();

            var result = solver.FindSqrt(x);

            Assert.AreEqual(result, Math.Sqrt(x), 0.0000001);
        }