// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" mock "github.com/stretchr/testify/mock" ) // 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. // The first argument is typically a *testing.T value. func NewMockIdleInhibitor(t interface { mock.TestingT Cleanup(func()) }) *MockIdleInhibitor { mock := &MockIdleInhibitor{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // MockIdleInhibitor is an autogenerated mock type for the IdleInhibitor type type MockIdleInhibitor struct { mock.Mock } type MockIdleInhibitor_Expecter struct { mock *mock.Mock } func (_m *MockIdleInhibitor) EXPECT() *MockIdleInhibitor_Expecter { return &MockIdleInhibitor_Expecter{mock: &_m.Mock} } // Close provides a mock function for the type MockIdleInhibitor func (_mock *MockIdleInhibitor) Close() error { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Close") } var r0 error if returnFunc, ok := ret.Get(0).(func() error); ok { r0 = returnFunc() } else { r0 = ret.Error(0) } return r0 } // MockIdleInhibitor_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' type MockIdleInhibitor_Close_Call struct { *mock.Call } // Close is a helper method to define mock.On call func (_e *MockIdleInhibitor_Expecter) Close() *MockIdleInhibitor_Close_Call { return &MockIdleInhibitor_Close_Call{Call: _e.mock.On("Close")} } func (_c *MockIdleInhibitor_Close_Call) Run(run func()) *MockIdleInhibitor_Close_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockIdleInhibitor_Close_Call) Return(err error) *MockIdleInhibitor_Close_Call { _c.Call.Return(err) return _c } func (_c *MockIdleInhibitor_Close_Call) RunAndReturn(run func() error) *MockIdleInhibitor_Close_Call { _c.Call.Return(run) return _c } // Inhibit provides a mock function for the type MockIdleInhibitor func (_mock *MockIdleInhibitor) Inhibit(ctx context.Context, reason string) error { ret := _mock.Called(ctx, reason) if len(ret) == 0 { panic("no return value specified for Inhibit") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = returnFunc(ctx, reason) } else { r0 = ret.Error(0) } return r0 } // MockIdleInhibitor_Inhibit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Inhibit' type MockIdleInhibitor_Inhibit_Call struct { *mock.Call } // Inhibit is a helper method to define mock.On call // - ctx context.Context // - reason string func (_e *MockIdleInhibitor_Expecter) Inhibit(ctx any, reason any) *MockIdleInhibitor_Inhibit_Call { return &MockIdleInhibitor_Inhibit_Call{Call: _e.mock.On("Inhibit", ctx, reason)} } func (_c *MockIdleInhibitor_Inhibit_Call) Run(run func(ctx context.Context, reason string)) *MockIdleInhibitor_Inhibit_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } run( arg0, arg1, ) }) return _c } func (_c *MockIdleInhibitor_Inhibit_Call) Return(err error) *MockIdleInhibitor_Inhibit_Call { _c.Call.Return(err) return _c } func (_c *MockIdleInhibitor_Inhibit_Call) RunAndReturn(run func(ctx context.Context, reason string) error) *MockIdleInhibitor_Inhibit_Call { _c.Call.Return(run) return _c } // IsInhibited provides a mock function for the type MockIdleInhibitor func (_mock *MockIdleInhibitor) IsInhibited() bool { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for IsInhibited") } var r0 bool if returnFunc, ok := ret.Get(0).(func() bool); ok { r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } return r0 } // MockIdleInhibitor_IsInhibited_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsInhibited' type MockIdleInhibitor_IsInhibited_Call struct { *mock.Call } // IsInhibited is a helper method to define mock.On call func (_e *MockIdleInhibitor_Expecter) IsInhibited() *MockIdleInhibitor_IsInhibited_Call { return &MockIdleInhibitor_IsInhibited_Call{Call: _e.mock.On("IsInhibited")} } func (_c *MockIdleInhibitor_IsInhibited_Call) Run(run func()) *MockIdleInhibitor_IsInhibited_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockIdleInhibitor_IsInhibited_Call) Return(b bool) *MockIdleInhibitor_IsInhibited_Call { _c.Call.Return(b) return _c } func (_c *MockIdleInhibitor_IsInhibited_Call) RunAndReturn(run func() bool) *MockIdleInhibitor_IsInhibited_Call { _c.Call.Return(run) return _c } // Uninhibit provides a mock function for the type MockIdleInhibitor func (_mock *MockIdleInhibitor) Uninhibit(ctx context.Context) error { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for Uninhibit") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { r0 = returnFunc(ctx) } else { r0 = ret.Error(0) } return r0 } // MockIdleInhibitor_Uninhibit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Uninhibit' type MockIdleInhibitor_Uninhibit_Call struct { *mock.Call } // Uninhibit is a helper method to define mock.On call // - ctx context.Context func (_e *MockIdleInhibitor_Expecter) Uninhibit(ctx any) *MockIdleInhibitor_Uninhibit_Call { return &MockIdleInhibitor_Uninhibit_Call{Call: _e.mock.On("Uninhibit", ctx)} } func (_c *MockIdleInhibitor_Uninhibit_Call) Run(run func(ctx context.Context)) *MockIdleInhibitor_Uninhibit_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *MockIdleInhibitor_Uninhibit_Call) Return(err error) *MockIdleInhibitor_Uninhibit_Call { _c.Call.Return(err) return _c } func (_c *MockIdleInhibitor_Uninhibit_Call) RunAndReturn(run func(ctx context.Context) error) *MockIdleInhibitor_Uninhibit_Call { _c.Call.Return(run) return _c }