交易所接口
This commit is contained in:
@@ -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)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user