...

Source file src/github.com/golang/mock/gomock/mock_test.go

Documentation: github.com/golang/mock/gomock

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: example_test.go
     3  
     4  // Package gomock_test is a generated GoMock package.
     5  package gomock_test
     6  
     7  import (
     8  	reflect "reflect"
     9  
    10  	"github.com/golang/mock/gomock"
    11  )
    12  
    13  // MockFoo is a mock of Foo interface.
    14  type MockFoo struct {
    15  	ctrl     *gomock.Controller
    16  	recorder *MockFooMockRecorder
    17  }
    18  
    19  // MockFooMockRecorder is the mock recorder for MockFoo.
    20  type MockFooMockRecorder struct {
    21  	mock *MockFoo
    22  }
    23  
    24  // NewMockFoo creates a new mock instance.
    25  func NewMockFoo(ctrl *gomock.Controller) *MockFoo {
    26  	mock := &MockFoo{ctrl: ctrl}
    27  	mock.recorder = &MockFooMockRecorder{mock}
    28  	return mock
    29  }
    30  
    31  // EXPECT returns an object that allows the caller to indicate expected use.
    32  func (m *MockFoo) EXPECT() *MockFooMockRecorder {
    33  	return m.recorder
    34  }
    35  
    36  // Bar mocks base method.
    37  func (m *MockFoo) Bar(arg0 string) string {
    38  	m.ctrl.T.Helper()
    39  	ret := m.ctrl.Call(m, "Bar", arg0)
    40  	ret0, _ := ret[0].(string)
    41  	return ret0
    42  }
    43  
    44  // Bar indicates an expected call of Bar.
    45  func (mr *MockFooMockRecorder) Bar(arg0 interface{}) *gomock.Call {
    46  	mr.mock.ctrl.T.Helper()
    47  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bar", reflect.TypeOf((*MockFoo)(nil).Bar), arg0)
    48  }
    49  

View as plain text