Search in sources :

Example 1 with IfStatement

use of org.teiid.query.sql.proc.IfStatement in project teiid by teiid.

the class TestIfStatement method testGetIfBlock.

// ################################## ACTUAL TESTS ################################
public void testGetIfBlock() {
    IfStatement b1 = sample1();
    // $NON-NLS-1$
    assertTrue("Incorrect IfBlock on statement", b1.getIfBlock().equals(TestBlock.sample1()));
}
Also used : IfStatement(org.teiid.query.sql.proc.IfStatement)

Example 2 with IfStatement

use of org.teiid.query.sql.proc.IfStatement in project teiid by teiid.

the class TestIfStatement method testNonEquivalence.

public void testNonEquivalence() {
    IfStatement s1 = sample1();
    IfStatement s2 = sample2();
    int equals = -1;
    UnitTestUtil.helpTestEquivalence(equals, s1, s2);
}
Also used : IfStatement(org.teiid.query.sql.proc.IfStatement)

Example 3 with IfStatement

use of org.teiid.query.sql.proc.IfStatement in project teiid by teiid.

the class TestIfStatement method sample2.

public static final IfStatement sample2() {
    Block ifBlock = TestBlock.sample2();
    Block elseBlock = TestBlock.sample1();
    Criteria criteria = TestSetCriteria.sample2();
    return new IfStatement(criteria, ifBlock, elseBlock);
}
Also used : IfStatement(org.teiid.query.sql.proc.IfStatement) Block(org.teiid.query.sql.proc.Block)

Example 4 with IfStatement

use of org.teiid.query.sql.proc.IfStatement in project teiid by teiid.

the class TestIfStatement method sample1.

// ################################## TEST HELPERS ################################
public static final IfStatement sample1() {
    Block ifBlock = TestBlock.sample1();
    Block elseBlock = TestBlock.sample2();
    Criteria criteria = TestSetCriteria.sample1();
    return new IfStatement(criteria, ifBlock, elseBlock);
}
Also used : IfStatement(org.teiid.query.sql.proc.IfStatement) Block(org.teiid.query.sql.proc.Block)

Example 5 with IfStatement

use of org.teiid.query.sql.proc.IfStatement in project teiid by teiid.

the class TestIfStatement method testGetCondition.

public void testGetCondition() {
    IfStatement b1 = sample1();
    // $NON-NLS-1$
    assertTrue("Incorrect IfBlock on statement", b1.getCondition().equals(TestSetCriteria.sample1()));
}
Also used : IfStatement(org.teiid.query.sql.proc.IfStatement)

Aggregations

IfStatement (org.teiid.query.sql.proc.IfStatement)8 Block (org.teiid.query.sql.proc.Block)2