public void DispatchInteger_AbsoluteValueAndObjectList_CorrectValueReturned()
        {
            int expected = 17;
            AbsoluteValueExpression input1 = new AbsoluteValueExpression(null, 0, 0);
            List <Object>           input2 = new List <Object>()
            {
                23, 2.334, null
            };
            IIntegerHelper ihelper     = Substitute.For <IIntegerHelper>();
            Interpreter    interpreter = Utilities.GetIntepreterOnlyWith(ihelper);

            ihelper.AbsoluteInteger(Arg.Any <AbsoluteValueExpression>(), Arg.Any <List <Object> >()).Returns(expected);

            int res = interpreter.DispatchInt(input1, input2);

            Assert.AreEqual(expected, res);
        }
        public void DispatchInteger_AbsoluteValueAndObjectList_CorrectListPassed()
        {
            List <Object> expected = new List <Object>()
            {
                23, 2.334, null
            };
            AbsoluteValueExpression input1      = new AbsoluteValueExpression(null, 0, 0);
            IIntegerHelper          ihelper     = Substitute.For <IIntegerHelper>();
            Interpreter             interpreter = Utilities.GetIntepreterOnlyWith(ihelper);
            List <Object>           res         = null;

            ihelper.AbsoluteInteger(Arg.Any <AbsoluteValueExpression>(), Arg.Do <List <Object> >(x => res = x));

            interpreter.DispatchInt(input1, expected);

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