Example #1
0
        public void NegativeNumberCalculateTest()
        {
            var exp = new Sqrt(new Number(-25));

            Assert.AreEqual(double.NaN, exp.Calculate());
        }
Example #2
0
        public void CalculateTest()
        {
            IExpression exp = new Sqrt(new Number(4));

            Assert.AreEqual(Math.Sqrt(4), exp.Calculate());
        }