-
Notifications
You must be signed in to change notification settings - Fork 211
/
mocks.go
191 lines (160 loc) · 5.09 KB
/
mocks.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
// Code generated by MockGen. DO NOT EDIT.
// Source: ./interface.go
//
// Generated by this command:
//
// mockgen -typed -package=sql -destination=./mocks.go -source=./interface.go
//
// Package sql is a generated GoMock package.
package sql
import (
reflect "reflect"
gomock "go.uber.org/mock/gomock"
)
// MockMigration is a mock of Migration interface.
type MockMigration struct {
ctrl *gomock.Controller
recorder *MockMigrationMockRecorder
}
// MockMigrationMockRecorder is the mock recorder for MockMigration.
type MockMigrationMockRecorder struct {
mock *MockMigration
}
// NewMockMigration creates a new mock instance.
func NewMockMigration(ctrl *gomock.Controller) *MockMigration {
mock := &MockMigration{ctrl: ctrl}
mock.recorder = &MockMigrationMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockMigration) EXPECT() *MockMigrationMockRecorder {
return m.recorder
}
// Apply mocks base method.
func (m *MockMigration) Apply(db Executor) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Apply", db)
ret0, _ := ret[0].(error)
return ret0
}
// Apply indicates an expected call of Apply.
func (mr *MockMigrationMockRecorder) Apply(db any) *MockMigrationApplyCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockMigration)(nil).Apply), db)
return &MockMigrationApplyCall{Call: call}
}
// MockMigrationApplyCall wrap *gomock.Call
type MockMigrationApplyCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMigrationApplyCall) Return(arg0 error) *MockMigrationApplyCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMigrationApplyCall) Do(f func(Executor) error) *MockMigrationApplyCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMigrationApplyCall) DoAndReturn(f func(Executor) error) *MockMigrationApplyCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// Name mocks base method.
func (m *MockMigration) Name() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Name")
ret0, _ := ret[0].(string)
return ret0
}
// Name indicates an expected call of Name.
func (mr *MockMigrationMockRecorder) Name() *MockMigrationNameCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockMigration)(nil).Name))
return &MockMigrationNameCall{Call: call}
}
// MockMigrationNameCall wrap *gomock.Call
type MockMigrationNameCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMigrationNameCall) Return(arg0 string) *MockMigrationNameCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMigrationNameCall) Do(f func() string) *MockMigrationNameCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMigrationNameCall) DoAndReturn(f func() string) *MockMigrationNameCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// Order mocks base method.
func (m *MockMigration) Order() int {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Order")
ret0, _ := ret[0].(int)
return ret0
}
// Order indicates an expected call of Order.
func (mr *MockMigrationMockRecorder) Order() *MockMigrationOrderCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Order", reflect.TypeOf((*MockMigration)(nil).Order))
return &MockMigrationOrderCall{Call: call}
}
// MockMigrationOrderCall wrap *gomock.Call
type MockMigrationOrderCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMigrationOrderCall) Return(arg0 int) *MockMigrationOrderCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMigrationOrderCall) Do(f func() int) *MockMigrationOrderCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMigrationOrderCall) DoAndReturn(f func() int) *MockMigrationOrderCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// Rollback mocks base method.
func (m *MockMigration) Rollback() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Rollback")
ret0, _ := ret[0].(error)
return ret0
}
// Rollback indicates an expected call of Rollback.
func (mr *MockMigrationMockRecorder) Rollback() *MockMigrationRollbackCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Rollback", reflect.TypeOf((*MockMigration)(nil).Rollback))
return &MockMigrationRollbackCall{Call: call}
}
// MockMigrationRollbackCall wrap *gomock.Call
type MockMigrationRollbackCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMigrationRollbackCall) Return(arg0 error) *MockMigrationRollbackCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMigrationRollbackCall) Do(f func() error) *MockMigrationRollbackCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMigrationRollbackCall) DoAndReturn(f func() error) *MockMigrationRollbackCall {
c.Call = c.Call.DoAndReturn(f)
return c
}