Refactor ServerWebExchange#getAttribute options
Issue: SPR-15718
This commit is contained in:
@@ -103,7 +103,7 @@ public class SimpleUrlHandlerMappingTests {
|
||||
assertNotNull(actual);
|
||||
assertSame(bean, actual);
|
||||
//noinspection OptionalGetWithoutIsPresent
|
||||
assertEquals(pathWithinMapping, exchange.getAttribute(PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE).get());
|
||||
assertEquals(pathWithinMapping, exchange.getAttribute(PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE));
|
||||
}
|
||||
else {
|
||||
assertNull(actual);
|
||||
|
||||
@@ -388,7 +388,7 @@ public class ResourceWebHandlerTests {
|
||||
assertEquals(HttpStatus.NOT_FOUND, exchange.getResponse().getStatusCode());
|
||||
}
|
||||
|
||||
@Test(expected = IllegalStateException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void noPathWithinHandlerMappingAttribute() throws Exception {
|
||||
MockServerWebExchange exchange = MockServerHttpRequest.get("").toExchange();
|
||||
this.handler.handle(exchange).block(TIMEOUT);
|
||||
|
||||
Reference in New Issue
Block a user