github.com/mdaxf/iac@v0.0.0-20240519030858-58a061660378/engine/callback/callback_test.go (about) 1 package callback 2 3 import ( 4 "context" 5 "database/sql" 6 "reflect" 7 "testing" 8 9 "github.com/mdaxf/iac/documents" 10 "github.com/mdaxf/iac-signalr/signalr" 11 ) 12 13 func TestRegisterCallBack(t *testing.T) { 14 type args struct { 15 key string 16 callBack interface{} 17 } 18 tests := []struct { 19 name string 20 args args 21 }{ 22 // TODO: Add test cases. 23 } 24 for _, tt := range tests { 25 t.Run(tt.name, func(t *testing.T) { 26 RegisterCallBack(tt.args.key, tt.args.callBack) 27 }) 28 } 29 } 30 31 func TestExecuteTranCode(t *testing.T) { 32 type args struct { 33 key string 34 tcode string 35 inputs map[string]interface{} 36 ctx context.Context 37 ctxcancel context.CancelFunc 38 dbTx *sql.Tx 39 DBCon *documents.DocDB 40 sc signalr.Client 41 } 42 tests := []struct { 43 name string 44 args args 45 want []interface{} 46 }{ 47 // TODO: Add test cases. 48 } 49 for _, tt := range tests { 50 t.Run(tt.name, func(t *testing.T) { 51 if got := ExecuteTranCode(tt.args.key, tt.args.tcode, tt.args.inputs, tt.args.ctx, tt.args.ctxcancel, tt.args.dbTx, tt.args.DBCon, tt.args.sc); !reflect.DeepEqual(got, tt.want) { 52 t.Errorf("ExecuteTranCode() = %v, want %v", got, tt.want) 53 } 54 }) 55 } 56 }