github.com/mdaxf/iac@v0.0.0-20240519030858-58a061660378/framework/callback_mgr/callback_mgr_test.go (about)

     1  package callback_mgr
     2  
     3  import (
     4  	"reflect"
     5  	"testing"
     6  )
     7  
     8  func TestRegisterCallBack(t *testing.T) {
     9  	type args struct {
    10  		key      string
    11  		callBack interface{}
    12  	}
    13  	tests := []struct {
    14  		name string
    15  		args args
    16  	}{
    17  		// TODO: Add test cases.
    18  	}
    19  	for _, tt := range tests {
    20  		t.Run(tt.name, func(t *testing.T) {
    21  			RegisterCallBack(tt.args.key, tt.args.callBack)
    22  		})
    23  	}
    24  }
    25  
    26  func TestCallBackFunc(t *testing.T) {
    27  	type args struct {
    28  		key  string
    29  		args []interface{}
    30  	}
    31  	tests := []struct {
    32  		name string
    33  		args args
    34  		want []interface{}
    35  	}{
    36  		// TODO: Add test cases.
    37  	}
    38  	for _, tt := range tests {
    39  		t.Run(tt.name, func(t *testing.T) {
    40  			if got, _ := CallBackFunc(tt.args.key, tt.args.args...); !reflect.DeepEqual(got, tt.want) {
    41  				t.Errorf("CallBackFunc() = %v, want %v", got, tt.want)
    42  			}
    43  		})
    44  	}
    45  }