Simplify ControllerAdviceBean constructors
See gh-23163
This commit is contained in:
@@ -51,15 +51,15 @@ public class ControllerAdviceBeanTests {
|
||||
|
||||
assertThatIllegalArgumentException()
|
||||
.isThrownBy(() -> new ControllerAdviceBean((String) null, null))
|
||||
.withMessage("Bean must not be null");
|
||||
.withMessage("Bean name must contain text");
|
||||
|
||||
assertThatIllegalArgumentException()
|
||||
.isThrownBy(() -> new ControllerAdviceBean("", null))
|
||||
.withMessage("Bean name must not be empty");
|
||||
.withMessage("Bean name must contain text");
|
||||
|
||||
assertThatIllegalArgumentException()
|
||||
.isThrownBy(() -> new ControllerAdviceBean("\t", null))
|
||||
.withMessage("Bean name must not be empty");
|
||||
.withMessage("Bean name must contain text");
|
||||
|
||||
assertThatIllegalArgumentException()
|
||||
.isThrownBy(() -> new ControllerAdviceBean("myBean", null))
|
||||
|
||||
Reference in New Issue
Block a user