/**
* Tests
* {@link ELAttributeEvaluator#evaluate(Attribute, TilesRequestContext)}.
*/
public void testEvaluate() {
Attribute attribute = new Attribute();
attribute.setValue("${requestScope.object1}");
assertEquals("The value is not correct", "value", evaluator.evaluate(
attribute, request));
attribute.setValue("${sessionScope.object2}");
assertEquals("The value is not correct", new Integer(1), evaluator
.evaluate(attribute, request));
attribute.setValue("${applicationScope.object3}");
assertEquals("The value is not correct", new Float(2.0), evaluator
.evaluate(attribute, request));
attribute.setValue("${object1}");
assertEquals("The value is not correct", "value", evaluator.evaluate(
attribute, request));
attribute.setValue("${object2}");
assertEquals("The value is not correct", new Integer(1), evaluator
.evaluate(attribute, request));
attribute.setValue("${object3}");
assertEquals("The value is not correct", new Float(2.0), evaluator
.evaluate(attribute, request));
attribute.setValue("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));
}