diff --git a/jtt_tool/jtt_client_test.go b/jtt_tool/jtt_client_test.go index bbd3a58..4279f5b 100644 --- a/jtt_tool/jtt_client_test.go +++ b/jtt_tool/jtt_client_test.go @@ -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) + } + }) + } +}