public void FailToSubtractASingleNumber()
        {
            var function = new SubtractFunction();

            Assert.Throws <ArgumentException>(() =>
            {
                var inputs = function.GetInputs();

                inputs[0].Value = new[] { 1 };

                var result = function.Calculate(inputs);
            });
        }
        public void SuccessfullySetFunctionInfo()
        {
            var function = new SubtractFunction();

            Assert.NotNull(function.FunctionInfo);
            Assert.Equal("Subtract", function.FunctionInfo.Name);
            Assert.Equal(new Version("1.0.0"), function.FunctionInfo.Version);
            Assert.Equal("Subtract numbers.", function.FunctionInfo.Description);
            Assert.Collection(function.FunctionInfo.Tags,
                              i => Assert.Equal("algebra", i),
                              i => Assert.Equal("subtract", i),
                              i => Assert.Equal("difference", i));
        }
        public void SuccessfullySubtractNumbers()
        {
            var function = new SubtractFunction();

            var inputs = function.GetInputs();

            Assert.Single(inputs);

            inputs[0].Value = new[] { 3, 2, 1 };

            var result = function.Calculate(inputs);

            Assert.NotNull(result);
            Assert.Collection(result,
                              i =>
            {
                Assert.Equal(typeof(double), i.Value.GetType());
                Assert.Equal(0, TypeConverter.ToObject <int>(i.Value));
            });
        }