63 lines
1.2 KiB
Go
63 lines
1.2 KiB
Go
package passport
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
// 单元测试
|
|
|
|
func TestGetUserList(t *testing.T) {
|
|
client, err := NewClient()
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
req := CreateGetUserListRequest("ws45265737")
|
|
resp, err := client.GetUserList(req)
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
t.Logf("resp code:%+v", resp.Code)
|
|
t.Logf("resp data:%+v", resp.Data)
|
|
}
|
|
|
|
func TestGetUserRoleList(t *testing.T) {
|
|
client, err := NewClient()
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
req := CreateGetUserRoleListRequest(63610626, 2850)
|
|
resp, err := client.GetUserRoleList(req)
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
t.Logf("resp code:%+v", resp.Code)
|
|
t.Logf("resp data:%+v", resp.Data)
|
|
}
|
|
|
|
func TestEditCard(t *testing.T) {
|
|
client, err := NewClient()
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
|
|
editCardRequest := EditCardRequestParam{
|
|
Uid: 32455414,
|
|
GameId: 5010,
|
|
Imei: "11111111",
|
|
IsReal: 0,
|
|
DirectStatus: 1,
|
|
AuthChannel: "gjfcm_wzcq",
|
|
DirectExtData: "测试测试测试",
|
|
Pi: "",
|
|
Ip: "",
|
|
Ipv6: "",
|
|
UserName: "asfasfd",
|
|
RealName: "这艘啊",
|
|
IdCard: "33032419950123532X",
|
|
Mandatory: "3123123123",
|
|
}
|
|
editCardResponse, err := client.EditCard(editCardRequest)
|
|
t.Logf("%v", editCardResponse)
|
|
|
|
}
|