public void DispatchReal_CastFromIntegerAndObjectList_CorrectValueReturned()
        {
            double expected = 17;
            CastFromIntegerExpression input1 = new CastFromIntegerExpression(null, 0, 0);
            List <Object>             input2 = new List <Object>()
            {
                23, 2.334, null
            };
            IRealHelper rhelper     = Substitute.For <IRealHelper>();
            Interpreter interpreter = Utilities.GetIntepreterOnlyWith(rhelper);

            rhelper.CastIntegerToReal(Arg.Any <CastFromIntegerExpression>(), Arg.Any <List <Object> >()).Returns(expected);

            double res = interpreter.DispatchReal(input1, input2);

            Assert.AreEqual(expected, res);
        }
        public void DispatchReal_CastFromIntegerAndObjectList_CorrectListPassed()
        {
            List <Object> expected = new List <Object>()
            {
                23, 2.334, null
            };
            CastFromIntegerExpression input1 = new CastFromIntegerExpression(null, 0, 0);
            IRealHelper   rhelper            = Substitute.For <IRealHelper>();
            Interpreter   interpreter        = Utilities.GetIntepreterOnlyWith(rhelper);
            List <Object> res = null;

            rhelper.CastIntegerToReal(Arg.Any <CastFromIntegerExpression>(), Arg.Do <List <Object> >(x => res = x));

            interpreter.DispatchReal(input1, expected);

            res.Should().BeEquivalentTo(expected);
        }