Skip to content

Commit bb51860

Browse files
Unify test class names
1 parent d4571d0 commit bb51860

23 files changed

Lines changed: 82 additions & 84 deletions

problem4j-spring-web/src/main/java/io/github/problem4j/spring/web/parameter/DefaultBindingResultSupport.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ public List<Violation> fetchViolations(BindingResult result) {
3333
*
3434
* <p>{@code isBindingFailure() == true} usually means that there was a failure in creation of
3535
* object from values taken out of request. Most common one is validation error or type mismatch
36-
* between {@code @ModelAttribute}-annotated argument and one of its values. Consider running
37-
* {@code WebExchangeBindExceptionWebFluxTest} or {@code MethodArgumentNotValidExceptionMvcTest}
38-
* to debug this feature.
36+
* between {@code @ModelAttribute}-annotated argument and one of its values.
3937
*
4038
* @param bindingResult the {@link BindingResult} containing the validation errors
4139
* @param error the {@link FieldError} to convert

problem4j-spring-webmvc/src/test/java/io/github/problem4j/spring/webmvc/app/MvcTestApp.java renamed to problem4j-spring-webmvc/src/test/java/io/github/problem4j/spring/webmvc/app/WebMvcTestApp.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import org.springframework.boot.autoconfigure.SpringBootApplication;
2020

2121
@SpringBootApplication
22-
public class MvcTestApp {
22+
public class WebMvcTestApp {
2323

2424
@PostConstruct
2525
public void postConstruct() {

problem4j-spring-webmvc/src/test/java/io/github/problem4j/spring/webmvc/autoconfigure/ProblemErrorMvcConfigurationTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import static org.assertj.core.api.Assertions.assertThat;
1818

1919
import io.github.problem4j.spring.webmvc.ProblemErrorController;
20-
import io.github.problem4j.spring.webmvc.app.MvcTestApp;
20+
import io.github.problem4j.spring.webmvc.app.WebMvcTestApp;
2121
import org.junit.jupiter.api.Nested;
2222
import org.junit.jupiter.api.Test;
2323
import org.springframework.beans.factory.annotation.Autowired;
@@ -26,7 +26,7 @@
2626

2727
class ProblemErrorMvcConfigurationTest {
2828

29-
@SpringBootTest(classes = {MvcTestApp.class})
29+
@SpringBootTest(classes = {WebMvcTestApp.class})
3030
@Nested
3131
class WithEnabled {
3232

@@ -46,7 +46,7 @@ void contextLoads() {
4646
}
4747

4848
@SpringBootTest(
49-
classes = {MvcTestApp.class},
49+
classes = {WebMvcTestApp.class},
5050
properties = {"problem4j.webmvc.error-controller.enabled=false"})
5151
@Nested
5252
class WithDisabled {

problem4j-spring-webmvc/src/test/java/io/github/problem4j/spring/webmvc/autoconfigure/ProblemWebMvcAutoConfigurationTest.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import io.github.problem4j.spring.webmvc.ExceptionWebMvcAdvice;
2020
import io.github.problem4j.spring.webmvc.ProblemContextWebMvcFilter;
2121
import io.github.problem4j.spring.webmvc.ProblemExceptionWebMvcAdvice;
22-
import io.github.problem4j.spring.webmvc.app.MvcTestApp;
22+
import io.github.problem4j.spring.webmvc.app.WebMvcTestApp;
2323
import org.junit.jupiter.api.Nested;
2424
import org.junit.jupiter.api.Test;
2525
import org.springframework.beans.factory.annotation.Autowired;
@@ -28,7 +28,7 @@
2828

2929
class ProblemWebMvcAutoConfigurationTest {
3030

31-
@SpringBootTest(classes = {MvcTestApp.class})
31+
@SpringBootTest(classes = {WebMvcTestApp.class})
3232
@Nested
3333
class WithEnabled {
3434

@@ -54,7 +54,7 @@ void contextLoads() {
5454
}
5555

5656
@SpringBootTest(
57-
classes = {MvcTestApp.class},
57+
classes = {WebMvcTestApp.class},
5858
properties = {"problem4j.webmvc.enabled=false"})
5959
@Nested
6060
class WithDisabled {
@@ -81,7 +81,7 @@ void contextLoadsWithoutConfiguration() {
8181
}
8282
}
8383

84-
@SpringBootTest(classes = {MvcTestApp.class})
84+
@SpringBootTest(classes = {WebMvcTestApp.class})
8585
@Nested
8686
class WithExceptionAdviceEnabled {
8787

@@ -98,7 +98,7 @@ void contextLoadsWithoutExceptionAdvice() {
9898
}
9999

100100
@SpringBootTest(
101-
classes = {MvcTestApp.class},
101+
classes = {WebMvcTestApp.class},
102102
properties = {"problem4j.webmvc.exception-advice.enabled=false"})
103103
@Nested
104104
class WithExceptionAdviceDisabled {
@@ -115,7 +115,7 @@ void contextLoadsWithoutExceptionAdvice() {
115115
}
116116
}
117117

118-
@SpringBootTest(classes = {MvcTestApp.class})
118+
@SpringBootTest(classes = {WebMvcTestApp.class})
119119
@Nested
120120
class WithProblemExceptionAdviceEnabled {
121121

@@ -132,7 +132,7 @@ void contextLoadsWithoutExceptionAdvice() {
132132
}
133133

134134
@SpringBootTest(
135-
classes = {MvcTestApp.class},
135+
classes = {WebMvcTestApp.class},
136136
properties = {"problem4j.webmvc.problem-exception-advice.enabled=false"})
137137
@Nested
138138
class WithProblemExceptionAdviceDisabled {
@@ -149,7 +149,7 @@ void contextLoadsWithoutExceptionAdvice() {
149149
}
150150
}
151151

152-
@SpringBootTest(classes = {MvcTestApp.class})
152+
@SpringBootTest(classes = {WebMvcTestApp.class})
153153
@Nested
154154
class WithProblemContextFilterEnabled {
155155

@@ -167,7 +167,7 @@ void contextLoadsWithoutExceptionAdvice() {
167167
}
168168

169169
@SpringBootTest(
170-
classes = {MvcTestApp.class},
170+
classes = {WebMvcTestApp.class},
171171
properties = {"problem4j.webmvc.problem-context-filter.enabled=false"})
172172
@Nested
173173
class WithProblemContextFilterDisabled {
@@ -184,7 +184,7 @@ void contextLoadsWithoutExceptionAdvice() {
184184
}
185185
}
186186

187-
@SpringBootTest(classes = {MvcTestApp.class})
187+
@SpringBootTest(classes = {WebMvcTestApp.class})
188188
@Nested
189189
class WithExceptionHandlerEnabled {
190190

@@ -201,7 +201,7 @@ void contextLoadsWithoutExceptionAdvice() {
201201
}
202202

203203
@SpringBootTest(
204-
classes = {MvcTestApp.class},
204+
classes = {WebMvcTestApp.class},
205205
properties = {"problem4j.webmvc.exception-handler.enabled=false"})
206206
@Nested
207207
class WithExceptionHandlerDisabled {

problem4j-spring-webmvc/src/test/java/io/github/problem4j/spring/webmvc/integration/ErrorResponseMvcTest.java renamed to problem4j-spring-webmvc/src/test/java/io/github/problem4j/spring/webmvc/integration/ErrorResponseWebMvcTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import com.fasterxml.jackson.databind.ObjectMapper;
2020
import io.github.problem4j.core.Problem;
2121
import io.github.problem4j.core.ProblemStatus;
22-
import io.github.problem4j.spring.webmvc.app.MvcTestApp;
22+
import io.github.problem4j.spring.webmvc.app.WebMvcTestApp;
2323
import org.junit.jupiter.api.Test;
2424
import org.springframework.beans.factory.annotation.Autowired;
2525
import org.springframework.boot.test.context.SpringBootTest;
@@ -28,9 +28,9 @@
2828
import org.springframework.http.ResponseEntity;
2929

3030
@SpringBootTest(
31-
classes = {MvcTestApp.class},
31+
classes = {WebMvcTestApp.class},
3232
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
33-
class ErrorResponseMvcTest {
33+
class ErrorResponseWebMvcTest {
3434

3535
@Autowired private TestRestTemplate restTemplate;
3636
@Autowired private ObjectMapper objectMapper;

problem4j-spring-webmvc/src/test/java/io/github/problem4j/spring/webmvc/integration/MalformedMultipartMvcTest.java renamed to problem4j-spring-webmvc/src/test/java/io/github/problem4j/spring/webmvc/integration/MalformedMultipartWebMvcTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import com.fasterxml.jackson.databind.ObjectMapper;
2222
import io.github.problem4j.core.Problem;
2323
import io.github.problem4j.core.ProblemStatus;
24-
import io.github.problem4j.spring.webmvc.app.MvcTestApp;
24+
import io.github.problem4j.spring.webmvc.app.WebMvcTestApp;
2525
import org.junit.jupiter.api.Test;
2626
import org.springframework.beans.factory.annotation.Autowired;
2727
import org.springframework.boot.test.context.SpringBootTest;
@@ -35,9 +35,9 @@
3535
import org.springframework.util.MultiValueMap;
3636

3737
@SpringBootTest(
38-
classes = {MvcTestApp.class},
38+
classes = {WebMvcTestApp.class},
3939
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
40-
class MalformedMultipartMvcTest {
40+
class MalformedMultipartWebMvcTest {
4141

4242
@Autowired private TestRestTemplate restTemplate;
4343
@Autowired private ObjectMapper objectMapper;

problem4j-spring-webmvc/src/test/java/io/github/problem4j/spring/webmvc/integration/MaxUploadSizeExceededMvcTest.java renamed to problem4j-spring-webmvc/src/test/java/io/github/problem4j/spring/webmvc/integration/MaxUploadSizeExceededWebMvcTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import com.fasterxml.jackson.databind.ObjectMapper;
2121
import io.github.problem4j.core.Problem;
2222
import io.github.problem4j.core.ProblemStatus;
23-
import io.github.problem4j.spring.webmvc.app.MvcTestApp;
23+
import io.github.problem4j.spring.webmvc.app.WebMvcTestApp;
2424
import org.junit.jupiter.api.Test;
2525
import org.springframework.beans.factory.annotation.Autowired;
2626
import org.springframework.boot.test.context.SpringBootTest;
@@ -35,13 +35,13 @@
3535
import org.springframework.util.MultiValueMap;
3636

3737
@SpringBootTest(
38-
classes = {MvcTestApp.class},
38+
classes = {WebMvcTestApp.class},
3939
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
4040
properties = {
4141
"spring.servlet.multipart.max-file-size=1KB",
4242
"spring.servlet.multipart.max-request-size=1KB"
4343
})
44-
class MaxUploadSizeExceededMvcTest {
44+
class MaxUploadSizeExceededWebMvcTest {
4545

4646
@Autowired private TestRestTemplate restTemplate;
4747
@Autowired private ObjectMapper objectMapper;

problem4j-spring-webmvc/src/test/java/io/github/problem4j/spring/webmvc/integration/MethodArgumentNotValidMvcTest.java renamed to problem4j-spring-webmvc/src/test/java/io/github/problem4j/spring/webmvc/integration/MethodArgumentNotValidWebMvcTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import com.fasterxml.jackson.databind.ObjectMapper;
2323
import io.github.problem4j.core.Problem;
2424
import io.github.problem4j.core.ProblemStatus;
25-
import io.github.problem4j.spring.webmvc.app.MvcTestApp;
25+
import io.github.problem4j.spring.webmvc.app.WebMvcTestApp;
2626
import java.util.List;
2727
import java.util.Map;
2828
import org.junit.jupiter.api.Test;
@@ -33,9 +33,9 @@
3333
import org.springframework.http.ResponseEntity;
3434

3535
@SpringBootTest(
36-
classes = {MvcTestApp.class},
36+
classes = {WebMvcTestApp.class},
3737
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
38-
class MethodArgumentNotValidMvcTest {
38+
class MethodArgumentNotValidWebMvcTest {
3939

4040
@Autowired private TestRestTemplate restTemplate;
4141
@Autowired private ObjectMapper objectMapper;

problem4j-spring-webmvc/src/test/java/io/github/problem4j/spring/webmvc/integration/MethodNotAllowedMvcTest.java renamed to problem4j-spring-webmvc/src/test/java/io/github/problem4j/spring/webmvc/integration/MethodNotAllowedWebMvcTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import com.fasterxml.jackson.databind.ObjectMapper;
2020
import io.github.problem4j.core.Problem;
2121
import io.github.problem4j.core.ProblemStatus;
22-
import io.github.problem4j.spring.webmvc.app.MvcTestApp;
22+
import io.github.problem4j.spring.webmvc.app.WebMvcTestApp;
2323
import org.junit.jupiter.api.Test;
2424
import org.springframework.beans.factory.annotation.Autowired;
2525
import org.springframework.boot.test.context.SpringBootTest;
@@ -28,9 +28,9 @@
2828
import org.springframework.http.ResponseEntity;
2929

3030
@SpringBootTest(
31-
classes = {MvcTestApp.class},
31+
classes = {WebMvcTestApp.class},
3232
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
33-
class MethodNotAllowedMvcTest {
33+
class MethodNotAllowedWebMvcTest {
3434

3535
@Autowired private TestRestTemplate restTemplate;
3636
@Autowired private ObjectMapper objectMapper;

problem4j-spring-webmvc/src/test/java/io/github/problem4j/spring/webmvc/integration/MissingParameterMvcTest.java renamed to problem4j-spring-webmvc/src/test/java/io/github/problem4j/spring/webmvc/integration/MissingParameterWebMvcTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import com.fasterxml.jackson.databind.ObjectMapper;
3333
import io.github.problem4j.core.Problem;
3434
import io.github.problem4j.core.ProblemStatus;
35-
import io.github.problem4j.spring.webmvc.app.MvcTestApp;
35+
import io.github.problem4j.spring.webmvc.app.WebMvcTestApp;
3636
import org.junit.jupiter.api.Test;
3737
import org.springframework.beans.factory.annotation.Autowired;
3838
import org.springframework.boot.test.context.SpringBootTest;
@@ -48,9 +48,9 @@
4848
import org.springframework.util.MultiValueMap;
4949

5050
@SpringBootTest(
51-
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
52-
classes = {MvcTestApp.class})
53-
class MissingParameterMvcTest {
51+
classes = {WebMvcTestApp.class},
52+
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
53+
class MissingParameterWebMvcTest {
5454

5555
@Autowired private TestRestTemplate restTemplate;
5656
@Autowired private ObjectMapper objectMapper;

0 commit comments

Comments
 (0)