public void TestBooleanBinaryExpressionEquals()
        {
            BooleanBinaryExpression first = new BooleanBinaryExpression()
            {
                Type = BooleanBinaryType.AND,
                Left = new BooleanComparisonExpression()
                {
                    Type = BooleanComparisonType.Equals,
                    Left = new ColumnReference()
                    {
                        Identifiers = new List <string>()
                        {
                            "c1"
                        }
                    },
                    Right = new IntegerLiteral()
                    {
                        Value = 3
                    }
                },
                Right = new BooleanComparisonExpression()
                {
                    Type = BooleanComparisonType.GreaterThan,
                    Left = new ColumnReference()
                    {
                        Identifiers = new List <string>()
                        {
                            "c2"
                        }
                    },
                    Right = new IntegerLiteral()
                    {
                        Value = 17
                    }
                }
            };

            BooleanBinaryExpression firstClone = new BooleanBinaryExpression()
            {
                Type = BooleanBinaryType.AND,
                Left = new BooleanComparisonExpression()
                {
                    Type = BooleanComparisonType.Equals,
                    Left = new ColumnReference()
                    {
                        Identifiers = new List <string>()
                        {
                            "c1"
                        }
                    },
                    Right = new IntegerLiteral()
                    {
                        Value = 3
                    }
                },
                Right = new BooleanComparisonExpression()
                {
                    Type = BooleanComparisonType.GreaterThan,
                    Left = new ColumnReference()
                    {
                        Identifiers = new List <string>()
                        {
                            "c2"
                        }
                    },
                    Right = new IntegerLiteral()
                    {
                        Value = 17
                    }
                }
            };

            BooleanBinaryExpression second = new BooleanBinaryExpression()
            {
                Type = BooleanBinaryType.OR,
                Left = new BooleanComparisonExpression()
                {
                    Type = BooleanComparisonType.Equals,
                    Left = new ColumnReference()
                    {
                        Identifiers = new List <string>()
                        {
                            "c1"
                        }
                    },
                    Right = new IntegerLiteral()
                    {
                        Value = 3
                    }
                },
                Right = new BooleanComparisonExpression()
                {
                    Type = BooleanComparisonType.GreaterThan,
                    Left = new ColumnReference()
                    {
                        Identifiers = new List <string>()
                        {
                            "c2"
                        }
                    },
                    Right = new IntegerLiteral()
                    {
                        Value = 17
                    }
                }
            };

            BooleanBinaryExpression third = new BooleanBinaryExpression()
            {
                Type = BooleanBinaryType.AND,
                Left = new BooleanComparisonExpression()
                {
                    Type = BooleanComparisonType.Equals,
                    Left = new ColumnReference()
                    {
                        Identifiers = new List <string>()
                        {
                            "c1"
                        }
                    },
                    Right = new IntegerLiteral()
                    {
                        Value = 4
                    }
                },
                Right = new BooleanComparisonExpression()
                {
                    Type = BooleanComparisonType.GreaterThan,
                    Left = new ColumnReference()
                    {
                        Identifiers = new List <string>()
                        {
                            "c2"
                        }
                    },
                    Right = new IntegerLiteral()
                    {
                        Value = 17
                    }
                }
            };

            BooleanBinaryExpression fourth = new BooleanBinaryExpression()
            {
                Type = BooleanBinaryType.AND,
                Left = new BooleanComparisonExpression()
                {
                    Type = BooleanComparisonType.Equals,
                    Left = new ColumnReference()
                    {
                        Identifiers = new List <string>()
                        {
                            "c1"
                        }
                    },
                    Right = new IntegerLiteral()
                    {
                        Value = 3
                    }
                },
                Right = new BooleanComparisonExpression()
                {
                    Type = BooleanComparisonType.GreaterThan,
                    Left = new ColumnReference()
                    {
                        Identifiers = new List <string>()
                        {
                            "c2"
                        }
                    },
                    Right = new IntegerLiteral()
                    {
                        Value = 18
                    }
                }
            };

            //Equals
            Assert.IsTrue(Equals(first, firstClone));
            Assert.IsFalse(Equals(first, null));
            Assert.IsFalse(Equals(first, second));
            Assert.IsFalse(Equals(first, third));
            Assert.IsFalse(Equals(first, fourth));
            Assert.IsFalse(Equals(first, "other type"));

            //Hash code
            Assert.AreEqual(first.GetHashCode(), firstClone.GetHashCode());
            Assert.AreNotEqual(first.GetHashCode(), second.GetHashCode());
            Assert.AreNotEqual(first.GetHashCode(), third.GetHashCode());
            Assert.AreNotEqual(first.GetHashCode(), fourth.GetHashCode());
        }