github.com/koko1123/flow-go-1@v0.29.6/network/mocknetwork/blob_getter.go (about)

     1  // Code generated by mockery v2.13.1. 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  	if rf, ok := ret.Get(0).(func(context.Context, cid.Cid) blocks.Block); ok {
    25  		r0 = rf(ctx, c)
    26  	} else {
    27  		if ret.Get(0) != nil {
    28  			r0 = ret.Get(0).(blocks.Block)
    29  		}
    30  	}
    31  
    32  	var r1 error
    33  	if rf, ok := ret.Get(1).(func(context.Context, cid.Cid) error); ok {
    34  		r1 = rf(ctx, c)
    35  	} else {
    36  		r1 = ret.Error(1)
    37  	}
    38  
    39  	return r0, r1
    40  }
    41  
    42  // GetBlobs provides a mock function with given fields: ctx, ks
    43  func (_m *BlobGetter) GetBlobs(ctx context.Context, ks []cid.Cid) <-chan blocks.Block {
    44  	ret := _m.Called(ctx, ks)
    45  
    46  	var r0 <-chan blocks.Block
    47  	if rf, ok := ret.Get(0).(func(context.Context, []cid.Cid) <-chan blocks.Block); ok {
    48  		r0 = rf(ctx, ks)
    49  	} else {
    50  		if ret.Get(0) != nil {
    51  			r0 = ret.Get(0).(<-chan blocks.Block)
    52  		}
    53  	}
    54  
    55  	return r0
    56  }
    57  
    58  type mockConstructorTestingTNewBlobGetter interface {
    59  	mock.TestingT
    60  	Cleanup(func())
    61  }
    62  
    63  // 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.
    64  func NewBlobGetter(t mockConstructorTestingTNewBlobGetter) *BlobGetter {
    65  	mock := &BlobGetter{}
    66  	mock.Mock.Test(t)
    67  
    68  	t.Cleanup(func() { mock.AssertExpectations(t) })
    69  
    70  	return mock
    71  }