gstat/args/validationError_internals_test.go

20 lines
408 B
Go
Raw Permalink Normal View History

2020-05-28 22:17:38 +02:00
package args
import (
"testing"
e "github.com/hamburghammer/gstat/errors"
)
func TestNewValidationError(t *testing.T) {
args := Arguments{}
message := "Error from testing!"
got := newValidationError(args, message)
want := ValidationError{e.BaseError{Operation: "Validation", Message: message}, args}
if got.Error() != want.Error() {
t.Errorf("Want: %s Got: %s", want.Error(), got.Error())
}
}