Polish
This commit is contained in:
@@ -210,7 +210,7 @@ class MockRestRequestMatchersTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void headerListDoesntHideHeaderWithSingleMatcher() throws IOException {
|
||||
void headerListDoesNotHideHeaderWithSingleMatcher() throws IOException {
|
||||
this.request.getHeaders().put("foo", List.of("bar", "baz"));
|
||||
|
||||
MockRestRequestMatchers.header("foo", equalTo("bar")).match(this.request);
|
||||
@@ -340,7 +340,7 @@ class MockRestRequestMatchersTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void queryParamListDoesntHideQueryParamWithSingleMatcher() throws IOException {
|
||||
void queryParamListDoesNotHideQueryParamWithSingleMatcher() throws IOException {
|
||||
this.request.setURI(URI.create("http://www.foo.example/a?foo=bar&foo=baz"));
|
||||
|
||||
MockRestRequestMatchers.queryParam("foo", equalTo("bar")).match(this.request);
|
||||
|
||||
@@ -596,7 +596,7 @@ class MockHttpServletRequestBuilderTests {
|
||||
}
|
||||
|
||||
|
||||
private final class User implements Principal {
|
||||
private static final class User implements Principal {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
|
||||
@@ -34,7 +34,7 @@ public class FlashAttributeResultMatchersTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void attributeExists_doesntExist() {
|
||||
public void attributeExists_DoesNotExist() {
|
||||
assertThatExceptionOfType(AssertionError.class).isThrownBy(() ->
|
||||
new FlashAttributeResultMatchers().attributeExists("bad").match(getStubMvcResult()));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2024 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.
|
||||
@@ -138,7 +138,7 @@ class ControllerAdviceIntegrationTests {
|
||||
static final AtomicInteger instanceCount = new AtomicInteger();
|
||||
static final AtomicInteger invocationCount = new AtomicInteger();
|
||||
|
||||
{
|
||||
SingletonControllerAdvice() {
|
||||
instanceCount.incrementAndGet();
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ class ControllerAdviceIntegrationTests {
|
||||
static final AtomicInteger instanceCount = new AtomicInteger();
|
||||
static final AtomicInteger invocationCount = new AtomicInteger();
|
||||
|
||||
{
|
||||
PrototypeControllerAdvice() {
|
||||
instanceCount.incrementAndGet();
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ class ControllerAdviceIntegrationTests {
|
||||
static final AtomicInteger instanceCount = new AtomicInteger();
|
||||
static final AtomicInteger invocationCount = new AtomicInteger();
|
||||
|
||||
{
|
||||
RequestScopedControllerAdvice() {
|
||||
instanceCount.incrementAndGet();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
* Copyright 2002-2024 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.
|
||||
@@ -184,30 +184,8 @@ public class ExceptionHandlerTests {
|
||||
}
|
||||
}
|
||||
|
||||
static class Person {
|
||||
record Person(String name) {}
|
||||
|
||||
private final String name;
|
||||
|
||||
Person(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
static class Error {
|
||||
|
||||
private final String error;
|
||||
|
||||
Error(String error) {
|
||||
this.error = error;
|
||||
}
|
||||
|
||||
public String getError() {
|
||||
return error;
|
||||
}
|
||||
}
|
||||
record Error(String error) {}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user