Esempio n. 1
0
        public void SuccessfullyReturnWithDefaultValues()
        {
            var function = new ModuloFunction();

            var inputs = function.GetInputs();

            Assert.Equal(2, inputs.Length);

            var result = function.Calculate(inputs);

            Assert.Collection(result,
                              i =>
            {
                Assert.Equal(typeof(double), i.Value.GetType());
                Assert.Equal(0, TypeConverter.ToObject <int>(i.Value));
            });
        }
Esempio n. 2
0
        public void SuccessfullyReturnValueGivenDividendIsEqualToDivisor()
        {
            var function = new ModuloFunction();

            var inputs = function.GetInputs();

            Assert.Equal(2, inputs.Length);

            inputs[0].Value = 17;
            inputs[1].Value = 17;

            var result = function.Calculate(inputs);

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