public void TestOverwritable()
        {
            FunctionRegistry registry = new FunctionRegistry(false);

            Func<double, double, double> testFunction1 = (a, b) => a * b;
            Func<double, double, double> testFunction2 = (a, b) => a * b;
            registry.RegisterFunction("test", testFunction1);
            registry.RegisterFunction("test", testFunction2);
        }
        public void TestNotOverwritable()
        {
            FunctionRegistry registry = new FunctionRegistry(false);

            Func<double, double, double> testFunction1 = (a, b) => a * b;
            Func<double, double, double> testFunction2 = (a, b) => a * b;

            registry.RegisterFunction("test", testFunction1, false);

            AssertExtensions.ThrowsException<Exception>(() =>
                {
                    registry.RegisterFunction("test", testFunction2, false);
                });
        }
        public void TestAddFunc2()
        {
            FunctionRegistry registry = new FunctionRegistry(false);

            Func<double, double, double> testFunction = (a, b) => a * b;
            registry.RegisterFunction("test", testFunction);

            FunctionInfo functionInfo = registry.GetFunctionInfo("test");

            Assert.IsNotNull(functionInfo);
            Assert.AreEqual("test", functionInfo.FunctionName);
            Assert.AreEqual(2, functionInfo.NumberOfParameters);
            Assert.AreEqual(testFunction, functionInfo.Function);
        }