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