idle_inhibit.go RawHistoryFolder
1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8 "context"
9
10 mock "github.com/stretchr/testify/mock"
11)
12
13// NewMockIdleInhibitor creates a new instance of MockIdleInhibitor. 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 NewMockIdleInhibitor(t interface {
16 mock.TestingT
17 Cleanup(func())
18}) *MockIdleInhibitor {
19 mock := &MockIdleInhibitor{}
20 mock.Mock.Test(t)
21
22 t.Cleanup(func() { mock.AssertExpectations(t) })
23
24 return mock
25}
26
27// MockIdleInhibitor is an autogenerated mock type for the IdleInhibitor type
28type MockIdleInhibitor struct {
29 mock.Mock
30}
31
32type MockIdleInhibitor_Expecter struct {
33 mock *mock.Mock
34}
35
36func (_m *MockIdleInhibitor) EXPECT() *MockIdleInhibitor_Expecter {
37 return &MockIdleInhibitor_Expecter{mock: &_m.Mock}
38}
39
40// Close provides a mock function for the type MockIdleInhibitor
41func (_mock *MockIdleInhibitor) Close() error {
42 ret := _mock.Called()
43
44 if len(ret) == 0 {
45 panic("no return value specified for Close")
46 }
47
48 var r0 error
49 if returnFunc, ok := ret.Get(0).(func() error); ok {
50 r0 = returnFunc()
51 } else {
52 r0 = ret.Error(0)
53 }
54 return r0
55}
56
57// MockIdleInhibitor_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
58type MockIdleInhibitor_Close_Call struct {
59 *mock.Call
60}
61
62// Close is a helper method to define mock.On call
63func (_e *MockIdleInhibitor_Expecter) Close() *MockIdleInhibitor_Close_Call {
64 return &MockIdleInhibitor_Close_Call{Call: _e.mock.On("Close")}
65}
66
67func (_c *MockIdleInhibitor_Close_Call) Run(run func()) *MockIdleInhibitor_Close_Call {
68 _c.Call.Run(func(args mock.Arguments) {
69 run()
70 })
71 return _c
72}
73
74func (_c *MockIdleInhibitor_Close_Call) Return(err error) *MockIdleInhibitor_Close_Call {
75 _c.Call.Return(err)
76 return _c
77}
78
79func (_c *MockIdleInhibitor_Close_Call) RunAndReturn(run func() error) *MockIdleInhibitor_Close_Call {
80 _c.Call.Return(run)
81 return _c
82}
83
84// Inhibit provides a mock function for the type MockIdleInhibitor
85func (_mock *MockIdleInhibitor) Inhibit(ctx context.Context, reason string) error {
86 ret := _mock.Called(ctx, reason)
87
88 if len(ret) == 0 {
89 panic("no return value specified for Inhibit")
90 }
91
92 var r0 error
93 if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
94 r0 = returnFunc(ctx, reason)
95 } else {
96 r0 = ret.Error(0)
97 }
98 return r0
99}
100
101// MockIdleInhibitor_Inhibit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Inhibit'
102type MockIdleInhibitor_Inhibit_Call struct {
103 *mock.Call
104}
105
106// Inhibit is a helper method to define mock.On call
107// - ctx context.Context
108// - reason string
109func (_e *MockIdleInhibitor_Expecter) Inhibit(ctx any, reason any) *MockIdleInhibitor_Inhibit_Call {
110 return &MockIdleInhibitor_Inhibit_Call{Call: _e.mock.On("Inhibit", ctx, reason)}
111}
112
113func (_c *MockIdleInhibitor_Inhibit_Call) Run(run func(ctx context.Context, reason string)) *MockIdleInhibitor_Inhibit_Call {
114 _c.Call.Run(func(args mock.Arguments) {
115 var arg0 context.Context
116 if args[0] != nil {
117 arg0 = args[0].(context.Context)
118 }
119 var arg1 string
120 if args[1] != nil {
121 arg1 = args[1].(string)
122 }
123 run(
124 arg0,
125 arg1,
126 )
127 })
128 return _c
129}
130
131func (_c *MockIdleInhibitor_Inhibit_Call) Return(err error) *MockIdleInhibitor_Inhibit_Call {
132 _c.Call.Return(err)
133 return _c
134}
135
136func (_c *MockIdleInhibitor_Inhibit_Call) RunAndReturn(run func(ctx context.Context, reason string) error) *MockIdleInhibitor_Inhibit_Call {
137 _c.Call.Return(run)
138 return _c
139}
140
141// IsInhibited provides a mock function for the type MockIdleInhibitor
142func (_mock *MockIdleInhibitor) IsInhibited() bool {
143 ret := _mock.Called()
144
145 if len(ret) == 0 {
146 panic("no return value specified for IsInhibited")
147 }
148
149 var r0 bool
150 if returnFunc, ok := ret.Get(0).(func() bool); ok {
151 r0 = returnFunc()
152 } else {
153 r0 = ret.Get(0).(bool)
154 }
155 return r0
156}
157
158// MockIdleInhibitor_IsInhibited_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsInhibited'
159type MockIdleInhibitor_IsInhibited_Call struct {
160 *mock.Call
161}
162
163// IsInhibited is a helper method to define mock.On call
164func (_e *MockIdleInhibitor_Expecter) IsInhibited() *MockIdleInhibitor_IsInhibited_Call {
165 return &MockIdleInhibitor_IsInhibited_Call{Call: _e.mock.On("IsInhibited")}
166}
167
168func (_c *MockIdleInhibitor_IsInhibited_Call) Run(run func()) *MockIdleInhibitor_IsInhibited_Call {
169 _c.Call.Run(func(args mock.Arguments) {
170 run()
171 })
172 return _c
173}
174
175func (_c *MockIdleInhibitor_IsInhibited_Call) Return(b bool) *MockIdleInhibitor_IsInhibited_Call {
176 _c.Call.Return(b)
177 return _c
178}
179
180func (_c *MockIdleInhibitor_IsInhibited_Call) RunAndReturn(run func() bool) *MockIdleInhibitor_IsInhibited_Call {
181 _c.Call.Return(run)
182 return _c
183}
184
185// Uninhibit provides a mock function for the type MockIdleInhibitor
186func (_mock *MockIdleInhibitor) Uninhibit(ctx context.Context) error {
187 ret := _mock.Called(ctx)
188
189 if len(ret) == 0 {
190 panic("no return value specified for Uninhibit")
191 }
192
193 var r0 error
194 if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
195 r0 = returnFunc(ctx)
196 } else {
197 r0 = ret.Error(0)
198 }
199 return r0
200}
201
202// MockIdleInhibitor_Uninhibit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Uninhibit'
203type MockIdleInhibitor_Uninhibit_Call struct {
204 *mock.Call
205}
206
207// Uninhibit is a helper method to define mock.On call
208// - ctx context.Context
209func (_e *MockIdleInhibitor_Expecter) Uninhibit(ctx any) *MockIdleInhibitor_Uninhibit_Call {
210 return &MockIdleInhibitor_Uninhibit_Call{Call: _e.mock.On("Uninhibit", ctx)}
211}
212
213func (_c *MockIdleInhibitor_Uninhibit_Call) Run(run func(ctx context.Context)) *MockIdleInhibitor_Uninhibit_Call {
214 _c.Call.Run(func(args mock.Arguments) {
215 var arg0 context.Context
216 if args[0] != nil {
217 arg0 = args[0].(context.Context)
218 }
219 run(
220 arg0,
221 )
222 })
223 return _c
224}
225
226func (_c *MockIdleInhibitor_Uninhibit_Call) Return(err error) *MockIdleInhibitor_Uninhibit_Call {
227 _c.Call.Return(err)
228 return _c
229}
230
231func (_c *MockIdleInhibitor_Uninhibit_Call) RunAndReturn(run func(ctx context.Context) error) *MockIdleInhibitor_Uninhibit_Call {
232 _c.Call.Return(run)
233 return _c
234}