交易所接口

This commit is contained in:
zhongqiang 2025-06-30 14:13:39 +08:00
parent 2835ad200b
commit f26c317144

View File

@ -1 +1,51 @@
package jtt_tool
import (
"log"
"testing"
)
func TestJttClient_FindUserForTokenMessage(t *testing.T) {
type fields struct {
AppId string
ApiUrl string
PublicKey string
PrivateKey string
}
type args struct {
address string
}
tests := []struct {
name string
fields fields
args args
wantRes *FindUserForTokenMessageRes
wantErr bool
}{
{
name: "test1",
fields: fields{},
args: args{
address: "0x123456",
},
},
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
h := &JttClient{
AppId: test.fields.AppId,
ApiUrl: test.fields.ApiUrl,
PublicKey: test.fields.PublicKey,
PrivateKey: test.fields.PrivateKey,
}
gotRes, err := h.FindUserForTokenMessage(test.args.address)
log.Println(gotRes, err)
if (err != nil) != test.wantErr {
t.Errorf("FindUserForTokenMessage() error = %v, wantErr %v", err, test.wantErr)
}
})
}
}