securitylease_mock_test.go RawHistoryFolder
1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package app
6
7import (
8 "os"
9
10 mock "github.com/stretchr/testify/mock"
11)
12
13// newMocksecurityLeaseCard creates a new instance of mocksecurityLeaseCard. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
14// The first argument is typically a *testing.T value.
15func newMocksecurityLeaseCard(t interface {
16 mock.TestingT
17 Cleanup(func())
18}) *mocksecurityLeaseCard {
19 if helper, ok := t.(interface{ Helper() }); ok {
20 helper.Helper()
21 }
22
23 mock := &mocksecurityLeaseCard{}
24 mock.Mock.Test(t)
25
26 t.Cleanup(func() {
27 if helper, ok := t.(interface{ Helper() }); ok {
28 helper.Helper()
29 }
30 mock.AssertExpectations(t)
31 })
32
33 return mock
34}
35
36// mocksecurityLeaseCard is an autogenerated mock type for the securityLeaseCard type
37type mocksecurityLeaseCard struct {
38 mock.Mock
39}
40
41type mocksecurityLeaseCard_Expecter struct {
42 mock *mock.Mock
43}
44
45func (_m *mocksecurityLeaseCard) EXPECT() *mocksecurityLeaseCard_Expecter {
46 return &mocksecurityLeaseCard_Expecter{mock: &_m.Mock}
47}
48
49// Lease provides a mock function for the type mocksecurityLeaseCard
50func (_mock *mocksecurityLeaseCard) Lease(strings []string) (*os.File, uint32, error) {
51 ret := _mock.Called(strings)
52
53 if len(ret) == 0 {
54 panic("no return value specified for Lease")
55 }
56
57 var r0 *os.File
58 var r1 uint32
59 var r2 error
60 if returnFunc, ok := ret.Get(0).(func([]string) (*os.File, uint32, error)); ok {
61 return returnFunc(strings)
62 }
63 if returnFunc, ok := ret.Get(0).(func([]string) *os.File); ok {
64 r0 = returnFunc(strings)
65 } else {
66 if ret.Get(0) != nil {
67 r0 = ret.Get(0).(*os.File)
68 }
69 }
70 if returnFunc, ok := ret.Get(1).(func([]string) uint32); ok {
71 r1 = returnFunc(strings)
72 } else {
73 r1 = ret.Get(1).(uint32)
74 }
75 if returnFunc, ok := ret.Get(2).(func([]string) error); ok {
76 r2 = returnFunc(strings)
77 } else {
78 r2 = ret.Error(2)
79 }
80 return r0, r1, r2
81}
82
83// mocksecurityLeaseCard_Lease_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Lease'
84type mocksecurityLeaseCard_Lease_Call struct {
85 *mock.Call
86}
87
88// Lease is a helper method to define mock.On call
89// - strings []string
90func (_e *mocksecurityLeaseCard_Expecter) Lease(strings any) *mocksecurityLeaseCard_Lease_Call {
91 return &mocksecurityLeaseCard_Lease_Call{Call: _e.mock.On("Lease", strings)}
92}
93
94func (_c *mocksecurityLeaseCard_Lease_Call) Run(run func(strings []string)) *mocksecurityLeaseCard_Lease_Call {
95 _c.Call.Run(func(args mock.Arguments) {
96 var arg0 []string
97 if args[0] != nil {
98 arg0 = args[0].([]string)
99 }
100 run(
101 arg0,
102 )
103 })
104 return _c
105}
106
107func (_c *mocksecurityLeaseCard_Lease_Call) Return(file *os.File, v uint32, err error) *mocksecurityLeaseCard_Lease_Call {
108 _c.Call.Return(file, v, err)
109 return _c
110}
111
112func (_c *mocksecurityLeaseCard_Lease_Call) RunAndReturn(run func(strings []string) (*os.File, uint32, error)) *mocksecurityLeaseCard_Lease_Call {
113 _c.Call.Return(run)
114 return _c
115}
116
117// LeaseIDs provides a mock function for the type mocksecurityLeaseCard
118func (_mock *mocksecurityLeaseCard) LeaseIDs() []uint32 {
119 ret := _mock.Called()
120
121 if len(ret) == 0 {
122 panic("no return value specified for LeaseIDs")
123 }
124
125 var r0 []uint32
126 if returnFunc, ok := ret.Get(0).(func() []uint32); ok {
127 r0 = returnFunc()
128 } else {
129 if ret.Get(0) != nil {
130 r0 = ret.Get(0).([]uint32)
131 }
132 }
133 return r0
134}
135
136// mocksecurityLeaseCard_LeaseIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LeaseIDs'
137type mocksecurityLeaseCard_LeaseIDs_Call struct {
138 *mock.Call
139}
140
141// LeaseIDs is a helper method to define mock.On call
142func (_e *mocksecurityLeaseCard_Expecter) LeaseIDs() *mocksecurityLeaseCard_LeaseIDs_Call {
143 return &mocksecurityLeaseCard_LeaseIDs_Call{Call: _e.mock.On("LeaseIDs")}
144}
145
146func (_c *mocksecurityLeaseCard_LeaseIDs_Call) Run(run func()) *mocksecurityLeaseCard_LeaseIDs_Call {
147 _c.Call.Run(func(args mock.Arguments) {
148 run()
149 })
150 return _c
151}
152
153func (_c *mocksecurityLeaseCard_LeaseIDs_Call) Return(uint32s []uint32) *mocksecurityLeaseCard_LeaseIDs_Call {
154 _c.Call.Return(uint32s)
155 return _c
156}
157
158func (_c *mocksecurityLeaseCard_LeaseIDs_Call) RunAndReturn(run func() []uint32) *mocksecurityLeaseCard_LeaseIDs_Call {
159 _c.Call.Return(run)
160 return _c
161}
162
163// Path provides a mock function for the type mocksecurityLeaseCard
164func (_mock *mocksecurityLeaseCard) Path() string {
165 ret := _mock.Called()
166
167 if len(ret) == 0 {
168 panic("no return value specified for Path")
169 }
170
171 var r0 string
172 if returnFunc, ok := ret.Get(0).(func() string); ok {
173 r0 = returnFunc()
174 } else {
175 r0 = ret.Get(0).(string)
176 }
177 return r0
178}
179
180// mocksecurityLeaseCard_Path_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Path'
181type mocksecurityLeaseCard_Path_Call struct {
182 *mock.Call
183}
184
185// Path is a helper method to define mock.On call
186func (_e *mocksecurityLeaseCard_Expecter) Path() *mocksecurityLeaseCard_Path_Call {
187 return &mocksecurityLeaseCard_Path_Call{Call: _e.mock.On("Path")}
188}
189
190func (_c *mocksecurityLeaseCard_Path_Call) Run(run func()) *mocksecurityLeaseCard_Path_Call {
191 _c.Call.Run(func(args mock.Arguments) {
192 run()
193 })
194 return _c
195}
196
197func (_c *mocksecurityLeaseCard_Path_Call) Return(s string) *mocksecurityLeaseCard_Path_Call {
198 _c.Call.Return(s)
199 return _c
200}
201
202func (_c *mocksecurityLeaseCard_Path_Call) RunAndReturn(run func() string) *mocksecurityLeaseCard_Path_Call {
203 _c.Call.Return(run)
204 return _c
205}
206
207// Revoke provides a mock function for the type mocksecurityLeaseCard
208func (_mock *mocksecurityLeaseCard) Revoke(v uint32) error {
209 ret := _mock.Called(v)
210
211 if len(ret) == 0 {
212 panic("no return value specified for Revoke")
213 }
214
215 var r0 error
216 if returnFunc, ok := ret.Get(0).(func(uint32) error); ok {
217 r0 = returnFunc(v)
218 } else {
219 r0 = ret.Error(0)
220 }
221 return r0
222}
223
224// mocksecurityLeaseCard_Revoke_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Revoke'
225type mocksecurityLeaseCard_Revoke_Call struct {
226 *mock.Call
227}
228
229// Revoke is a helper method to define mock.On call
230// - v uint32
231func (_e *mocksecurityLeaseCard_Expecter) Revoke(v any) *mocksecurityLeaseCard_Revoke_Call {
232 return &mocksecurityLeaseCard_Revoke_Call{Call: _e.mock.On("Revoke", v)}
233}
234
235func (_c *mocksecurityLeaseCard_Revoke_Call) Run(run func(v uint32)) *mocksecurityLeaseCard_Revoke_Call {
236 _c.Call.Run(func(args mock.Arguments) {
237 var arg0 uint32
238 if args[0] != nil {
239 arg0 = args[0].(uint32)
240 }
241 run(
242 arg0,
243 )
244 })
245 return _c
246}
247
248func (_c *mocksecurityLeaseCard_Revoke_Call) Return(err error) *mocksecurityLeaseCard_Revoke_Call {
249 _c.Call.Return(err)
250 return _c
251}
252
253func (_c *mocksecurityLeaseCard_Revoke_Call) RunAndReturn(run func(v uint32) error) *mocksecurityLeaseCard_Revoke_Call {
254 _c.Call.Return(run)
255 return _c
256}