🎨 修复单元测试代码

This commit is contained in:
Binary Wang 2021-06-03 13:56:37 +08:00
parent 54222bd346
commit 4d94e17b96
4 changed files with 4 additions and 7 deletions

View File

@ -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");
}

View File

@ -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() {

View File

@ -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());
}

View File

@ -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>