1
0
mirror of synced 2025-12-23 18:48:00 +08:00

#1095 修复微信营销接口中有问题的回传数据接口方法

This commit is contained in:
Binary Wang
2019-07-14 15:17:08 +08:00
parent d451d3b779
commit c805444154
5 changed files with 98 additions and 16 deletions

View File

@@ -0,0 +1,30 @@
package me.chanjar.weixin.mp.api.impl;
import org.testng.annotations.Test;
import static org.testng.Assert.*;
/**
* 测试类.
*
* @author <a href="https://github.com/binarywang">Binary Wang</a>
* @date 2019-07-14
*/
public class WxMpMarketingServiceImplTest {
@Test
public void testAddUserActionSets() {
}
@Test
public void testGetUserActionSets() {
}
@Test
public void testAddUserAction() {
}
@Test
public void testGetAdLeads() {
}
}

View File

@@ -0,0 +1,28 @@
package me.chanjar.weixin.mp.bean.marketing;
import com.google.common.collect.Lists;
import org.testng.annotations.Test;
import static org.assertj.core.api.Assertions.assertThat;
/**
* 老板加点注释吧.
*
* @author <a href="https://github.com/binarywang">Binary Wang</a>
* @date 2019-07-14
*/
public class WxMpUserActionTest {
@Test
public void testListToJson() {
assertThat(WxMpUserAction.listToJson(Lists.newArrayList(WxMpUserAction.builder()
.actionParam(1)
.actionTime(122)
.actionType("haha")
.clickId("111")
.url("1222")
.userActionSetId(111L)
.build()
))).isEqualTo("{\"actions\":[{\"user_action_set_id\":111,\"url\":\"1222\",\"action_time\":122,\"action_type\":\"haha\",\"trace\":{\"click_id\":\"111\"},\"action_param\":{\"value\":1}}]}");
}
}