File tree Expand file tree Collapse file tree 5 files changed +41
-0
lines changed
src/test/java/security/aes Expand file tree Collapse file tree 5 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 106106 <groupId >org.openjdk.jmh</groupId >
107107 <artifactId >jmh-generator-annprocess</artifactId >
108108 </dependency >
109+ <dependency >
110+ <groupId >org.junit.jupiter</groupId >
111+ <artifactId >junit-jupiter</artifactId >
112+ <scope >test</scope >
113+ </dependency >
109114
110115 </dependencies >
111116
Original file line number Diff line number Diff line change 55import lombok .extern .slf4j .Slf4j ;
66import org .junit .Assert ;
77import org .junit .Test ;
8+ import org .junit .jupiter .api .RepeatedTest ;
89
910import javax .crypto .KeyGenerator ;
1011import javax .crypto .SealedObject ;
@@ -49,6 +50,7 @@ public void testFlow() throws Exception {
4950 }
5051
5152 @ Test
53+ @ RepeatedTest (6 )
5254 public void testHexKeyFlow () throws Exception {
5355 // 生成随机密钥
5456 KeyGenerator keyGenerator = KeyGenerator .getInstance ("AES" );
Original file line number Diff line number Diff line change 162162 <artifactId >junit</artifactId >
163163 <version >4.13.2</version >
164164 </dependency >
165+ <dependency >
166+ <groupId >org.junit</groupId >
167+ <artifactId >junit-bom</artifactId >
168+ <version >5.12.2</version >
169+ <type >pom</type >
170+ <scope >import</scope >
171+ </dependency >
165172 <dependency >
166173 <groupId >org.mockito</groupId >
167174 <artifactId >mockito-core</artifactId >
Original file line number Diff line number Diff line change 3131 <groupId >org.openjdk.jmh</groupId >
3232 <artifactId >jmh-generator-annprocess</artifactId >
3333 </dependency >
34+ <dependency >
35+ <groupId >org.testng</groupId >
36+ <artifactId >testng</artifactId >
37+ <scope >test</scope >
38+ </dependency >
39+ <!-- https://github.com/junit-team/junit5-samples/blob/r5.12.2/junit5-jupiter-starter-maven/pom.xml-->
40+ <dependency >
41+ <groupId >org.junit.jupiter</groupId >
42+ <artifactId >junit-jupiter</artifactId >
43+ <scope >test</scope >
44+ </dependency >
3445
3546 </dependencies >
3647
Original file line number Diff line number Diff line change 1+ package junit5 ;
2+
3+
4+ import org .junit .jupiter .api .RepeatedTest ;
5+
6+ /**
7+ * @author Kuangcp
8+ * 2025-04-15 21:24
9+ */
10+ public class RepeatTest {
11+
12+ @ RepeatedTest (5 )
13+ public void testRepeat () throws Exception {
14+ System .out .println ("xxxxxx" );
15+ }
16+ }
You can’t perform that action at this time.
0 commit comments