From f26c317144d0e4a4a9823d51d074a36bda54b474 Mon Sep 17 00:00:00 2001 From: zhongqiang <15375399426> Date: Mon, 30 Jun 2025 14:13:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A4=E6=98=93=E6=89=80=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jtt_tool/jtt_client_test.go | 50 +++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) 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) + } + }) + } +}