Skip to content

Commit

Permalink
🎨 修复单元测试代码
Browse files Browse the repository at this point in the history
  • Loading branch information
binarywang authored and hywr committed Jun 23, 2021
1 parent 5d276b7 commit 9279156
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@
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 {
Expand Down Expand Up @@ -51,7 +49,6 @@ public WxCpXmlOutMessage handle(WxCpTpXmlMessage wxMessage, Map<String, Object>

assertNull(router.route(wxXmlMessage));


System.out.println("over");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*
* @author zhangq <[email protected]>
*/
public class WxCpTpServiceImplTest {
public class WxCpTpServiceApacheHttpClientImplTest {

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

@BeforeMethod
public void setUp() {
wxCpTpService = new WxCpTpServiceImpl();
wxCpTpService = new WxCpTpServiceApacheHttpClientImpl();
wxCpTpService.setWxCpTpConfigStorage(wxCpTpConfigStorage());
}

Expand Down
2 changes: 1 addition & 1 deletion weixin-java-cp/src/test/resources/testng.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 9279156

Please sign in to comment.