Skip to content

Commit 4d94e17

Browse files
committed
🎨 修复单元测试代码
1 parent 54222bd commit 4d94e17

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpTpMessageRouterTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@
88
import me.chanjar.weixin.cp.tp.message.WxCpTpMessageRouter;
99
import me.chanjar.weixin.cp.tp.service.WxCpTpService;
1010
import me.chanjar.weixin.cp.tp.service.impl.WxCpTpServiceApacheHttpClientImpl;
11-
import me.chanjar.weixin.cp.tp.service.impl.WxCpTpServiceImpl;
1211
import org.testng.annotations.Test;
1312

1413
import java.util.Map;
1514

1615
import static org.testng.Assert.assertNotNull;
17-
import static org.testng.AssertJUnit.assertEquals;
1816
import static org.testng.AssertJUnit.assertNull;
1917

2018
public class WxCpTpMessageRouterTest {
@@ -51,7 +49,6 @@ public WxCpXmlOutMessage handle(WxCpTpXmlMessage wxMessage, Map<String, Object>
5149

5250
assertNull(router.route(wxXmlMessage));
5351

54-
5552
System.out.println("over");
5653
}
5754

weixin-java-cp/src/test/java/me/chanjar/weixin/cp/tp/service/impl/BaseWxCpTpServiceImplTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* @date 2019-08-18
2424
*/
2525
public class BaseWxCpTpServiceImplTest {
26-
private final WxCpTpService tpService = Mockito.spy(new WxCpTpServiceImpl());
26+
private final WxCpTpService tpService = Mockito.spy(new WxCpTpServiceApacheHttpClientImpl());
2727

2828
@Test
2929
public void testCheckSignature() {

weixin-java-cp/src/test/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpServiceImplTest.java renamed to weixin-java-cp/src/test/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpServiceApacheHttpClientImplTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*
2222
* @author zhangq <zhangq002@gmail.com>
2323
*/
24-
public class WxCpTpServiceImplTest {
24+
public class WxCpTpServiceApacheHttpClientImplTest {
2525

2626
public static final String API_URL = "https://qyapi.weixin.qq.com";
2727
public static final String SUITE_ID = "xxxxxx";
@@ -41,7 +41,7 @@ public class WxCpTpServiceImplTest {
4141

4242
@BeforeMethod
4343
public void setUp() {
44-
wxCpTpService = new WxCpTpServiceImpl();
44+
wxCpTpService = new WxCpTpServiceApacheHttpClientImpl();
4545
wxCpTpService.setWxCpTpConfigStorage(wxCpTpConfigStorage());
4646
}
4747

weixin-java-cp/src/test/resources/testng.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<class name="me.chanjar.weixin.cp.api.WxCpBusyRetryTest"/>
77
<class name="me.chanjar.weixin.cp.api.WxCpBaseAPITest"/>
88
<class name="me.chanjar.weixin.cp.api.WxCpMessageRouterTest"/>
9-
<class name="me.chanjar.weixin.cp.tp.service.impl.WxCpTpServiceImplTest"/>
9+
<class name="me.chanjar.weixin.cp.tp.service.impl.WxCpTpServiceApacheHttpClientImplTest"/>
1010
<class name="me.chanjar.weixin.cp.config.impl.WxCpTpDefaultConfigImplTest"/>
1111
<class name="me.chanjar.weixin.cp.tp.service.impl.WxCpTpTagServiceImplTest"/>
1212
</classes>

0 commit comments

Comments
 (0)