Skip to content

Commit ffbc0bf

Browse files
committed
test: add tests
1 parent 878f453 commit ffbc0bf

File tree

25 files changed

+1290
-2310
lines changed

25 files changed

+1290
-2310
lines changed

ddes-open-sdk/pom.xml

Lines changed: 61 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,12 @@
126126
<artifactId>spock-core</artifactId>
127127
<version>${spock.version}</version>
128128
<scope>test</scope>
129+
<exclusions>
130+
<exclusion>
131+
<groupId>org.junit.platform</groupId>
132+
<artifactId>junit-platform-engine</artifactId>
133+
</exclusion>
134+
</exclusions>
129135
</dependency>
130136

131137
<dependency>
@@ -135,6 +141,21 @@
135141
<scope>test</scope>
136142
</dependency>
137143

144+
<!-- JUnit 4 for Spock -->
145+
<dependency>
146+
<groupId>junit</groupId>
147+
<artifactId>junit</artifactId>
148+
<version>4.13.2</version>
149+
<scope>test</scope>
150+
</dependency>
151+
152+
<dependency>
153+
<groupId>org.hamcrest</groupId>
154+
<artifactId>hamcrest-core</artifactId>
155+
<version>2.2</version>
156+
<scope>test</scope>
157+
</dependency>
158+
138159
<dependency>
139160
<groupId>com.squareup.okhttp3</groupId>
140161
<artifactId>okhttp</artifactId>
@@ -154,16 +175,6 @@
154175
<version>${slf4j.version}</version>
155176
</dependency>
156177

157-
<!-- ======= -->
158-
<!-- 测试依赖 -->
159-
<!-- ======= -->
160-
<dependency>
161-
<groupId>org.junit.jupiter</groupId>
162-
<artifactId>junit-jupiter-engine</artifactId>
163-
<version>5.2.0</version>
164-
<scope>test</scope>
165-
</dependency>
166-
167178

168179

169180
</dependencies>
@@ -183,6 +194,46 @@
183194

184195
<build>
185196
<plugins>
197+
<!-- GMavenPlus plugin to compile Groovy test code -->
198+
<plugin>
199+
<groupId>org.codehaus.gmavenplus</groupId>
200+
<artifactId>gmavenplus-plugin</artifactId>
201+
<version>1.13.1</version>
202+
<configuration>
203+
<targetBytecode>1.8</targetBytecode>
204+
</configuration>
205+
<executions>
206+
<execution>
207+
<goals>
208+
<goal>addTestSources</goal>
209+
<goal>compileTests</goal>
210+
</goals>
211+
</execution>
212+
</executions>
213+
<dependencies>
214+
<dependency>
215+
<groupId>org.codehaus.groovy</groupId>
216+
<artifactId>groovy-all</artifactId>
217+
<version>2.5.14</version>
218+
<type>pom</type>
219+
</dependency>
220+
</dependencies>
221+
</plugin>
222+
223+
<!-- Surefire plugin to run JUnit and Spock tests -->
224+
<plugin>
225+
<groupId>org.apache.maven.plugins</groupId>
226+
<artifactId>maven-surefire-plugin</artifactId>
227+
<version>2.22.2</version>
228+
<configuration>
229+
<includes>
230+
<include>**/*Test.java</include>
231+
<include>**/*Test.groovy</include>
232+
<include>**/*Spec.groovy</include>
233+
</includes>
234+
</configuration>
235+
</plugin>
236+
186237
<plugin>
187238
<groupId>org.sonatype.central</groupId>
188239
<artifactId>central-publishing-maven-plugin</artifactId>

ddes-open-sdk/src/test/groovy/com/xiaoju/open/sdk/ddes/service/afterapproval/AfterApprovalTest.groovy

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)