mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-04-05 17:38:05 +08:00
🎨 修复单元测试代码
This commit is contained in:
parent
54222bd346
commit
4d94e17b96
@ -8,13 +8,11 @@ import me.chanjar.weixin.cp.tp.message.WxCpTpMessageHandler;
|
||||
import me.chanjar.weixin.cp.tp.message.WxCpTpMessageRouter;
|
||||
import me.chanjar.weixin.cp.tp.service.WxCpTpService;
|
||||
import me.chanjar.weixin.cp.tp.service.impl.WxCpTpServiceApacheHttpClientImpl;
|
||||
import me.chanjar.weixin.cp.tp.service.impl.WxCpTpServiceImpl;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import static org.testng.Assert.assertNotNull;
|
||||
import static org.testng.AssertJUnit.assertEquals;
|
||||
import static org.testng.AssertJUnit.assertNull;
|
||||
|
||||
public class WxCpTpMessageRouterTest {
|
||||
@ -51,7 +49,6 @@ public class WxCpTpMessageRouterTest {
|
||||
|
||||
assertNull(router.route(wxXmlMessage));
|
||||
|
||||
|
||||
System.out.println("over");
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* @date 2019-08-18
|
||||
*/
|
||||
public class BaseWxCpTpServiceImplTest {
|
||||
private final WxCpTpService tpService = Mockito.spy(new WxCpTpServiceImpl());
|
||||
private final WxCpTpService tpService = Mockito.spy(new WxCpTpServiceApacheHttpClientImpl());
|
||||
|
||||
@Test
|
||||
public void testCheckSignature() {
|
||||
|
@ -21,7 +21,7 @@ import org.testng.annotations.Test;
|
||||
*
|
||||
* @author zhangq <zhangq002@gmail.com>
|
||||
*/
|
||||
public class WxCpTpServiceImplTest {
|
||||
public class WxCpTpServiceApacheHttpClientImplTest {
|
||||
|
||||
public static final String API_URL = "https://qyapi.weixin.qq.com";
|
||||
public static final String SUITE_ID = "xxxxxx";
|
||||
@ -41,7 +41,7 @@ public class WxCpTpServiceImplTest {
|
||||
|
||||
@BeforeMethod
|
||||
public void setUp() {
|
||||
wxCpTpService = new WxCpTpServiceImpl();
|
||||
wxCpTpService = new WxCpTpServiceApacheHttpClientImpl();
|
||||
wxCpTpService.setWxCpTpConfigStorage(wxCpTpConfigStorage());
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
<class name="me.chanjar.weixin.cp.api.WxCpBusyRetryTest"/>
|
||||
<class name="me.chanjar.weixin.cp.api.WxCpBaseAPITest"/>
|
||||
<class name="me.chanjar.weixin.cp.api.WxCpMessageRouterTest"/>
|
||||
<class name="me.chanjar.weixin.cp.tp.service.impl.WxCpTpServiceImplTest"/>
|
||||
<class name="me.chanjar.weixin.cp.tp.service.impl.WxCpTpServiceApacheHttpClientImplTest"/>
|
||||
<class name="me.chanjar.weixin.cp.config.impl.WxCpTpDefaultConfigImplTest"/>
|
||||
<class name="me.chanjar.weixin.cp.tp.service.impl.WxCpTpTagServiceImplTest"/>
|
||||
</classes>
|
||||
|
Loading…
Reference in New Issue
Block a user