mirror of
https://github.com/hamburghammer/gstat.git
synced 2024-12-23 00:17:40 +01:00
19 lines
408 B
Go
19 lines
408 B
Go
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())
|
|
}
|
|
}
|