1
0
mirror of synced 2026-02-11 06:07:48 +08:00

🎨 升级Mockito版本

This commit is contained in:
Binary Wang
2026-01-15 17:30:54 +08:00
parent 73704ca280
commit 30914f371d
15 changed files with 34 additions and 38 deletions

View File

@@ -13,8 +13,8 @@ import org.testng.annotations.Test;
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Tp.GET_CUSTOMIZED_APP_DETAIL;
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Tp.GET_TEMPLATE_LIST;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.when;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;

View File

@@ -11,8 +11,8 @@ import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Tp.PROLONG_TRY;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.when;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;
@@ -34,7 +34,7 @@ public class WxCpTpEditionServiceImplTest {
*/
@BeforeClass
public void setUp() {
MockitoAnnotations.initMocks(this);
MockitoAnnotations.openMocks(this);
configStorage = new WxCpTpDefaultConfigImpl();
when(wxCpTpService.getWxCpTpConfigStorage()).thenReturn(configStorage);
wxCpTpEditionService = new WxCpTpEditionServiceImpl(wxCpTpService);

View File

@@ -16,8 +16,8 @@ import org.testng.annotations.Test;
import java.util.*;
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.License.*;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.when;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;
@@ -41,7 +41,7 @@ public class WxCpTpLicenseServiceImplTest {
*/
@BeforeClass
public void setUp() {
MockitoAnnotations.initMocks(this);
MockitoAnnotations.openMocks(this);
configStorage = new WxCpTpDefaultConfigImpl();
when(wxCpTpService.getWxCpTpConfigStorage()).thenReturn(configStorage);
wxCpTpLicenseService = new WxCpTpLicenseServiceImpl(wxCpTpService);

View File

@@ -18,8 +18,8 @@ import java.util.Objects;
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Tp.GET_ORDER;
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Tp.GET_ORDER_LIST;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.when;
import static org.testng.Assert.*;
@@ -40,7 +40,7 @@ public class WxCpTpOrderServiceImplTest {
*/
@BeforeClass
public void setUp() {
MockitoAnnotations.initMocks(this);
MockitoAnnotations.openMocks(this);
configStorage = new WxCpTpDefaultConfigImpl();
when(wxCpTpService.getWxCpTpConfigStorage()).thenReturn(configStorage);
wxCpTpOrderService = new WxCpTpOrderServiceImpl(wxCpTpService);

View File

@@ -17,7 +17,7 @@ import java.util.Arrays;
import java.util.List;
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Tag.*;
import static org.mockito.Matchers.*;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.Mockito.when;
import static org.testng.Assert.*;
@@ -41,7 +41,7 @@ public class WxCpTpTagServiceImplTest {
*/
@BeforeClass
public void setUp() {
MockitoAnnotations.initMocks(this);
MockitoAnnotations.openMocks(this);
configStorage = new WxCpTpDefaultConfigImpl();
when(wxCpTpService.getWxCpTpConfigStorage()).thenReturn(configStorage);
wxCpTpTagService = new WxCpTpTagServiceImpl(wxCpTpService);