Skip to content

Commit f2e8a94

Browse files
Nazukin-Dmitrygithub-actions[bot]velo
authored
Polish static nested test classes (#2531)
* Polish static nested test classes -Remove @nested annotaion -Some renaming to follow test naming convention -Setup maven-surefire-plugin to execute tatic nested test classes * Update pom.xml Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: Dmitrii Nazukin <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Marvin <[email protected]>
1 parent c9499c4 commit f2e8a94

4 files changed

Lines changed: 8 additions & 20 deletions

File tree

core/src/test/java/feign/EnumForNameTest.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 The Feign Authors
2+
* Copyright 2012-2024 The Feign Authors
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
55
* in compliance with the License. You may obtain a copy of the License at
@@ -16,15 +16,13 @@
1616
import static feign.Util.enumForName;
1717
import static org.assertj.core.api.Assertions.assertThat;
1818
import java.util.Arrays;
19-
import org.junit.jupiter.api.Nested;
2019
import org.junit.jupiter.params.ParameterizedTest;
2120
import org.junit.jupiter.params.provider.MethodSource;
2221
import feign.Request.ProtocolVersion;
2322

2423
public class EnumForNameTest {
2524

26-
@Nested
27-
public static class KnownEnumValues {
25+
public static class KnownEnumValuesTest {
2826
public Object name;
2927
public ProtocolVersion expectedProtocolVersion;
3028

@@ -54,8 +52,7 @@ public void initKnownEnumValues(Object name, ProtocolVersion expectedProtocolVer
5452

5553
}
5654

57-
@Nested
58-
public static class UnknownEnumValues {
55+
public static class UnknownEnumValuesTest {
5956

6057
public Object name;
6158

core/src/test/java/feign/LoggerTest.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ String login(@Param("customer_name") String customer,
4545
@Param("password") String password);
4646
}
4747

48-
@Nested
4948
public static class LogLevelEmitsTest extends LoggerTest {
5049

5150
private Level logLevel;
@@ -98,8 +97,7 @@ void levelEmits(Level logLevel, List<String> expectedMessages) {
9897
}
9998
}
10099

101-
@Nested
102-
public static class ReasonPhraseOptional extends LoggerTest {
100+
public static class ReasonPhraseOptionalTest extends LoggerTest {
103101

104102
private Level logLevel;
105103

@@ -128,7 +126,6 @@ void reasonPhraseOptional(Level logLevel, List<String> expectedMessages) {
128126
}
129127
}
130128

131-
@Nested
132129
public static class HttpProtocolVersionTest extends LoggerTest {
133130

134131
private Level logLevel;
@@ -174,7 +171,6 @@ void httpProtocolVersion(Level logLevel,
174171
}
175172
}
176173

177-
@Nested
178174
public static class ReadTimeoutEmitsTest extends LoggerTest {
179175

180176
private Level logLevel;
@@ -231,7 +227,6 @@ public Retryer clone() {
231227
}
232228
}
233229

234-
@Nested
235230
public static class UnknownHostEmitsTest extends LoggerTest {
236231

237232
private Level logLevel;
@@ -283,7 +278,6 @@ public Retryer clone() {
283278
}
284279
}
285280

286-
@Nested
287281
public static class FormatCharacterTest extends LoggerTest {
288282

289283
private Level logLevel;
@@ -335,7 +329,6 @@ public Retryer clone() {
335329
}
336330
}
337331

338-
@Nested
339332
public static class RetryEmitsTest extends LoggerTest {
340333

341334
private Level logLevel;

core/src/test/java/feign/MethodInfoTest.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 The Feign Authors
2+
* Copyright 2012-2024 The Feign Authors
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
55
* in compliance with the License. You may obtain a copy of the License at
@@ -18,14 +18,12 @@
1818
import java.lang.reflect.Type;
1919
import java.util.List;
2020
import java.util.concurrent.CompletableFuture;
21-
import org.junit.jupiter.api.Nested;
2221
import org.junit.jupiter.api.Test;
2322

2423

2524

2625
public class MethodInfoTest {
2726

28-
@Nested
2927
static class AsyncClientTest {
3028
public interface AsyncClient {
3129
CompletableFuture<String> log();
@@ -39,7 +37,6 @@ void completableFutureOfString() throws Exception {
3937
}
4038
}
4139

42-
@Nested
4340
static class GenericAsyncClientTest {
4441
public interface GenericAsyncClient<T> {
4542
T log();
@@ -56,7 +53,6 @@ void genericCompletableFutureOfString() throws Exception {
5653
}
5754
}
5855

59-
@Nested
6056
static class SyncClientTest {
6157
public interface SyncClient {
6258
String log();
@@ -70,7 +66,6 @@ void string() throws Exception {
7066
}
7167
}
7268

73-
@Nested
7469
static class GenericSyncClientTest {
7570
public interface GenericSyncClient<T> {
7671
T log();

pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,9 @@
479479
<redirectTestOutputToFile>true</redirectTestOutputToFile>
480480
<trimStackTrace>false</trimStackTrace>
481481
<argLine>${jvm.options}</argLine>
482+
<excludes>
483+
<exclude></exclude>
484+
</excludes>
482485
</configuration>
483486
</plugin>
484487

0 commit comments

Comments
 (0)