wx_helper_sdk/client_test.go
coward 9680512f0a 🎉
2024-01-05 11:54:25 +08:00

37 lines
546 B
Go

package wx_helper_sdk
import (
"fmt"
"testing"
)
var wxh WxHelper
func init() {
wxh = NewWxHelper("", 0)
}
func TestClientCheckUserIsLogin(t *testing.T) {
ok := wxh.CheckUserIsLogin()
fmt.Println(ok)
}
func TestClientGetCurrentLoginUser(t *testing.T) {
info, err := wxh.GetCurrentLoginUserInfo()
if err != nil {
t.Logf("failed: %v", err.Error())
return
}
fmt.Printf("%+v\n", info)
}
func TestClientGetContactList(t *testing.T) {
list, err := wxh.GetContactList(false)
if err != nil {
return
}
fmt.Printf("%+v", list)
}