Clean up warnings in spring-test

This commit is contained in:
Sam Brannen
2017-01-07 00:57:17 +01:00
parent 87f498195c
commit 055da43e30
2 changed files with 3 additions and 7 deletions

View File

@@ -69,7 +69,7 @@ class DisabledIfConditionTestCase {
@Test
void invalidExpressionEvaluationType() {
String methodName = "nonBooleanOrStringExpression";
IllegalStateException exception = expectThrows(IllegalStateException.class,
IllegalStateException exception = assertThrows(IllegalStateException.class,
() -> condition.evaluate(buildExtensionContext(methodName)));
Method method = ReflectionUtils.findMethod(getClass(), methodName);
@@ -81,7 +81,7 @@ class DisabledIfConditionTestCase {
@Test
void unsupportedStringEvaluationValue() {
String methodName = "stringExpressionThatIsNeitherTrueNorFalse";
IllegalStateException exception = expectThrows(IllegalStateException.class,
IllegalStateException exception = assertThrows(IllegalStateException.class,
() -> condition.evaluate(buildExtensionContext(methodName)));
Method method = ReflectionUtils.findMethod(getClass(), methodName);
@@ -123,7 +123,7 @@ class DisabledIfConditionTestCase {
}
private void assertExpressionIsBlank(String methodName) {
IllegalStateException exception = expectThrows(IllegalStateException.class,
IllegalStateException exception = assertThrows(IllegalStateException.class,
() -> condition.evaluate(buildExtensionContext(methodName)));
assertThat(exception.getMessage(), containsString("must not be blank"));