mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-01-23 13:22:04 +08:00
🎨 升级Mockito版本
This commit is contained in:
@@ -57,6 +57,7 @@
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-redis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.testng</groupId>
|
||||
<artifactId>testng</artifactId>
|
||||
@@ -64,9 +65,10 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-all</artifactId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.inject</groupId>
|
||||
<artifactId>guice</artifactId>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user