示例#1
0
        public void PowerFunction_Calculate_ResultMustBeNumber()
        {
            var powerFunction = new PowerFunction(3);
            var name          = "powerFunction";
            var storage       = new FunctionsStorage();


            storage.AddFunction(name, powerFunction);


            Assert.AreEqual(storage.CalculateFunction(name, 2.2), 10.648, 0.0001);
        }
示例#2
0
        public void SinusFunction_Calculate_ResultMustBeNumber()
        {
            var sinusFunction = new SinusFunction();
            var name          = "sinus";
            var storage       = new FunctionsStorage();


            storage.AddFunction(name, sinusFunction);


            Assert.AreEqual(storage.CalculateFunction(name, 2), 0.90929742682, 0.0001);
        }