/
CommandContext.go
164 lines (132 loc) · 4.87 KB
/
CommandContext.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
// Code generated by mockery v2.34.2. DO NOT EDIT.
package mocks
import (
repositories "github.com/Goldwin/ies-pik-cms/pkg/auth/repositories"
mock "github.com/stretchr/testify/mock"
)
// CommandContext is an autogenerated mock type for the CommandContext type
type CommandContext struct {
mock.Mock
}
type CommandContext_Expecter struct {
mock *mock.Mock
}
func (_m *CommandContext) EXPECT() *CommandContext_Expecter {
return &CommandContext_Expecter{mock: &_m.Mock}
}
// AccountRepository provides a mock function with given fields:
func (_m *CommandContext) AccountRepository() repositories.AccountRepository {
ret := _m.Called()
var r0 repositories.AccountRepository
if rf, ok := ret.Get(0).(func() repositories.AccountRepository); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(repositories.AccountRepository)
}
}
return r0
}
// CommandContext_AccountRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AccountRepository'
type CommandContext_AccountRepository_Call struct {
*mock.Call
}
// AccountRepository is a helper method to define mock.On call
func (_e *CommandContext_Expecter) AccountRepository() *CommandContext_AccountRepository_Call {
return &CommandContext_AccountRepository_Call{Call: _e.mock.On("AccountRepository")}
}
func (_c *CommandContext_AccountRepository_Call) Run(run func()) *CommandContext_AccountRepository_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *CommandContext_AccountRepository_Call) Return(_a0 repositories.AccountRepository) *CommandContext_AccountRepository_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *CommandContext_AccountRepository_Call) RunAndReturn(run func() repositories.AccountRepository) *CommandContext_AccountRepository_Call {
_c.Call.Return(run)
return _c
}
// OtpRepository provides a mock function with given fields:
func (_m *CommandContext) OtpRepository() repositories.OtpRepository {
ret := _m.Called()
var r0 repositories.OtpRepository
if rf, ok := ret.Get(0).(func() repositories.OtpRepository); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(repositories.OtpRepository)
}
}
return r0
}
// CommandContext_OtpRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OtpRepository'
type CommandContext_OtpRepository_Call struct {
*mock.Call
}
// OtpRepository is a helper method to define mock.On call
func (_e *CommandContext_Expecter) OtpRepository() *CommandContext_OtpRepository_Call {
return &CommandContext_OtpRepository_Call{Call: _e.mock.On("OtpRepository")}
}
func (_c *CommandContext_OtpRepository_Call) Run(run func()) *CommandContext_OtpRepository_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *CommandContext_OtpRepository_Call) Return(_a0 repositories.OtpRepository) *CommandContext_OtpRepository_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *CommandContext_OtpRepository_Call) RunAndReturn(run func() repositories.OtpRepository) *CommandContext_OtpRepository_Call {
_c.Call.Return(run)
return _c
}
// PasswordRepository provides a mock function with given fields:
func (_m *CommandContext) PasswordRepository() repositories.PasswordRepository {
ret := _m.Called()
var r0 repositories.PasswordRepository
if rf, ok := ret.Get(0).(func() repositories.PasswordRepository); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(repositories.PasswordRepository)
}
}
return r0
}
// CommandContext_PasswordRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PasswordRepository'
type CommandContext_PasswordRepository_Call struct {
*mock.Call
}
// PasswordRepository is a helper method to define mock.On call
func (_e *CommandContext_Expecter) PasswordRepository() *CommandContext_PasswordRepository_Call {
return &CommandContext_PasswordRepository_Call{Call: _e.mock.On("PasswordRepository")}
}
func (_c *CommandContext_PasswordRepository_Call) Run(run func()) *CommandContext_PasswordRepository_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *CommandContext_PasswordRepository_Call) Return(_a0 repositories.PasswordRepository) *CommandContext_PasswordRepository_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *CommandContext_PasswordRepository_Call) RunAndReturn(run func() repositories.PasswordRepository) *CommandContext_PasswordRepository_Call {
_c.Call.Return(run)
return _c
}
// NewCommandContext creates a new instance of CommandContext. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewCommandContext(t interface {
mock.TestingT
Cleanup(func())
}) *CommandContext {
mock := &CommandContext{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}