Search in sources :

Example 6 with BetweenCriteria

use of org.teiid.query.sql.lang.BetweenCriteria in project teiid by teiid.

the class TestStaticSymbolMappingVisitor method testVisitBetweenCriteria.

public void testVisitBetweenCriteria() {
    BetweenCriteria bc = new BetweenCriteria(exampleElement(true, 0), new Constant(new Integer(1000)), new Constant(new Integer(2000)));
    helpTest(bc, getSymbolMap());
}
Also used : BetweenCriteria(org.teiid.query.sql.lang.BetweenCriteria) Constant(org.teiid.query.sql.symbol.Constant)

Example 7 with BetweenCriteria

use of org.teiid.query.sql.lang.BetweenCriteria in project teiid by teiid.

the class TestBetweenCriteria method testEquals3.

public void testEquals3() {
    // $NON-NLS-1$
    BetweenCriteria c1 = example("x", 1, 20, true);
    BetweenCriteria c2 = (BetweenCriteria) c1.clone();
    c2.setNegated(false);
    // $NON-NLS-1$ //$NON-NLS-2$
    assertFalse("Criteria should not be equal: " + c1 + ", " + c2, c1.equals(c2));
}
Also used : BetweenCriteria(org.teiid.query.sql.lang.BetweenCriteria)

Example 8 with BetweenCriteria

use of org.teiid.query.sql.lang.BetweenCriteria in project teiid by teiid.

the class TestBetweenCriteria method testSelfEquivalence.

public void testSelfEquivalence() {
    // $NON-NLS-1$
    BetweenCriteria c1 = example("x", 1, 20, false);
    int equals = 0;
    UnitTestUtil.helpTestEquivalence(equals, c1, c1);
}
Also used : BetweenCriteria(org.teiid.query.sql.lang.BetweenCriteria)

Example 9 with BetweenCriteria

use of org.teiid.query.sql.lang.BetweenCriteria in project teiid by teiid.

the class TestBetweenCriteria method testEquals1.

// ################################## ACTUAL TESTS ################################
public void testEquals1() {
    // $NON-NLS-1$
    BetweenCriteria c1 = example("x", 1, 20, false);
    // $NON-NLS-1$
    BetweenCriteria c2 = example("x", 1, 20, false);
    // $NON-NLS-1$ //$NON-NLS-2$
    assertTrue("Equivalent between criteria don't compare as equal: " + c1 + ", " + c2, c1.equals(c2));
}
Also used : BetweenCriteria(org.teiid.query.sql.lang.BetweenCriteria)

Example 10 with BetweenCriteria

use of org.teiid.query.sql.lang.BetweenCriteria in project teiid by teiid.

the class TestBetweenCriteria method testCloneEquivalence.

public void testCloneEquivalence() {
    // $NON-NLS-1$
    BetweenCriteria c1 = example("x", 1, 20, true);
    BetweenCriteria c2 = (BetweenCriteria) c1.clone();
    int equals = 0;
    UnitTestUtil.helpTestEquivalence(equals, c1, c2);
}
Also used : BetweenCriteria(org.teiid.query.sql.lang.BetweenCriteria)

Aggregations

BetweenCriteria (org.teiid.query.sql.lang.BetweenCriteria)10 Constant (org.teiid.query.sql.symbol.Constant)1