github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/module/executiondatasync/execution_data/mock/downloader.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 context "context" 7 8 flow "github.com/onflow/flow-go/model/flow" 9 execution_data "github.com/onflow/flow-go/module/executiondatasync/execution_data" 10 11 mock "github.com/stretchr/testify/mock" 12 ) 13 14 // Downloader is an autogenerated mock type for the Downloader type 15 type Downloader struct { 16 mock.Mock 17 } 18 19 // Done provides a mock function with given fields: 20 func (_m *Downloader) Done() <-chan struct{} { 21 ret := _m.Called() 22 23 var r0 <-chan struct{} 24 if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { 25 r0 = rf() 26 } else { 27 if ret.Get(0) != nil { 28 r0 = ret.Get(0).(<-chan struct{}) 29 } 30 } 31 32 return r0 33 } 34 35 // Get provides a mock function with given fields: ctx, rootID 36 func (_m *Downloader) Get(ctx context.Context, rootID flow.Identifier) (*execution_data.BlockExecutionData, error) { 37 ret := _m.Called(ctx, rootID) 38 39 var r0 *execution_data.BlockExecutionData 40 var r1 error 41 if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*execution_data.BlockExecutionData, error)); ok { 42 return rf(ctx, rootID) 43 } 44 if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) *execution_data.BlockExecutionData); ok { 45 r0 = rf(ctx, rootID) 46 } else { 47 if ret.Get(0) != nil { 48 r0 = ret.Get(0).(*execution_data.BlockExecutionData) 49 } 50 } 51 52 if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier) error); ok { 53 r1 = rf(ctx, rootID) 54 } else { 55 r1 = ret.Error(1) 56 } 57 58 return r0, r1 59 } 60 61 // Ready provides a mock function with given fields: 62 func (_m *Downloader) Ready() <-chan struct{} { 63 ret := _m.Called() 64 65 var r0 <-chan struct{} 66 if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { 67 r0 = rf() 68 } else { 69 if ret.Get(0) != nil { 70 r0 = ret.Get(0).(<-chan struct{}) 71 } 72 } 73 74 return r0 75 } 76 77 type mockConstructorTestingTNewDownloader interface { 78 mock.TestingT 79 Cleanup(func()) 80 } 81 82 // NewDownloader creates a new instance of Downloader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 83 func NewDownloader(t mockConstructorTestingTNewDownloader) *Downloader { 84 mock := &Downloader{} 85 mock.Mock.Test(t) 86 87 t.Cleanup(func() { mock.AssertExpectations(t) }) 88 89 return mock 90 }