// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" mock "github.com/stretchr/testify/mock" ) // NewMockLockStore creates a new instance of MockLockStore. 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 NewMockLockStore(t interface { mock.TestingT Cleanup(func()) }) *MockLockStore { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MockLockStore{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MockLockStore is an autogenerated mock type for the LockStore type type MockLockStore struct { mock.Mock } type MockLockStore_Expecter struct { mock *mock.Mock } func (_m *MockLockStore) EXPECT() *MockLockStore_Expecter { return &MockLockStore_Expecter{mock: &_m.Mock} } // AcquireSweepLock provides a mock function for the type MockLockStore func (_mock *MockLockStore) AcquireSweepLock(ctx context.Context) (func(), bool, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for AcquireSweepLock") } var r0 func() var r1 bool var r2 error if returnFunc, ok := ret.Get(0).(func(context.Context) (func(), bool, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) func()); ok { r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(func()) } } if returnFunc, ok := ret.Get(1).(func(context.Context) bool); ok { r1 = returnFunc(ctx) } else { r1 = ret.Get(1).(bool) } if returnFunc, ok := ret.Get(2).(func(context.Context) error); ok { r2 = returnFunc(ctx) } else { r2 = ret.Error(2) } return r0, r1, r2 } // MockLockStore_AcquireSweepLock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AcquireSweepLock' type MockLockStore_AcquireSweepLock_Call struct { *mock.Call } // AcquireSweepLock is a helper method to define mock.On call // - ctx context.Context func (_e *MockLockStore_Expecter) AcquireSweepLock(ctx any) *MockLockStore_AcquireSweepLock_Call { return &MockLockStore_AcquireSweepLock_Call{Call: _e.mock.On("AcquireSweepLock", ctx)} } func (_c *MockLockStore_AcquireSweepLock_Call) Run(run func(ctx context.Context)) *MockLockStore_AcquireSweepLock_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 *MockLockStore_AcquireSweepLock_Call) Return(release func(), acquired bool, err error) *MockLockStore_AcquireSweepLock_Call { _c.Call.Return(release, acquired, err) return _c } func (_c *MockLockStore_AcquireSweepLock_Call) RunAndReturn(run func(ctx context.Context) (func(), bool, error)) *MockLockStore_AcquireSweepLock_Call { _c.Call.Return(run) return _c }