public void VisitNonIdentifier(INonIdentifierExpression node, List <string> identifiers) { if (node.Children != null) { foreach (ExpressionNode child in node.Children) { _dispatch(child, identifiers); } } }
public void Dispatch_INonIdentifierAndStringList_CorrectIdentifierExpPassed() { PowerExpression expected = new PowerExpression(null, null, 1, 1); PowerExpression input1 = expected; List <string> input2 = new List <string>() { "id" }; IReferenceHelper helper = Substitute.For <IReferenceHelper>(); ReferenceHandler refHandler = new ReferenceHandler(helper); INonIdentifierExpression res = null; helper.VisitNonIdentifier(Arg.Do <INonIdentifierExpression>(x => res = x), Arg.Any <List <string> >()); refHandler.Dispatch(input1, input2); res.Should().BeEquivalentTo(expected); }