Browse Source

Fix error messages to match commit #1a9556

See gh-26679
pull/26752/head
Rossen Stoyanchev 5 years ago
parent
commit
b651c10e83
  1. 8
      spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolverTests.java

8
spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolverTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -96,7 +96,8 @@ public class DefaultHandlerExceptionResolverTests { @@ -96,7 +96,8 @@ public class DefaultHandlerExceptionResolverTests {
assertThat(mav).as("No ModelAndView returned").isNotNull();
assertThat(mav.isEmpty()).as("No Empty ModelAndView returned").isTrue();
assertThat(response.getStatus()).as("Invalid status code").isEqualTo(500);
assertThat(response.getErrorMessage()).isEqualTo("Missing URI template variable 'foo' for method parameter of type String");
assertThat(response.getErrorMessage())
.isEqualTo("Required URI template variable 'foo' for method parameter type String is not present");
}
@Test
@ -106,7 +107,8 @@ public class DefaultHandlerExceptionResolverTests { @@ -106,7 +107,8 @@ public class DefaultHandlerExceptionResolverTests {
assertThat(mav).as("No ModelAndView returned").isNotNull();
assertThat(mav.isEmpty()).as("No Empty ModelAndView returned").isTrue();
assertThat(response.getStatus()).as("Invalid status code").isEqualTo(400);
assertThat(response.getErrorMessage()).isEqualTo("Required bar parameter 'foo' is not present");
assertThat(response.getErrorMessage()).isEqualTo(
"Required request parameter 'foo' for method parameter type bar is not present");
}
@Test

Loading…
Cancel
Save