Ejemplo n.º 1
0
        public void Derivative_DerivativeExistingFunction_DerivativeWillBeCalculated()
        {
            var fs = new FunctionStorage();

            fs.Add("Name", new Linear(2, 1));
            var expectedResult = new Linear(0, 2);

            Assert.AreEqual(expectedResult, fs.Derivative("Name"));
        }
Ejemplo n.º 2
0
        public void Derivative_DerivativeNonExistentFunction_ExceptionReturned()
        {
            var fs = new FunctionStorage();

            Assert.Catch <Exception>(() => fs.Derivative("Name"));
        }