Merge pull request #43 from djui/patch-2

Remove moq prefix
This commit is contained in:
Mat Ryer 2018-06-12 09:57:21 +01:00 committed by GitHub
commit 21f1f84c16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -28,8 +28,8 @@ func TestMoq(t *testing.T) {
"GetFunc func(ctx context.Context, id string) (*Person, error)",
"func (mock *PersonStoreMock) Create(ctx context.Context, person *Person, confirm bool) error",
"func (mock *PersonStoreMock) Get(ctx context.Context, id string) (*Person, error)",
"panic(\"moq: PersonStoreMock.CreateFunc is nil but PersonStore.Create was just called\")",
"panic(\"moq: PersonStoreMock.GetFunc is nil but PersonStore.Get was just called\")",
"panic(\"PersonStoreMock.CreateFunc: method is nil but PersonStore.Create was just called\")",
"panic(\"PersonStoreMock.GetFunc: method is nil but PersonStore.Get was just called\")",
"lockPersonStoreMockGet.Lock()",
"mock.calls.Get = append(mock.calls.Get, callInfo)",
"lockPersonStoreMockGet.Unlock()",

View File

@ -59,7 +59,7 @@ type {{.InterfaceName}}Mock struct {
// {{.Name}} calls {{.Name}}Func.
func (mock *{{$obj.InterfaceName}}Mock) {{.Name}}({{.Arglist}}) {{.ReturnArglist}} {
if mock.{{.Name}}Func == nil {
panic("moq: {{$obj.InterfaceName}}Mock.{{.Name}}Func is nil but {{$obj.InterfaceName}}.{{.Name}} was just called")
panic("{{$obj.InterfaceName}}Mock.{{.Name}}Func: method is nil but {{$obj.InterfaceName}}.{{.Name}} was just called")
}
callInfo := struct {
{{- range .Params }}