* Tests
* {@link ELAttributeEvaluator#evaluate(Attribute, Request)}.
*/
public void testEvaluate() {
Attribute attribute = new Attribute();
attribute.setExpressionObject(new Expression("${requestScope.object1}"));
assertEquals("The value is not correct", "value", evaluator.evaluate(
attribute, request));
attribute.setExpressionObject(new Expression("${sessionScope.object2}"));
assertEquals("The value is not correct", new Integer(1), evaluator
.evaluate(attribute, request));
attribute.setExpressionObject(new Expression("${applicationScope.object3}"));
assertEquals("The value is not correct", new Float(2.0), evaluator
.evaluate(attribute, request));
attribute.setExpressionObject(new Expression("${object1}"));
assertEquals("The value is not correct", "value", evaluator.evaluate(
attribute, request));
attribute.setExpressionObject(new Expression("${object2}"));
assertEquals("The value is not correct", new Integer(1), evaluator
.evaluate(attribute, request));
attribute.setExpressionObject(new Expression("${object3}"));
assertEquals("The value is not correct", new Float(2.0), evaluator
.evaluate(attribute, request));
attribute.setExpressionObject(new Expression("${paulaBean.paula}"));
assertEquals("The value is not correct", "Brillant", evaluator
.evaluate(attribute, request));
attribute.setExpressionObject(new Expression("String literal"));
assertEquals("The value is not correct", "String literal", evaluator
.evaluate(attribute, request));
attribute.setValue(new Integer(2));
assertEquals("The value is not correct", new Integer(2), evaluator
.evaluate(attribute, request));