/
kod_gen_mock.go
200 lines (167 loc) · 5.98 KB
/
kod_gen_mock.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
// Code generated by MockGen. DO NOT EDIT.
// Source: tests/graphcase/kod_gen_interface.go
//
// Generated by this command:
//
// mockgen -source tests/graphcase/kod_gen_interface.go -destination tests/graphcase/kod_gen_mock.go -package main
//
// Package main is a generated GoMock package.
package main
import (
context "context"
http "net/http"
reflect "reflect"
gin "github.com/gin-gonic/gin"
gomock "go.uber.org/mock/gomock"
)
// Mocktest1Controller is a mock of test1Controller interface.
type Mocktest1Controller struct {
ctrl *gomock.Controller
recorder *Mocktest1ControllerMockRecorder
}
// Mocktest1ControllerMockRecorder is the mock recorder for Mocktest1Controller.
type Mocktest1ControllerMockRecorder struct {
mock *Mocktest1Controller
}
// NewMocktest1Controller creates a new mock instance.
func NewMocktest1Controller(ctrl *gomock.Controller) *Mocktest1Controller {
mock := &Mocktest1Controller{ctrl: ctrl}
mock.recorder = &Mocktest1ControllerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *Mocktest1Controller) EXPECT() *Mocktest1ControllerMockRecorder {
return m.recorder
}
// Foo mocks base method.
func (m *Mocktest1Controller) Foo(cccccc *gin.Context) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Foo", cccccc)
}
// Foo indicates an expected call of Foo.
func (mr *Mocktest1ControllerMockRecorder) Foo(cccccc any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Foo", reflect.TypeOf((*Mocktest1Controller)(nil).Foo), cccccc)
}
// MockHTTPController is a mock of HTTPController interface.
type MockHTTPController struct {
ctrl *gomock.Controller
recorder *MockHTTPControllerMockRecorder
}
// MockHTTPControllerMockRecorder is the mock recorder for MockHTTPController.
type MockHTTPControllerMockRecorder struct {
mock *MockHTTPController
}
// NewMockHTTPController creates a new mock instance.
func NewMockHTTPController(ctrl *gomock.Controller) *MockHTTPController {
mock := &MockHTTPController{ctrl: ctrl}
mock.recorder = &MockHTTPControllerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockHTTPController) EXPECT() *MockHTTPControllerMockRecorder {
return m.recorder
}
// Foo mocks base method.
func (m *MockHTTPController) Foo(w http.ResponseWriter, r http.Request) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Foo", w, r)
}
// Foo indicates an expected call of Foo.
func (mr *MockHTTPControllerMockRecorder) Foo(w, r any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Foo", reflect.TypeOf((*MockHTTPController)(nil).Foo), w, r)
}
// MocktestService is a mock of testService interface.
type MocktestService struct {
ctrl *gomock.Controller
recorder *MocktestServiceMockRecorder
}
// MocktestServiceMockRecorder is the mock recorder for MocktestService.
type MocktestServiceMockRecorder struct {
mock *MocktestService
}
// NewMocktestService creates a new mock instance.
func NewMocktestService(ctrl *gomock.Controller) *MocktestService {
mock := &MocktestService{ctrl: ctrl}
mock.recorder = &MocktestServiceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MocktestService) EXPECT() *MocktestServiceMockRecorder {
return m.recorder
}
// Foo mocks base method.
func (m *MocktestService) Foo(ctx context.Context) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Foo", ctx)
ret0, _ := ret[0].(error)
return ret0
}
// Foo indicates an expected call of Foo.
func (mr *MocktestServiceMockRecorder) Foo(ctx any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Foo", reflect.TypeOf((*MocktestService)(nil).Foo), ctx)
}
// MocktestModel is a mock of testModel interface.
type MocktestModel struct {
ctrl *gomock.Controller
recorder *MocktestModelMockRecorder
}
// MocktestModelMockRecorder is the mock recorder for MocktestModel.
type MocktestModelMockRecorder struct {
mock *MocktestModel
}
// NewMocktestModel creates a new mock instance.
func NewMocktestModel(ctrl *gomock.Controller) *MocktestModel {
mock := &MocktestModel{ctrl: ctrl}
mock.recorder = &MocktestModelMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MocktestModel) EXPECT() *MocktestModelMockRecorder {
return m.recorder
}
// Foo mocks base method.
func (m *MocktestModel) Foo(ctx context.Context) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Foo", ctx)
ret0, _ := ret[0].(error)
return ret0
}
// Foo indicates an expected call of Foo.
func (mr *MocktestModelMockRecorder) Foo(ctx any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Foo", reflect.TypeOf((*MocktestModel)(nil).Foo), ctx)
}
// MockTest1Component is a mock of Test1Component interface.
type MockTest1Component struct {
ctrl *gomock.Controller
recorder *MockTest1ComponentMockRecorder
}
// MockTest1ComponentMockRecorder is the mock recorder for MockTest1Component.
type MockTest1ComponentMockRecorder struct {
mock *MockTest1Component
}
// NewMockTest1Component creates a new mock instance.
func NewMockTest1Component(ctrl *gomock.Controller) *MockTest1Component {
mock := &MockTest1Component{ctrl: ctrl}
mock.recorder = &MockTest1ComponentMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockTest1Component) EXPECT() *MockTest1ComponentMockRecorder {
return m.recorder
}
// Foo mocks base method.
func (m *MockTest1Component) Foo(ctx context.Context, req *FooReq) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Foo", ctx, req)
ret0, _ := ret[0].(error)
return ret0
}
// Foo indicates an expected call of Foo.
func (mr *MockTest1ComponentMockRecorder) Foo(ctx, req any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Foo", reflect.TypeOf((*MockTest1Component)(nil).Foo), ctx, req)
}