commit
21f1f84c16
@ -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()",
|
||||
|
@ -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 }}
|
||||
|
Loading…
Reference in New Issue
Block a user