db-migrator.go
127 строк · 2.9 Кб
1// Code generated by mockery. DO NOT EDIT.
2
3package mockaction
4
5import mock "github.com/stretchr/testify/mock"
6
7// File is an autogenerated mock type for the File type
8type File struct {
9mock.Mock
10}
11
12type File_Expecter struct {
13mock *mock.Mock
14}
15
16func (_m *File) EXPECT() *File_Expecter {
17return &File_Expecter{mock: &_m.Mock}
18}
19
20// Create provides a mock function with given fields: filename
21func (_m *File) Create(filename string) error {
22ret := _m.Called(filename)
23
24var r0 error
25if rf, ok := ret.Get(0).(func(string) error); ok {
26r0 = rf(filename)
27} else {
28r0 = ret.Error(0)
29}
30
31return r0
32}
33
34// File_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'
35type File_Create_Call struct {
36*mock.Call
37}
38
39// Create is a helper method to define mock.On call
40// - filename string
41func (_e *File_Expecter) Create(filename interface{}) *File_Create_Call {
42return &File_Create_Call{Call: _e.mock.On("Create", filename)}
43}
44
45func (_c *File_Create_Call) Run(run func(filename string)) *File_Create_Call {
46_c.Call.Run(func(args mock.Arguments) {
47run(args[0].(string))
48})
49return _c
50}
51
52func (_c *File_Create_Call) Return(_a0 error) *File_Create_Call {
53_c.Call.Return(_a0)
54return _c
55}
56
57func (_c *File_Create_Call) RunAndReturn(run func(string) error) *File_Create_Call {
58_c.Call.Return(run)
59return _c
60}
61
62// Exists provides a mock function with given fields: path
63func (_m *File) Exists(path string) (bool, error) {
64ret := _m.Called(path)
65
66var r0 bool
67var r1 error
68if rf, ok := ret.Get(0).(func(string) (bool, error)); ok {
69return rf(path)
70}
71if rf, ok := ret.Get(0).(func(string) bool); ok {
72r0 = rf(path)
73} else {
74r0 = ret.Get(0).(bool)
75}
76
77if rf, ok := ret.Get(1).(func(string) error); ok {
78r1 = rf(path)
79} else {
80r1 = ret.Error(1)
81}
82
83return r0, r1
84}
85
86// File_Exists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exists'
87type File_Exists_Call struct {
88*mock.Call
89}
90
91// Exists is a helper method to define mock.On call
92// - path string
93func (_e *File_Expecter) Exists(path interface{}) *File_Exists_Call {
94return &File_Exists_Call{Call: _e.mock.On("Exists", path)}
95}
96
97func (_c *File_Exists_Call) Run(run func(path string)) *File_Exists_Call {
98_c.Call.Run(func(args mock.Arguments) {
99run(args[0].(string))
100})
101return _c
102}
103
104func (_c *File_Exists_Call) Return(_a0 bool, _a1 error) *File_Exists_Call {
105_c.Call.Return(_a0, _a1)
106return _c
107}
108
109func (_c *File_Exists_Call) RunAndReturn(run func(string) (bool, error)) *File_Exists_Call {
110_c.Call.Return(run)
111return _c
112}
113
114type mockConstructorTestingTNewFile interface {
115mock.TestingT
116Cleanup(func())
117}
118
119// NewFile creates a new instance of File. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
120func NewFile(t mockConstructorTestingTNewFile) *File {
121mock := &File{}
122mock.Mock.Test(t)
123
124t.Cleanup(func() { mock.AssertExpectations(t) })
125
126return mock
127}
128