public void DispatchBool_ReturnsCorrect_And(bool expected) { var node = GetAndExp(); IBooleanHelper boolHelper = GetBooleanHelper(); boolHelper.AndBoolean(Arg.Any <AndExpression>(), Arg.Any <List <object> >()) .Returns(expected); DispatchBool_ReturnsCorrect(node, boolHelper, expected); }
public void DispatchBool_And_PassParametersDown(object o) { var parameters = GetParameterList(); var node = GetAndExp(); IBooleanHelper boolHelper = GetBooleanHelper(); List <object> res = null; boolHelper.AndBoolean(Arg.Any <AndExpression>(), Arg.Do <List <object> >(x => res = x)) .Returns(true); var interpreter = Utilities.GetIntepreterOnlyWith(boolHelper); interpreter.DispatchBoolean(node, parameters.ToList()); res.Should().BeEquivalentTo(parameters); }