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