helpTestThenExpressions(caseExpr, 4);
}
caseExpr.setWhen(TestSearchedCaseExpression.getWhenCriteria(3), getThenExpressions(3));
caseExpr.setWhen(getWhenExpressions(3), TestSearchedCaseExpression.getWhenCriteria(3));
ArrayList whens = new ArrayList();
whens.add(new Constant("abc")); //$NON-NLS-1$
whens.add(new Constant("xyz")); //$NON-NLS-1$
ArrayList thens = new ArrayList();
thens.add(new Constant(new Integer(20000)));
thens.add(new Constant(new Integer(30000)));
caseExpr.setWhen(whens, thens);
assertEquals(2, caseExpr.getWhenCount());
assertEquals(new Constant("abc"), caseExpr.getWhenExpression(0)); //$NON-NLS-1$
assertEquals(new Constant("xyz"), caseExpr.getWhenExpression(1)); //$NON-NLS-1$
assertEquals(new Constant(new Integer(20000)), caseExpr.getThenExpression(0));
assertEquals(new Constant(new Integer(30000)), caseExpr.getThenExpression(1));
}