github.com/mdaxf/iac@v0.0.0-20240519030858-58a061660378/engine/function/csharpfuncs_test.go (about)

     1  package funcs
     2  
     3  import (
     4  	"reflect"
     5  	"testing"
     6  )
     7  
     8  func TestCSharpFuncs_Execute(t *testing.T) {
     9  	type args struct {
    10  		f *Funcs
    11  	}
    12  	tests := []struct {
    13  		name string
    14  		cf   *CSharpFuncs
    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  			tt.cf.Execute(tt.args.f)
    22  		})
    23  	}
    24  }
    25  
    26  func Test_Testfunction(t *testing.T) {
    27  	type args struct {
    28  		content string
    29  		inputs  interface{}
    30  		outputs []string
    31  	}
    32  	tests := []struct {
    33  		name    string
    34  		cf      *CSharpFuncs
    35  		args    args
    36  		want    map[string]interface{}
    37  		wantErr bool
    38  	}{
    39  		// TODO: Add test cases.
    40  	}
    41  	for _, tt := range tests {
    42  		t.Run(tt.name, func(t *testing.T) {
    43  			got, err := tt.cf.Testfunction(tt.args.content, tt.args.inputs, tt.args.outputs)
    44  			if (err != nil) != tt.wantErr {
    45  				t.Errorf("CSharpFuncs.Testfunction() error = %v, wantErr %v", err, tt.wantErr)
    46  				return
    47  			}
    48  			if !reflect.DeepEqual(got, tt.want) {
    49  				t.Errorf("CSharpFuncs.Testfunction() = %v, want %v", got, tt.want)
    50  			}
    51  		})
    52  	}
    53  }