Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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));
            }
        }
Exemplo n.º 3
0
 public BinaryNode(Node left, Node right, BinaryNodeType nodeType) : this(left, right)
 {
     this.NodeType = nodeType;
 }