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