Skip to content

Commit f3e21be

Browse files
committed
Removed unnecessary code from the unit test as it was affecting other unit test.
1 parent fe398e6 commit f3e21be

File tree

4 files changed

+0
-20
lines changed

4 files changed

+0
-20
lines changed

springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app171/HelloLocaleController.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public void persons(@Valid @NotBlank String name) {
3636
}
3737

3838
@GetMapping("/test")
39-
@Tag(name = "lang.change")
4039
public HttpEntity<String> demo2() {
4140
return null;
4241
}

springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app171/SpringDocApp171Test.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,9 @@
2929
import org.junit.jupiter.api.Test;
3030
import org.springdoc.core.Constants;
3131
import org.springframework.boot.autoconfigure.SpringBootApplication;
32-
import org.springframework.context.annotation.Bean;
3332
import org.springframework.http.HttpHeaders;
3433
import org.springframework.test.context.TestPropertySource;
3534
import org.springframework.test.web.servlet.MvcResult;
36-
import org.springframework.web.servlet.LocaleResolver;
37-
import org.springframework.web.servlet.i18n.SessionLocaleResolver;
3835

3936
import test.org.springdoc.api.AbstractSpringDocTest;
4037

@@ -45,12 +42,6 @@ public class SpringDocApp171Test extends AbstractSpringDocTest {
4542
static class SpringDocTestApp {
4643
}
4744

48-
@Bean
49-
public LocaleResolver localeResolver() {
50-
SessionLocaleResolver localeResolver = new SessionLocaleResolver();
51-
return localeResolver;
52-
}
53-
5445
@Test
5546
@Override
5647
public void testApp() throws Exception {
@@ -59,8 +50,6 @@ public void testApp() throws Exception {
5950
}
6051

6152
private void testApp(Locale locale) throws Exception {
62-
Locale.setDefault(locale);
63-
6453
className = getClass().getSimpleName();
6554
String testNumber = className.replaceAll("[^0-9]", "");
6655
MvcResult mockMvcResult =

springdoc-openapi-webmvc-core/src/test/resources/results/app171-en.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,12 @@
1414
{
1515
"name": "Hello! Welcome to our website!",
1616
"description": "This is a test message"
17-
},
18-
{
19-
"name": "Change the language"
2017
}
2118
],
2219
"paths": {
2320
"/test": {
2421
"get": {
2522
"tags": [
26-
"Change the language",
2723
"Hello! Welcome to our website!"
2824
],
2925
"operationId": "demo2",

springdoc-openapi-webmvc-core/src/test/resources/results/app171-fr.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
}
1212
],
1313
"tags": [
14-
{
15-
"name": "Change the language[FR]"
16-
},
1714
{
1815
"name": "Hello! Welcome to our website![FR]",
1916
"description": "This is a test message[FR]"
@@ -23,7 +20,6 @@
2320
"/test": {
2421
"get": {
2522
"tags": [
26-
"Change the language[FR]",
2723
"Hello! Welcome to our website![FR]"
2824
],
2925
"operationId": "demo2",

0 commit comments

Comments
 (0)