github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/network/mocknetwork/blob_getter.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mocknetwork 4 5 import ( 6 blocks "github.com/ipfs/go-block-format" 7 cid "github.com/ipfs/go-cid" 8 9 context "context" 10 11 mock "github.com/stretchr/testify/mock" 12 ) 13 14 // BlobGetter is an autogenerated mock type for the BlobGetter type 15 type BlobGetter struct { 16 mock.Mock 17 } 18 19 // GetBlob provides a mock function with given fields: ctx, c 20 func (_m *BlobGetter) GetBlob(ctx context.Context, c cid.Cid) (blocks.Block, error) { 21 ret := _m.Called(ctx, c) 22 23 var r0 blocks.Block 24 var r1 error 25 if rf, ok := ret.Get(0).(func(context.Context, cid.Cid) (blocks.Block, error)); ok { 26 return rf(ctx, c) 27 } 28 if rf, ok := ret.Get(0).(func(context.Context, cid.Cid) blocks.Block); ok { 29 r0 = rf(ctx, c) 30 } else { 31 if ret.Get(0) != nil { 32 r0 = ret.Get(0).(blocks.Block) 33 } 34 } 35 36 if rf, ok := ret.Get(1).(func(context.Context, cid.Cid) error); ok { 37 r1 = rf(ctx, c) 38 } else { 39 r1 = ret.Error(1) 40 } 41 42 return r0, r1 43 } 44 45 // GetBlobs provides a mock function with given fields: ctx, ks 46 func (_m *BlobGetter) GetBlobs(ctx context.Context, ks []cid.Cid) <-chan blocks.Block { 47 ret := _m.Called(ctx, ks) 48 49 var r0 <-chan blocks.Block 50 if rf, ok := ret.Get(0).(func(context.Context, []cid.Cid) <-chan blocks.Block); ok { 51 r0 = rf(ctx, ks) 52 } else { 53 if ret.Get(0) != nil { 54 r0 = ret.Get(0).(<-chan blocks.Block) 55 } 56 } 57 58 return r0 59 } 60 61 type mockConstructorTestingTNewBlobGetter interface { 62 mock.TestingT 63 Cleanup(func()) 64 } 65 66 // NewBlobGetter creates a new instance of BlobGetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 67 func NewBlobGetter(t mockConstructorTestingTNewBlobGetter) *BlobGetter { 68 mock := &BlobGetter{} 69 mock.Mock.Test(t) 70 71 t.Cleanup(func() { mock.AssertExpectations(t) }) 72 73 return mock 74 }