Skip to content

Commit

Permalink
[WIP] add junit jupiter (#12024)
Browse files Browse the repository at this point in the history
* add junit5 in compatible mode

* add junit5 jupiter and mockito jupiter
  • Loading branch information
shalk authored Apr 29, 2024
1 parent b016e79 commit b2e506d
Showing 1 changed file with 33 additions and 25 deletions.
58 changes: 33 additions & 25 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@
<apache-rat-plugin.version>0.12</apache-rat-plugin.version>
<maven-resources-plugin.version>3.0.2</maven-resources-plugin.version>
<jacoco-maven-plugin.version>0.8.7</jacoco-maven-plugin.version>
<maven-surefire-plugin.version>2.20</maven-surefire-plugin.version>
<maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
<findbugs-maven-plugin.version>3.0.4</findbugs-maven-plugin.version>
<sonar-maven-plugin.version>3.0.2</sonar-maven-plugin.version>
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
<maven-failsafe-plugin.version>2.19.1</maven-failsafe-plugin.version>
<maven-failsafe-plugin.version>3.2.5</maven-failsafe-plugin.version>
<maven-assembly-plugin.version>3.0.0</maven-assembly-plugin.version>
<maven-checkstyle-plugin.version>3.1.2</maven-checkstyle-plugin.version>
<maven-easyj-version>1.1.5</maven-easyj-version>
Expand All @@ -143,14 +143,14 @@
<protobuf-java.version>3.22.3</protobuf-java.version>
<protoc-gen-grpc-java.version>${grpc-java.version}</protoc-gen-grpc-java.version>
<hessian.version>4.0.63</hessian.version>
<mockito-all.version>1.10.19</mockito-all.version>
<mockito-core.version>3.8.0</mockito-core.version>
<mockito.version>4.11.0</mockito.version>
<HikariCP.version>3.4.2</HikariCP.version>
<jraft-core.version>1.3.14</jraft-core.version>
<rpc-grpc-impl.version>${jraft-core.version}</rpc-grpc-impl.version>
<SnakeYaml.version>2.0</SnakeYaml.version>
<spring.version>5.3.34</spring.version>
<spring-security.version>5.7.12</spring-security.version>
<junit5.version>5.10.2</junit5.version>
</properties>
<!-- == -->
<!-- =========================================================Build plugins================================================ -->
Expand Down Expand Up @@ -620,12 +620,21 @@

<!-- Default dependencies in all subprojects -->
<dependencies>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand All @@ -636,29 +645,45 @@
<artifactId>mockito-inline</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<!-- Manage the version numbers of dependencies,
sub-modules will not introduce these dependencies by default -->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>${junit5.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-bom</artifactId>
<version>${mockito.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-framework-bom</artifactId>
<version>${spring.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>

<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-bom</artifactId>
<version>${spring-security.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>

<dependency>
<!-- Import dependency management from Spring Boot -->
<groupId>org.springframework.boot</groupId>
Expand Down Expand Up @@ -976,23 +1001,6 @@
<version>${protobuf-java.version}</version>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>${mockito-all.version}</version>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito-core.version}</version>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>${mockito-core.version}</version>
</dependency>

<dependency>
<groupId>com.google.code.gson</groupId>
Expand Down

0 comments on commit b2e506d

Please sign in to comment.