-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
mock_repository_test.go
101 lines (79 loc) · 2.03 KB
/
mock_repository_test.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
// Code generated by mockery. DO NOT EDIT.
package migrate
import mock "github.com/stretchr/testify/mock"
// mockRepository is an autogenerated mock type for the repository type
type mockRepository struct {
mock.Mock
}
// ApplyMigration provides a mock function with given fields: txFunc
func (_m *mockRepository) ApplyMigration(txFunc func(Tx) error) error {
ret := _m.Called(txFunc)
var r0 error
if rf, ok := ret.Get(0).(func(func(Tx) error) error); ok {
r0 = rf(txFunc)
} else {
r0 = ret.Error(0)
}
return r0
}
// DropSchema provides a mock function with given fields: schemaName
func (_m *mockRepository) DropSchema(schemaName string) error {
ret := _m.Called(schemaName)
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(schemaName)
} else {
r0 = ret.Error(0)
}
return r0
}
// EnsureMigrationTable provides a mock function with given fields:
func (_m *mockRepository) EnsureMigrationTable() error {
ret := _m.Called()
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}
// GetLatestMigrationNumber provides a mock function with given fields:
func (_m *mockRepository) GetLatestMigrationNumber() (uint, error) {
ret := _m.Called()
var r0 uint
if rf, ok := ret.Get(0).(func() uint); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(uint)
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// InsertMigration provides a mock function with given fields: m
func (_m *mockRepository) InsertMigration(m *migration) error {
ret := _m.Called(m)
var r0 error
if rf, ok := ret.Get(0).(func(*migration) error); ok {
r0 = rf(m)
} else {
r0 = ret.Error(0)
}
return r0
}
// RemoveMigrationsAfter provides a mock function with given fields: number
func (_m *mockRepository) RemoveMigrationsAfter(number uint) error {
ret := _m.Called(number)
var r0 error
if rf, ok := ret.Get(0).(func(uint) error); ok {
r0 = rf(number)
} else {
r0 = ret.Error(0)
}
return r0
}