Skip to content

Commit bfc95e9

Browse files
committed
Raise the minimum supported version of JUnit to 6.0
This commit upgrades to JUnit 6.0.0 and removes any references left of previous JUnit versions. Closes gh-1676
1 parent a6494f3 commit bfc95e9

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

spring-ws-platform/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dependencies {
2727
api(platform("org.apache.activemq:activemq-bom:6.1.7"))
2828
api(platform("org.eclipse.jetty:jetty-bom:12.0.23"))
2929
api(platform("org.eclipse.jetty.ee10:jetty-ee10-bom:12.0.23"))
30-
api(platform("org.junit:junit-bom:5.13.3"))
30+
api(platform("org.junit:junit-bom:6.0.0"))
3131
api(platform("org.slf4j:slf4j-bom:2.0.17"))
3232
api(platform("org.springframework:spring-framework-bom:${springFrameworkVersion}"))
3333
api(platform("org.springframework.security:spring-security-bom:7.0.0-SNAPSHOT"))

spring-ws-test/src/main/java/org/springframework/ws/test/client/MockWebServiceServer.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,16 @@
5050
* the mocks.
5151
* <p>
5252
* For example: <pre><code class="java">
53-
* import org.junit.*;
5453
* import org.springframework.beans.factory.annotation.Autowired;
55-
* import org.springframework.test.context.ContextConfiguration;
56-
* import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
54+
* import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
5755
* import org.springframework.xml.transform.StringSource;
56+
5857
* <strong>import org.springframework.ws.test.client.MockWebServiceServer</strong>;
5958
* <strong>import static org.springframework.ws.test.client.RequestMatchers.*</strong>;
6059
* <strong>import static org.springframework.ws.test.client.ResponseCreators.*</strong>;
60+
* import static org.assertj.core.api.Assertions.assertThat;
6161
*
62-
* &#064;RunWith(SpringJUnit4ClassRunner.class)
63-
* &#064;ContextConfiguration("applicationContext.xml")
62+
* &#064;SpringJUnitConfig(locations = "applicationContext.xml")
6463
* public class MyWebServiceClientIntegrationTest {
6564
*
6665
* // MyWebServiceClient extends WebServiceGatewaySupport, and is configured in applicationContext.xml
@@ -86,7 +85,7 @@
8685
*
8786
* // client.getCustomerCount() uses the WebServiceTemplate
8887
* int customerCount = client.getCustomerCount();
89-
* assertEquals(10, response.getCustomerCount());
88+
* assertThat(response.getCustomerCount()).isEqualTo(10);
9089
*
9190
* <strong>mockServer.verify();</strong>
9291
* }

spring-ws-test/src/main/java/org/springframework/ws/test/server/MockWebServiceClient.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,16 @@
5757
* the mocks.
5858
* <p>
5959
* For example: <pre><code class="java">
60-
* import org.junit.*;
6160
* import org.springframework.beans.factory.annotation.Autowired;
6261
* import org.springframework.context.ApplicationContext;
63-
* import org.springframework.test.context.ContextConfiguration;
64-
* import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
62+
* import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
6563
* import org.springframework.xml.transform.StringSource;
64+
*
6665
* <strong>import org.springframework.ws.test.server.MockWebServiceClient</strong>;
6766
* <strong>import static org.springframework.ws.test.server.RequestCreators.*</strong>;
6867
* <strong>import static org.springframework.ws.test.server.ResponseMatchers.*</strong>;
6968
*
70-
* &#064;RunWith(SpringJUnit4ClassRunner.class)
71-
* &#064;ContextConfiguration("applicationContext.xml")
69+
* &#064;SpringJUnitConfig(locations = "applicationContext.xml")
7270
* public class MyWebServiceIntegrationTest {
7371
*
7472
* // a standard MessageDispatcherServlet application context, containing endpoints, mappings, etc.

0 commit comments

Comments
 (0)