db-migrator.go

Форк
0
237 строк · 7.6 Кб
1
// Code generated by mockery. DO NOT EDIT.
2

3
package mockaction
4

5
import (
6
	context "context"
7

8
	entity "github.com/raoptimus/db-migrator.go/internal/dal/entity"
9
	mock "github.com/stretchr/testify/mock"
10
)
11

12
// MigrationService is an autogenerated mock type for the MigrationService type
13
type MigrationService struct {
14
	mock.Mock
15
}
16

17
type MigrationService_Expecter struct {
18
	mock *mock.Mock
19
}
20

21
func (_m *MigrationService) EXPECT() *MigrationService_Expecter {
22
	return &MigrationService_Expecter{mock: &_m.Mock}
23
}
24

25
// ApplyFile provides a mock function with given fields: ctx, _a1, fileName, safely
26
func (_m *MigrationService) ApplyFile(ctx context.Context, _a1 *entity.Migration, fileName string, safely bool) error {
27
	ret := _m.Called(ctx, _a1, fileName, safely)
28

29
	var r0 error
30
	if rf, ok := ret.Get(0).(func(context.Context, *entity.Migration, string, bool) error); ok {
31
		r0 = rf(ctx, _a1, fileName, safely)
32
	} else {
33
		r0 = ret.Error(0)
34
	}
35

36
	return r0
37
}
38

39
// MigrationService_ApplyFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyFile'
40
type MigrationService_ApplyFile_Call struct {
41
	*mock.Call
42
}
43

44
// ApplyFile is a helper method to define mock.On call
45
//   - ctx context.Context
46
//   - _a1 *entity.Migration
47
//   - fileName string
48
//   - safely bool
49
func (_e *MigrationService_Expecter) ApplyFile(ctx interface{}, _a1 interface{}, fileName interface{}, safely interface{}) *MigrationService_ApplyFile_Call {
50
	return &MigrationService_ApplyFile_Call{Call: _e.mock.On("ApplyFile", ctx, _a1, fileName, safely)}
51
}
52

53
func (_c *MigrationService_ApplyFile_Call) Run(run func(ctx context.Context, _a1 *entity.Migration, fileName string, safely bool)) *MigrationService_ApplyFile_Call {
54
	_c.Call.Run(func(args mock.Arguments) {
55
		run(args[0].(context.Context), args[1].(*entity.Migration), args[2].(string), args[3].(bool))
56
	})
57
	return _c
58
}
59

60
func (_c *MigrationService_ApplyFile_Call) Return(_a0 error) *MigrationService_ApplyFile_Call {
61
	_c.Call.Return(_a0)
62
	return _c
63
}
64

65
func (_c *MigrationService_ApplyFile_Call) RunAndReturn(run func(context.Context, *entity.Migration, string, bool) error) *MigrationService_ApplyFile_Call {
66
	_c.Call.Return(run)
67
	return _c
68
}
69

70
// Migrations provides a mock function with given fields: ctx, limit
71
func (_m *MigrationService) Migrations(ctx context.Context, limit int) (entity.Migrations, error) {
72
	ret := _m.Called(ctx, limit)
73

74
	var r0 entity.Migrations
75
	var r1 error
76
	if rf, ok := ret.Get(0).(func(context.Context, int) (entity.Migrations, error)); ok {
77
		return rf(ctx, limit)
78
	}
79
	if rf, ok := ret.Get(0).(func(context.Context, int) entity.Migrations); ok {
80
		r0 = rf(ctx, limit)
81
	} else {
82
		if ret.Get(0) != nil {
83
			r0 = ret.Get(0).(entity.Migrations)
84
		}
85
	}
86

87
	if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
88
		r1 = rf(ctx, limit)
89
	} else {
90
		r1 = ret.Error(1)
91
	}
92

93
	return r0, r1
94
}
95

96
// MigrationService_Migrations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Migrations'
97
type MigrationService_Migrations_Call struct {
98
	*mock.Call
99
}
100

101
// Migrations is a helper method to define mock.On call
102
//   - ctx context.Context
103
//   - limit int
104
func (_e *MigrationService_Expecter) Migrations(ctx interface{}, limit interface{}) *MigrationService_Migrations_Call {
105
	return &MigrationService_Migrations_Call{Call: _e.mock.On("Migrations", ctx, limit)}
106
}
107

108
func (_c *MigrationService_Migrations_Call) Run(run func(ctx context.Context, limit int)) *MigrationService_Migrations_Call {
109
	_c.Call.Run(func(args mock.Arguments) {
110
		run(args[0].(context.Context), args[1].(int))
111
	})
112
	return _c
113
}
114

115
func (_c *MigrationService_Migrations_Call) Return(_a0 entity.Migrations, _a1 error) *MigrationService_Migrations_Call {
116
	_c.Call.Return(_a0, _a1)
117
	return _c
118
}
119

120
func (_c *MigrationService_Migrations_Call) RunAndReturn(run func(context.Context, int) (entity.Migrations, error)) *MigrationService_Migrations_Call {
121
	_c.Call.Return(run)
122
	return _c
123
}
124

125
// NewMigrations provides a mock function with given fields: ctx
126
func (_m *MigrationService) NewMigrations(ctx context.Context) (entity.Migrations, error) {
127
	ret := _m.Called(ctx)
128

129
	var r0 entity.Migrations
130
	var r1 error
131
	if rf, ok := ret.Get(0).(func(context.Context) (entity.Migrations, error)); ok {
132
		return rf(ctx)
133
	}
134
	if rf, ok := ret.Get(0).(func(context.Context) entity.Migrations); ok {
135
		r0 = rf(ctx)
136
	} else {
137
		if ret.Get(0) != nil {
138
			r0 = ret.Get(0).(entity.Migrations)
139
		}
140
	}
141

142
	if rf, ok := ret.Get(1).(func(context.Context) error); ok {
143
		r1 = rf(ctx)
144
	} else {
145
		r1 = ret.Error(1)
146
	}
147

148
	return r0, r1
149
}
150

151
// MigrationService_NewMigrations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewMigrations'
152
type MigrationService_NewMigrations_Call struct {
153
	*mock.Call
154
}
155

156
// NewMigrations is a helper method to define mock.On call
157
//   - ctx context.Context
158
func (_e *MigrationService_Expecter) NewMigrations(ctx interface{}) *MigrationService_NewMigrations_Call {
159
	return &MigrationService_NewMigrations_Call{Call: _e.mock.On("NewMigrations", ctx)}
160
}
161

162
func (_c *MigrationService_NewMigrations_Call) Run(run func(ctx context.Context)) *MigrationService_NewMigrations_Call {
163
	_c.Call.Run(func(args mock.Arguments) {
164
		run(args[0].(context.Context))
165
	})
166
	return _c
167
}
168

169
func (_c *MigrationService_NewMigrations_Call) Return(_a0 entity.Migrations, _a1 error) *MigrationService_NewMigrations_Call {
170
	_c.Call.Return(_a0, _a1)
171
	return _c
172
}
173

174
func (_c *MigrationService_NewMigrations_Call) RunAndReturn(run func(context.Context) (entity.Migrations, error)) *MigrationService_NewMigrations_Call {
175
	_c.Call.Return(run)
176
	return _c
177
}
178

179
// RevertFile provides a mock function with given fields: ctx, _a1, fileName, safely
180
func (_m *MigrationService) RevertFile(ctx context.Context, _a1 *entity.Migration, fileName string, safely bool) error {
181
	ret := _m.Called(ctx, _a1, fileName, safely)
182

183
	var r0 error
184
	if rf, ok := ret.Get(0).(func(context.Context, *entity.Migration, string, bool) error); ok {
185
		r0 = rf(ctx, _a1, fileName, safely)
186
	} else {
187
		r0 = ret.Error(0)
188
	}
189

190
	return r0
191
}
192

193
// MigrationService_RevertFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RevertFile'
194
type MigrationService_RevertFile_Call struct {
195
	*mock.Call
196
}
197

198
// RevertFile is a helper method to define mock.On call
199
//   - ctx context.Context
200
//   - _a1 *entity.Migration
201
//   - fileName string
202
//   - safely bool
203
func (_e *MigrationService_Expecter) RevertFile(ctx interface{}, _a1 interface{}, fileName interface{}, safely interface{}) *MigrationService_RevertFile_Call {
204
	return &MigrationService_RevertFile_Call{Call: _e.mock.On("RevertFile", ctx, _a1, fileName, safely)}
205
}
206

207
func (_c *MigrationService_RevertFile_Call) Run(run func(ctx context.Context, _a1 *entity.Migration, fileName string, safely bool)) *MigrationService_RevertFile_Call {
208
	_c.Call.Run(func(args mock.Arguments) {
209
		run(args[0].(context.Context), args[1].(*entity.Migration), args[2].(string), args[3].(bool))
210
	})
211
	return _c
212
}
213

214
func (_c *MigrationService_RevertFile_Call) Return(_a0 error) *MigrationService_RevertFile_Call {
215
	_c.Call.Return(_a0)
216
	return _c
217
}
218

219
func (_c *MigrationService_RevertFile_Call) RunAndReturn(run func(context.Context, *entity.Migration, string, bool) error) *MigrationService_RevertFile_Call {
220
	_c.Call.Return(run)
221
	return _c
222
}
223

224
type mockConstructorTestingTNewMigrationService interface {
225
	mock.TestingT
226
	Cleanup(func())
227
}
228

229
// NewMigrationService creates a new instance of MigrationService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
230
func NewMigrationService(t mockConstructorTestingTNewMigrationService) *MigrationService {
231
	mock := &MigrationService{}
232
	mock.Mock.Test(t)
233

234
	t.Cleanup(func() { mock.AssertExpectations(t) })
235

236
	return mock
237
}
238

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.