mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-05-04 05:17:15 +01:00
Throw AssertionError instead of IAE in MockRestRequestMatchers
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 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.
|
||||
@@ -147,7 +147,7 @@ public abstract class MockRestRequestMatchers {
|
||||
List<String> values = map.get(name);
|
||||
|
||||
String message = "Expected " + valueType + " <" + name + ">";
|
||||
Assert.notNull(values, message);
|
||||
assertTrue(message + " to exist but was null", values != null);
|
||||
|
||||
assertTrue(message + " to have at least <" + count + "> values but found " + values,
|
||||
count <= values.size());
|
||||
|
||||
Reference in New Issue
Block a user