1
1
/*
2
- * Copyright 2002-2019 the original author or authors.
2
+ * Copyright 2002-2021 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -49,7 +49,7 @@ public abstract class AbstractExpressionTests {
49
49
50
50
/**
51
51
* Evaluate an expression and check that the actual result matches the
52
- * expectedValue and the class of the result matches the expectedClassOfResult .
52
+ * expectedValue and the class of the result matches the expectedResultType .
53
53
* @param expression the expression to evaluate
54
54
* @param expectedValue the expected result for evaluating the expression
55
55
* @param expectedResultType the expected class of the evaluation result
@@ -106,15 +106,15 @@ public void evaluateAndAskForReturnType(String expression, Object expectedValue,
106
106
107
107
/**
108
108
* Evaluate an expression and check that the actual result matches the
109
- * expectedValue and the class of the result matches the expectedClassOfResult .
109
+ * expectedValue and the class of the result matches the expectedResultType .
110
110
* This method can also check if the expression is writable (for example,
111
111
* it is a variable or property reference).
112
112
* @param expression the expression to evaluate
113
113
* @param expectedValue the expected result for evaluating the expression
114
- * @param expectedClassOfResult the expected class of the evaluation result
114
+ * @param expectedResultType the expected class of the evaluation result
115
115
* @param shouldBeWritable should the parsed expression be writable?
116
116
*/
117
- public void evaluate (String expression , Object expectedValue , Class <?> expectedClassOfResult , boolean shouldBeWritable ) {
117
+ public void evaluate (String expression , Object expectedValue , Class <?> expectedResultType , boolean shouldBeWritable ) {
118
118
Expression expr = parser .parseExpression (expression );
119
119
assertThat (expr ).as ("expression" ).isNotNull ();
120
120
if (DEBUG ) {
@@ -134,7 +134,7 @@ public void evaluate(String expression, Object expectedValue, Class<?> expectedC
134
134
else {
135
135
assertThat (value ).as ("Did not get expected value for expression '" + expression + "'." ).isEqualTo (expectedValue );
136
136
}
137
- assertThat (expectedClassOfResult .equals (resultType )).as ("Type of the result was not as expected. Expected '" + expectedClassOfResult +
137
+ assertThat (expectedResultType .equals (resultType )).as ("Type of the result was not as expected. Expected '" + expectedResultType +
138
138
"' but result was of type '" + resultType + "'" ).isTrue ();
139
139
140
140
assertThat (expr .isWritable (context )).as ("isWritable" ).isEqualTo (shouldBeWritable );
0 commit comments