Upgrade to AssertJ 3.16

This commit is contained in:
Sam Brannen
2020-05-06 14:34:13 +02:00
parent b1c1a232ca
commit 12e05280ad
20 changed files with 110 additions and 97 deletions

View File

@@ -139,9 +139,9 @@ public class ConstructorInvocationTests extends AbstractExpressionTests {
// 1 will make it throw a RuntimeException - SpEL will let this through
eContext.setVariable("bar", 1);
assertThatExceptionOfType(Exception.class).isThrownBy(() ->
expr.getValue(eContext))
.satisfies(ex -> assertThat(ex).isNotInstanceOf(SpelEvaluationException.class));
assertThatExceptionOfType(Exception.class)
.isThrownBy(() -> expr.getValue(eContext))
.isNotInstanceOf(SpelEvaluationException.class);
// A problem occurred whilst attempting to construct an object of type
// 'org.springframework.expression.spel.ConstructorInvocationTests$Tester'
// using arguments '(java.lang.Integer)'

View File

@@ -148,8 +148,9 @@ public class MethodInvocationTests extends AbstractExpressionTests {
Expression expr = parser.parseExpression("throwException(#bar)");
context.setVariable("bar", 2);
assertThatExceptionOfType(Exception.class).isThrownBy(() -> expr.getValue(context))
.satisfies(ex -> assertThat(ex).isNotInstanceOf(SpelEvaluationException.class));
assertThatExceptionOfType(Exception.class)
.isThrownBy(() -> expr.getValue(context))
.isNotInstanceOf(SpelEvaluationException.class);
}
@Test