shad-go/lectures/04-testing/gomock/mock.go

48 lines
1.2 KiB
Go
Raw Normal View History

2020-03-19 13:23:32 +00:00
// Code generated by MockGen. DO NOT EDIT.
// Source: gitlab.com/slon/shad-go/lectures/04-testing/gomock (interfaces: Foo)
// Package example is a generated GoMock package.
package example
import (
gomock "github.com/golang/mock/gomock"
reflect "reflect"
)
// MockFoo is a mock of Foo interface
type MockFoo struct {
ctrl *gomock.Controller
recorder *MockFooMockRecorder
}
// MockFooMockRecorder is the mock recorder for MockFoo
type MockFooMockRecorder struct {
mock *MockFoo
}
// NewMockFoo creates a new mock instance
func NewMockFoo(ctrl *gomock.Controller) *MockFoo {
mock := &MockFoo{ctrl: ctrl}
mock.recorder = &MockFooMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockFoo) EXPECT() *MockFooMockRecorder {
return m.recorder
}
// Bar mocks base method
func (m *MockFoo) Bar(arg0 int) int {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Bar", arg0)
ret0, _ := ret[0].(int)
return ret0
}
// Bar indicates an expected call of Bar
func (mr *MockFooMockRecorder) Bar(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bar", reflect.TypeOf((*MockFoo)(nil).Bar), arg0)
}