Polish
This commit is contained in:
@@ -54,11 +54,11 @@ class JsonLoader {
|
||||
if (source == null) {
|
||||
return null;
|
||||
}
|
||||
String string = source.toString();
|
||||
if (string.endsWith(".json")) {
|
||||
return getJson(new ClassPathResource(string, this.resourceLoadClass));
|
||||
String jsonSource = source.toString();
|
||||
if (jsonSource.endsWith(".json")) {
|
||||
return getJson(new ClassPathResource(jsonSource, this.resourceLoadClass));
|
||||
}
|
||||
return string;
|
||||
return jsonSource;
|
||||
}
|
||||
|
||||
String getJson(Resource source) {
|
||||
|
||||
@@ -69,8 +69,9 @@ public class UriAssert extends AbstractStringAssert<UriAssert> {
|
||||
* assertThat(uri).matchPattern("/orders/*"));
|
||||
* </code></pre>
|
||||
* @param uriPattern the pattern that is expected to match
|
||||
* @see AntPathMatcher
|
||||
*/
|
||||
public UriAssert matchesPattern(String uriPattern) {
|
||||
public UriAssert matchesAntPattern(String uriPattern) {
|
||||
Assertions.assertThat(pathMatcher.isPattern(uriPattern))
|
||||
.withFailMessage("'%s' is not an Ant-style path pattern", uriPattern).isTrue();
|
||||
Assertions.assertThat(pathMatcher.match(uriPattern, this.actual))
|
||||
|
||||
@@ -104,7 +104,7 @@ public abstract class AbstractHttpServletRequestAssert<SELF extends AbstractHttp
|
||||
*/
|
||||
public SELF hasAsyncStarted(boolean started) {
|
||||
Assertions.assertThat(this.actual.isAsyncStarted())
|
||||
.withFailMessage("Async expected %sto have started", (started ? "" : "not "))
|
||||
.withFailMessage("Async expected %s have started", (started ? "to" : "not to"))
|
||||
.isEqualTo(started);
|
||||
return this.myself;
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ public class CookieMapAssert extends AbstractMapAssert<CookieMapAssert, Map<Stri
|
||||
|
||||
/**
|
||||
* Verify that the actual cookies contain a cookie with the given {@code name}
|
||||
* whose {@linkplain Cookie#getValue() value} is equal to the expected value.
|
||||
* whose {@linkplain Cookie#getValue() value} is equal to the given one.
|
||||
* @param name the name of the cookie
|
||||
* @param expected the expected value of the cookie
|
||||
*/
|
||||
@@ -109,7 +109,7 @@ public class CookieMapAssert extends AbstractMapAssert<CookieMapAssert, Map<Stri
|
||||
|
||||
/**
|
||||
* Verify that the actual cookies contain a cookie with the given {@code name}
|
||||
* whose {@linkplain Cookie#getMaxAge() max age} is equal to the expected value.
|
||||
* whose {@linkplain Cookie#getMaxAge() max age} is equal to the given one.
|
||||
* @param name the name of the cookie
|
||||
* @param expected the expected max age of the cookie
|
||||
*/
|
||||
@@ -120,7 +120,7 @@ public class CookieMapAssert extends AbstractMapAssert<CookieMapAssert, Map<Stri
|
||||
|
||||
/**
|
||||
* Verify that the actual cookies contain a cookie with the given {@code name}
|
||||
* whose {@linkplain Cookie#getPath() path} is equal to the expected value.
|
||||
* whose {@linkplain Cookie#getPath() path} is equal to the given one.
|
||||
* @param name the name of the cookie
|
||||
* @param expected the expected path of the cookie
|
||||
*/
|
||||
@@ -131,7 +131,7 @@ public class CookieMapAssert extends AbstractMapAssert<CookieMapAssert, Map<Stri
|
||||
|
||||
/**
|
||||
* Verify that the actual cookies contain a cookie with the given {@code name}
|
||||
* whose {@linkplain Cookie#getDomain() domain} is equal to the expected value.
|
||||
* whose {@linkplain Cookie#getDomain() domain} is equal to the given one.
|
||||
* @param name the name of the cookie
|
||||
* @param expected the expected domain of the cookie
|
||||
*/
|
||||
@@ -142,8 +142,7 @@ public class CookieMapAssert extends AbstractMapAssert<CookieMapAssert, Map<Stri
|
||||
|
||||
/**
|
||||
* Verify that the actual cookies contain a cookie with the given {@code name}
|
||||
* whose {@linkplain Cookie#getSecure() secure flag} is equal to the expected
|
||||
* value.
|
||||
* whose {@linkplain Cookie#getSecure() secure flag} is equal to the give one.
|
||||
* @param name the name of the cookie
|
||||
* @param expected whether the cookie is secure
|
||||
*/
|
||||
@@ -154,8 +153,8 @@ public class CookieMapAssert extends AbstractMapAssert<CookieMapAssert, Map<Stri
|
||||
|
||||
/**
|
||||
* Verify that the actual cookies contain a cookie with the given {@code name}
|
||||
* whose {@linkplain Cookie#isHttpOnly() http only flag} is equal to the
|
||||
* expected value.
|
||||
* whose {@linkplain Cookie#isHttpOnly() http only flag} is equal to the given
|
||||
* one.
|
||||
* @param name the name of the cookie
|
||||
* @param expected whether the cookie is http only
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user