Example #1
0
        public void TestBooleanBinaryOr()
        {
            BooleanBinaryExpression booleanBinaryExpression = new BooleanBinaryExpression()
            {
                Left = new BooleanComparisonExpression()
                {
                    Left = new ColumnReference()
                    {
                        Identifiers = new List <string>()
                        {
                            "c1"
                        }
                    },
                    Right = new StringLiteral()
                    {
                        Value = "a"
                    }
                },
                Right = new BooleanComparisonExpression()
                {
                    Left = new ColumnReference()
                    {
                        Identifiers = new List <string>()
                        {
                            "c2"
                        }
                    },
                    Right = new StringLiteral()
                    {
                        Value = "b"
                    }
                },
                Type = BooleanBinaryType.OR
            };

            var expected = "(c1 = 'a') OR (c2 = 'b')";
            var actual   = booleanBinaryExpression.Print();

            actual.Should().Be(expected);
        }