File tree Expand file tree Collapse file tree 15 files changed +32
-51
lines changed
src/test/java/me/chanjar/weixin/cp/tp/service/impl
src/test/java/me/chanjar/weixin/mp/api/impl Expand file tree Collapse file tree 15 files changed +32
-51
lines changed Original file line number Diff line number Diff line change 257257 </dependency >
258258 <dependency >
259259 <groupId >org.mockito</groupId >
260- <artifactId >mockito-all </artifactId >
261- <version >1.10.19 </version >
260+ <artifactId >mockito-core </artifactId >
261+ <version >5.14.2 </version >
262262 <scope >test</scope >
263263 </dependency >
264264 <dependency >
Original file line number Diff line number Diff line change 121121 <artifactId >jedis-lock</artifactId >
122122 <optional >true</optional >
123123 </dependency >
124- <dependency >
125- <groupId >org.mockito</groupId >
126- <artifactId >mockito-core</artifactId >
127- <version >3.3.3</version >
128- <scope >test</scope >
129- </dependency >
124+
130125 </dependencies >
131126
132127 <build >
Original file line number Diff line number Diff line change 8686 <groupId >org.projectlombok</groupId >
8787 <artifactId >lombok</artifactId >
8888 </dependency >
89+ <dependency >
90+ <groupId >org.mockito</groupId >
91+ <artifactId >mockito-core</artifactId >
92+ <scope >test</scope >
93+ </dependency >
8994
9095 <dependency >
9196 <groupId >ch.qos.logback</groupId >
97102 <artifactId >testng</artifactId >
98103 <scope >test</scope >
99104 </dependency >
100- <dependency >
101- <groupId >org.mockito</groupId >
102- <artifactId >mockito-all</artifactId >
103- <scope >test</scope >
104- </dependency >
105+
105106 <dependency >
106107 <groupId >com.google.inject</groupId >
107108 <artifactId >guice</artifactId >
Original file line number Diff line number Diff line change 5757 <groupId >org.springframework.data</groupId >
5858 <artifactId >spring-data-redis</artifactId >
5959 </dependency >
60+
6061 <dependency >
6162 <groupId >org.testng</groupId >
6263 <artifactId >testng</artifactId >
6364 <scope >test</scope >
6465 </dependency >
65- <dependency >
66- <groupId >org.mockito</groupId >
67- <artifactId >mockito-all</artifactId >
68- <scope >test</scope >
69- </dependency >
66+
7067 <dependency >
7168 <groupId >com.google.inject</groupId >
7269 <artifactId >guice</artifactId >
Original file line number Diff line number Diff line change 1313
1414import static me .chanjar .weixin .cp .constant .WxCpApiPathConsts .Tp .GET_CUSTOMIZED_APP_DETAIL ;
1515import static me .chanjar .weixin .cp .constant .WxCpApiPathConsts .Tp .GET_TEMPLATE_LIST ;
16- import static org .mockito .Matchers .any ;
17- import static org .mockito .Matchers .eq ;
16+ import static org .mockito .ArgumentMatchers .any ;
17+ import static org .mockito .ArgumentMatchers .eq ;
1818import static org .mockito .Mockito .when ;
1919import static org .testng .Assert .assertEquals ;
2020import static org .testng .Assert .assertNotNull ;
Original file line number Diff line number Diff line change 1111import org .testng .annotations .Test ;
1212
1313import static me .chanjar .weixin .cp .constant .WxCpApiPathConsts .Tp .PROLONG_TRY ;
14- import static org .mockito .Matchers .any ;
15- import static org .mockito .Matchers .eq ;
14+ import static org .mockito .ArgumentMatchers .any ;
15+ import static org .mockito .ArgumentMatchers .eq ;
1616import static org .mockito .Mockito .when ;
1717import static org .testng .Assert .assertEquals ;
1818import static org .testng .Assert .assertNotNull ;
@@ -34,7 +34,7 @@ public class WxCpTpEditionServiceImplTest {
3434 */
3535 @ BeforeClass
3636 public void setUp () {
37- MockitoAnnotations .initMocks (this );
37+ MockitoAnnotations .openMocks (this );
3838 configStorage = new WxCpTpDefaultConfigImpl ();
3939 when (wxCpTpService .getWxCpTpConfigStorage ()).thenReturn (configStorage );
4040 wxCpTpEditionService = new WxCpTpEditionServiceImpl (wxCpTpService );
Original file line number Diff line number Diff line change 1616import java .util .*;
1717
1818import static me .chanjar .weixin .cp .constant .WxCpApiPathConsts .License .*;
19- import static org .mockito .Matchers .any ;
20- import static org .mockito .Matchers .eq ;
19+ import static org .mockito .ArgumentMatchers .any ;
20+ import static org .mockito .ArgumentMatchers .eq ;
2121import static org .mockito .Mockito .when ;
2222import static org .testng .Assert .assertEquals ;
2323import static org .testng .Assert .assertNotNull ;
@@ -41,7 +41,7 @@ public class WxCpTpLicenseServiceImplTest {
4141 */
4242 @ BeforeClass
4343 public void setUp () {
44- MockitoAnnotations .initMocks (this );
44+ MockitoAnnotations .openMocks (this );
4545 configStorage = new WxCpTpDefaultConfigImpl ();
4646 when (wxCpTpService .getWxCpTpConfigStorage ()).thenReturn (configStorage );
4747 wxCpTpLicenseService = new WxCpTpLicenseServiceImpl (wxCpTpService );
Original file line number Diff line number Diff line change 1818
1919import static me .chanjar .weixin .cp .constant .WxCpApiPathConsts .Tp .GET_ORDER ;
2020import static me .chanjar .weixin .cp .constant .WxCpApiPathConsts .Tp .GET_ORDER_LIST ;
21- import static org .mockito .Matchers .any ;
22- import static org .mockito .Matchers .eq ;
21+ import static org .mockito .ArgumentMatchers .any ;
22+ import static org .mockito .ArgumentMatchers .eq ;
2323import static org .mockito .Mockito .when ;
2424import static org .testng .Assert .*;
2525
@@ -40,7 +40,7 @@ public class WxCpTpOrderServiceImplTest {
4040 */
4141 @ BeforeClass
4242 public void setUp () {
43- MockitoAnnotations .initMocks (this );
43+ MockitoAnnotations .openMocks (this );
4444 configStorage = new WxCpTpDefaultConfigImpl ();
4545 when (wxCpTpService .getWxCpTpConfigStorage ()).thenReturn (configStorage );
4646 wxCpTpOrderService = new WxCpTpOrderServiceImpl (wxCpTpService );
Original file line number Diff line number Diff line change 1717import java .util .List ;
1818
1919import static me .chanjar .weixin .cp .constant .WxCpApiPathConsts .Tag .*;
20- import static org .mockito .Matchers .*;
20+ import static org .mockito .ArgumentMatchers .*;
2121import static org .mockito .Mockito .when ;
2222import static org .testng .Assert .*;
2323
@@ -41,7 +41,7 @@ public class WxCpTpTagServiceImplTest {
4141 */
4242 @ BeforeClass
4343 public void setUp () {
44- MockitoAnnotations .initMocks (this );
44+ MockitoAnnotations .openMocks (this );
4545 configStorage = new WxCpTpDefaultConfigImpl ();
4646 when (wxCpTpService .getWxCpTpConfigStorage ()).thenReturn (configStorage );
4747 wxCpTpTagService = new WxCpTpTagServiceImpl (wxCpTpService );
Original file line number Diff line number Diff line change 103103 <artifactId >jedis-lock</artifactId >
104104 <optional >true</optional >
105105 </dependency >
106- <dependency >
107- <groupId >org.mockito</groupId >
108- <artifactId >mockito-core</artifactId >
109- <version >3.3.3</version >
110- <scope >test</scope >
111- </dependency >
106+
112107 </dependencies >
113108
114109 <build >
You can’t perform that action at this time.
0 commit comments