提交 b651c10e 编写于 作者: R Rossen Stoyanchev

Fix error messages to match commit #1a9556

See gh-26679
上级 5651695f
/*
* 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 {
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 {
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册