mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-08-24 16:01:04 +08:00
🎨 修复测试类
This commit is contained in:
parent
8449f2f942
commit
d6d0e35984
@ -1,8 +1,13 @@
|
||||
package me.chanjar.weixin.cp.bean.external;
|
||||
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import lombok.val;
|
||||
import me.chanjar.weixin.common.util.json.GsonParser;
|
||||
import me.chanjar.weixin.cp.bean.WxCpDepart;
|
||||
import me.chanjar.weixin.cp.bean.external.contact.ExternalContact;
|
||||
import me.chanjar.weixin.cp.bean.external.contact.FollowedUser;
|
||||
import me.chanjar.weixin.cp.bean.external.contact.WxCpExternalContactInfo;
|
||||
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
||||
import org.testng.annotations.*;
|
||||
|
||||
import java.util.List;
|
||||
@ -114,7 +119,7 @@ public class WxCpUserExternalContactInfoTest {
|
||||
String toJson = depart.toJson();
|
||||
|
||||
// 测试企业微信字段返回
|
||||
List<WxCpDepart> department = WxCpGsonBuilder.create().fromJson(GsonParser.parse(two).get("department"), new TypeToken<List<WxCpDepart>>() {
|
||||
List<WxCpDepart> department = WxCpGsonBuilder.create().fromJson(GsonParser.parse(testJson).get("department"), new TypeToken<List<WxCpDepart>>() {
|
||||
}.getType());
|
||||
|
||||
final WxCpExternalContactInfo contactInfo = WxCpExternalContactInfo.fromJson(json);
|
||||
|
Loading…
Reference in New Issue
Block a user