51 lines
906 B
Go
51 lines
906 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 TestSourceBackupTypes_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(`"BACKUP"`),
|
|
},
|
|
wantErr: false,
|
|
},
|
|
{
|
|
name: "fail",
|
|
args: args{
|
|
src: []byte("\"FOOBAR\""),
|
|
},
|
|
wantErr: true,
|
|
},
|
|
}
|
|
for _, tt := range tests {
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
v := SourceBackupTypes("")
|
|
if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr {
|
|
t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr)
|
|
}
|
|
})
|
|
}
|
|
}
|