This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
otter-space-sdk/pkg/error/validation_test.go

31 lines
575 B
Go
Raw Permalink Normal View History

package error
import "testing"
func TestEntityValidationFailed_Error(t *testing.T) {
type fields struct {
Reason string
}
tests := []struct {
name string
fields fields
want string
}{
{
name: "Test 1: Reason",
fields: fields{Reason: "TEST ERROR"},
want: "Entity validation failed: TEST ERROR",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
e := EntityValidationFailed{
Reason: tt.fields.Reason,
}
if got := e.Error(); got != tt.want {
t.Errorf("Error() = %v, want %v", got, tt.want)
}
})
}
}