public void MutateBinaryNodeType(BinaryNodeType initialType) { var leftPredicate = predicateBuilder("left", "left cell"); var rightPredicate = predicateBuilder("right", "right cell"); var base3Node = new BinaryNode(leftPredicate, rightPredicate, initialType); var mutator = new MutateWalker(base3Node, 1); Assert.AreEqual(initialType, ((BinaryNode)mutator.GetTree()).NodeType); }
public static string ToSql(this BinaryNodeType nodeType) { switch (nodeType) { case BinaryNodeType.AND: return("AND"); case BinaryNodeType.OR: return("OR"); default: throw new ArgumentException(nameof(nodeType)); } }
public BinaryNode(Node left, Node right, BinaryNodeType nodeType) : this(left, right) { this.NodeType = nodeType; }