Clean up warnings in spring-test
This commit is contained in:
parent
87f498195c
commit
055da43e30
|
|
@ -18,8 +18,6 @@ package org.springframework.test.web.client.match;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.xml.xpath.XPathExpressionException;
|
||||
|
|
@ -34,9 +32,7 @@ import org.springframework.test.web.client.RequestMatcher;
|
|||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
import org.springframework.web.util.UriComponentsBuilder;
|
||||
import org.springframework.web.util.UriUtils;
|
||||
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
import static org.hamcrest.MatcherAssert.*;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.springframework.test.util.AssertionErrors.*;
|
||||
|
|
|
|||
|
|
@ -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"));
|
||||
|
|
|
|||
Loading…
Reference in New Issue