terraform-provider-stackitp.../pkg/sqlserverflexalpha/model_source_external_s3_test.go

51 lines
919 B
Go

/*
STACKIT MSSQL Service API
This is the documentation for the STACKIT MSSQL service
API version: 3alpha1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sqlserverflexalpha
import (
"testing"
)
// isEnum
func TestSourceExternalS3Types_UnmarshalJSON(t *testing.T) {
type args struct {
src []byte
}
tests := []struct {
name string
args args
wantErr bool
}{
{
name: `success - possible enum value no. 1`,
args: args{
src: []byte(`"EXTERNAL_S3"`),
},
wantErr: false,
},
{
name: "fail",
args: args{
src: []byte("\"FOOBAR\""),
},
wantErr: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
v := SourceExternalS3Types("")
if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr {
t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr)
}
})
}
}