mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-22 22:19:03 +00:00
Clean up warnings in spring-test
This commit is contained in:
+3
-3
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user