use of com.alibaba.druid.sql.dialect.oracle.parser.OracleExprParser in project druid by alibaba.
the class EqualTest_dbLink method test_eq.
public void test_eq() throws Exception {
String sql = "a@b";
String sql_c = "a@c";
SQLDbLinkExpr exprA, exprB, exprC;
{
OracleExprParser parser = new OracleExprParser(sql);
exprA = (SQLDbLinkExpr) parser.expr();
}
{
OracleExprParser parser = new OracleExprParser(sql);
exprB = (SQLDbLinkExpr) parser.expr();
}
{
OracleExprParser parser = new OracleExprParser(sql_c);
exprC = (SQLDbLinkExpr) parser.expr();
}
Assert.assertEquals(exprA, exprB);
Assert.assertNotEquals(exprA, exprC);
Assert.assertTrue(exprA.equals(exprA));
Assert.assertFalse(exprA.equals(new Object()));
Assert.assertEquals(exprA.hashCode(), exprB.hashCode());
Assert.assertEquals(new SQLDbLinkExpr(), new SQLDbLinkExpr());
Assert.assertEquals(new SQLDbLinkExpr().hashCode(), new SQLDbLinkExpr().hashCode());
}
Aggregations