public class EqualTest_inquery_oracle extends TestCase {
public void test_exits() throws Exception {
String sql = "fstate in (select state from t_status)";
String sql_c = "fstate_c in (select state from t_status)";
SQLInSubQueryExpr exprA, exprB, exprC;
{
SQLExprParser parser = new OracleExprParser(sql);
exprA = (SQLInSubQueryExpr) parser.expr();
}
{
SQLExprParser parser = new OracleExprParser(sql);
exprB = (SQLInSubQueryExpr) parser.expr();
}
{
SQLExprParser parser = new OracleExprParser(sql_c);
exprC = (SQLInSubQueryExpr) 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 SQLInSubQueryExpr(), new SQLInSubQueryExpr());
Assert.assertEquals(new SQLInSubQueryExpr().hashCode(), new SQLInSubQueryExpr().hashCode());
}