|
|
|
|
@ -268,18 +268,6 @@ class SetValueTests extends AbstractExpressionTests {
@@ -268,18 +268,6 @@ class SetValueTests extends AbstractExpressionTests {
|
|
|
|
|
return parser.parseExpression(expressionString); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Call setValue() but expect it to fail. |
|
|
|
|
*/ |
|
|
|
|
private void setValueAndExpectError(String expression, Object value) { |
|
|
|
|
Expression e = parser.parseExpression(expression); |
|
|
|
|
assertThat(e).isNotNull(); |
|
|
|
|
if (DEBUG) { |
|
|
|
|
SpelUtilities.printAbstractSyntaxTree(System.out, e); |
|
|
|
|
} |
|
|
|
|
assertThatSpelEvaluationException().isThrownBy(() -> e.setValue(context, value)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Call setValue() but expect it to fail. |
|
|
|
|
* @see #evaluateAndCheckError(org.springframework.expression.ExpressionParser, String, Class, SpelMessage, Object...) |
|
|
|
|
|