// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" mock "github.com/stretchr/testify/mock" "github.com/vmware-tanzu/velero/pkg/cbtservice" ) // NewService creates a new instance of Service. 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 NewService(t interface { mock.TestingT Cleanup(func()) }) *Service { mock := &Service{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // Service is an autogenerated mock type for the Service type type Service struct { mock.Mock } type Service_Expecter struct { mock *mock.Mock } func (_m *Service) EXPECT() *Service_Expecter { return &Service_Expecter{mock: &_m.Mock} } // GetAllocatedBlocks provides a mock function for the type Service func (_mock *Service) GetAllocatedBlocks(ctx context.Context, snapshot string, record func([]cbtservice.Range) error) error { ret := _mock.Called(ctx, snapshot, record) if len(ret) == 0 { panic("no return value specified for GetAllocatedBlocks") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, func([]cbtservice.Range) error) error); ok { r0 = returnFunc(ctx, snapshot, record) } else { r0 = ret.Error(0) } return r0 } // Service_GetAllocatedBlocks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllocatedBlocks' type Service_GetAllocatedBlocks_Call struct { *mock.Call } // GetAllocatedBlocks is a helper method to define mock.On call // - ctx context.Context // - snapshot string // - record func([]cbtservice.Range) error func (_e *Service_Expecter) GetAllocatedBlocks(ctx interface{}, snapshot interface{}, record interface{}) *Service_GetAllocatedBlocks_Call { return &Service_GetAllocatedBlocks_Call{Call: _e.mock.On("GetAllocatedBlocks", ctx, snapshot, record)} } func (_c *Service_GetAllocatedBlocks_Call) Run(run func(ctx context.Context, snapshot string, record func([]cbtservice.Range) error)) *Service_GetAllocatedBlocks_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) } var arg2 func([]cbtservice.Range) error if args[2] != nil { arg2 = args[2].(func([]cbtservice.Range) error) } run( arg0, arg1, arg2, ) }) return _c } func (_c *Service_GetAllocatedBlocks_Call) Return(err error) *Service_GetAllocatedBlocks_Call { _c.Call.Return(err) return _c } func (_c *Service_GetAllocatedBlocks_Call) RunAndReturn(run func(ctx context.Context, snapshot string, record func([]cbtservice.Range) error) error) *Service_GetAllocatedBlocks_Call { _c.Call.Return(run) return _c } // GetChangedBlocks provides a mock function for the type Service func (_mock *Service) GetChangedBlocks(ctx context.Context, snapshot string, changeID string, record func([]cbtservice.Range) error) error { ret := _mock.Called(ctx, snapshot, changeID, record) if len(ret) == 0 { panic("no return value specified for GetChangedBlocks") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, func([]cbtservice.Range) error) error); ok { r0 = returnFunc(ctx, snapshot, changeID, record) } else { r0 = ret.Error(0) } return r0 } // Service_GetChangedBlocks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChangedBlocks' type Service_GetChangedBlocks_Call struct { *mock.Call } // GetChangedBlocks is a helper method to define mock.On call // - ctx context.Context // - snapshot string // - changeID string // - record func([]cbtservice.Range) error func (_e *Service_Expecter) GetChangedBlocks(ctx interface{}, snapshot interface{}, changeID interface{}, record interface{}) *Service_GetChangedBlocks_Call { return &Service_GetChangedBlocks_Call{Call: _e.mock.On("GetChangedBlocks", ctx, snapshot, changeID, record)} } func (_c *Service_GetChangedBlocks_Call) Run(run func(ctx context.Context, snapshot string, changeID string, record func([]cbtservice.Range) error)) *Service_GetChangedBlocks_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) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } var arg3 func([]cbtservice.Range) error if args[3] != nil { arg3 = args[3].(func([]cbtservice.Range) error) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *Service_GetChangedBlocks_Call) Return(err error) *Service_GetChangedBlocks_Call { _c.Call.Return(err) return _c } func (_c *Service_GetChangedBlocks_Call) RunAndReturn(run func(ctx context.Context, snapshot string, changeID string, record func([]cbtservice.Range) error) error) *Service_GetChangedBlocks_Call { _c.Call.Return(run) return _c }