Skip to content

Commit

Permalink
Fix error messages to match commit #1a9556
Browse files Browse the repository at this point in the history
  • Loading branch information
rstoyanchev authored and lxbzmy committed Mar 26, 2022
1 parent d11a200 commit 7b69aec
Showing 1 changed file with 5 additions and 3 deletions.
@@ -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.
Expand Down Expand Up @@ -96,7 +96,8 @@ public void handleMissingPathVariable() throws NoSuchMethodException {
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
Expand All @@ -106,7 +107,8 @@ public void handleMissingServletRequestParameter() {
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
Expand Down

0 comments on commit 7b69aec

Please sign in to comment.