Skip to content

Commit b651c10

Browse files
committed
Fix error messages to match commit #1a9556
See gh-26679
1 parent 5651695 commit b651c10

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -96,7 +96,8 @@ public void handleMissingPathVariable() throws NoSuchMethodException {
9696
assertThat(mav).as("No ModelAndView returned").isNotNull();
9797
assertThat(mav.isEmpty()).as("No Empty ModelAndView returned").isTrue();
9898
assertThat(response.getStatus()).as("Invalid status code").isEqualTo(500);
99-
assertThat(response.getErrorMessage()).isEqualTo("Missing URI template variable 'foo' for method parameter of type String");
99+
assertThat(response.getErrorMessage())
100+
.isEqualTo("Required URI template variable 'foo' for method parameter type String is not present");
100101
}
101102

102103
@Test
@@ -106,7 +107,8 @@ public void handleMissingServletRequestParameter() {
106107
assertThat(mav).as("No ModelAndView returned").isNotNull();
107108
assertThat(mav.isEmpty()).as("No Empty ModelAndView returned").isTrue();
108109
assertThat(response.getStatus()).as("Invalid status code").isEqualTo(400);
109-
assertThat(response.getErrorMessage()).isEqualTo("Required bar parameter 'foo' is not present");
110+
assertThat(response.getErrorMessage()).isEqualTo(
111+
"Required request parameter 'foo' for method parameter type bar is not present");
110112
}
111113

112114
@Test

0 commit comments

Comments
 (0)