Ejemplo n.º 1
0
        public void AddTwoIntegersUsingParameters()
        {
            IFunction add    = new CombineFunction(new CombineFunction(new AddIntegerFunction(), new ParameterFunction(0, 0)), new ParameterFunction(1, 0));
            IFunction result = add.Bind(new IFunction[] { new ConstantFunction(1), new ConstantFunction(2) });

            Assert.IsNotNull(result);
            Assert.IsInstanceOfType(result, typeof(ConstantFunction));
            Assert.AreEqual(3, result.Value);
        }