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