2025-06-10 10:16:15 +08:00
|
|
|
|
package cs
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"fmt"
|
|
|
|
|
"testing"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 客服工单服务,单元测试
|
|
|
|
|
*/
|
|
|
|
|
|
2025-06-10 10:32:20 +08:00
|
|
|
|
// 获取faq树状数据
|
2025-06-10 10:16:15 +08:00
|
|
|
|
func TestGetFaq(t *testing.T) {
|
|
|
|
|
client, newErr := NewClient()
|
|
|
|
|
if newErr != nil {
|
|
|
|
|
panic(newErr)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
req := CreateGetFaqRequest()
|
2025-06-10 10:32:20 +08:00
|
|
|
|
faq, err := client.GetFaq(req)
|
2025-06-10 10:16:15 +08:00
|
|
|
|
if err != nil {
|
|
|
|
|
t.Error(err)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-10 10:32:20 +08:00
|
|
|
|
fmt.Printf(fmt.Sprintf("%#+v", faq))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取玩家基本信息
|
|
|
|
|
func TestGetUserInfo(t *testing.T) {
|
|
|
|
|
client, newErr := NewClient()
|
|
|
|
|
if newErr != nil {
|
|
|
|
|
panic(newErr)
|
|
|
|
|
}
|
|
|
|
|
req := CreateGetUserInfoRequest("ws45265737")
|
|
|
|
|
info, err := client.GetUserInfo(req)
|
|
|
|
|
if err != nil {
|
|
|
|
|
t.Error(err)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fmt.Printf(fmt.Sprintf("%v", info))
|
2025-06-10 10:16:15 +08:00
|
|
|
|
}
|