github.com/koko1123/flow-go-1@v0.29.6/engine/consensus/approvals/mock/assignment_collector_state.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 consensus "github.com/koko1123/flow-go-1/engine/consensus" 7 approvals "github.com/koko1123/flow-go-1/engine/consensus/approvals" 8 9 flow "github.com/koko1123/flow-go-1/model/flow" 10 11 mock "github.com/stretchr/testify/mock" 12 ) 13 14 // AssignmentCollectorState is an autogenerated mock type for the AssignmentCollectorState type 15 type AssignmentCollectorState struct { 16 mock.Mock 17 } 18 19 // Block provides a mock function with given fields: 20 func (_m *AssignmentCollectorState) Block() *flow.Header { 21 ret := _m.Called() 22 23 var r0 *flow.Header 24 if rf, ok := ret.Get(0).(func() *flow.Header); ok { 25 r0 = rf() 26 } else { 27 if ret.Get(0) != nil { 28 r0 = ret.Get(0).(*flow.Header) 29 } 30 } 31 32 return r0 33 } 34 35 // BlockID provides a mock function with given fields: 36 func (_m *AssignmentCollectorState) BlockID() flow.Identifier { 37 ret := _m.Called() 38 39 var r0 flow.Identifier 40 if rf, ok := ret.Get(0).(func() flow.Identifier); ok { 41 r0 = rf() 42 } else { 43 if ret.Get(0) != nil { 44 r0 = ret.Get(0).(flow.Identifier) 45 } 46 } 47 48 return r0 49 } 50 51 // CheckEmergencySealing provides a mock function with given fields: observer, finalizedBlockHeight 52 func (_m *AssignmentCollectorState) CheckEmergencySealing(observer consensus.SealingObservation, finalizedBlockHeight uint64) error { 53 ret := _m.Called(observer, finalizedBlockHeight) 54 55 var r0 error 56 if rf, ok := ret.Get(0).(func(consensus.SealingObservation, uint64) error); ok { 57 r0 = rf(observer, finalizedBlockHeight) 58 } else { 59 r0 = ret.Error(0) 60 } 61 62 return r0 63 } 64 65 // ProcessApproval provides a mock function with given fields: approval 66 func (_m *AssignmentCollectorState) ProcessApproval(approval *flow.ResultApproval) error { 67 ret := _m.Called(approval) 68 69 var r0 error 70 if rf, ok := ret.Get(0).(func(*flow.ResultApproval) error); ok { 71 r0 = rf(approval) 72 } else { 73 r0 = ret.Error(0) 74 } 75 76 return r0 77 } 78 79 // ProcessIncorporatedResult provides a mock function with given fields: incorporatedResult 80 func (_m *AssignmentCollectorState) ProcessIncorporatedResult(incorporatedResult *flow.IncorporatedResult) error { 81 ret := _m.Called(incorporatedResult) 82 83 var r0 error 84 if rf, ok := ret.Get(0).(func(*flow.IncorporatedResult) error); ok { 85 r0 = rf(incorporatedResult) 86 } else { 87 r0 = ret.Error(0) 88 } 89 90 return r0 91 } 92 93 // ProcessingStatus provides a mock function with given fields: 94 func (_m *AssignmentCollectorState) ProcessingStatus() approvals.ProcessingStatus { 95 ret := _m.Called() 96 97 var r0 approvals.ProcessingStatus 98 if rf, ok := ret.Get(0).(func() approvals.ProcessingStatus); ok { 99 r0 = rf() 100 } else { 101 r0 = ret.Get(0).(approvals.ProcessingStatus) 102 } 103 104 return r0 105 } 106 107 // RequestMissingApprovals provides a mock function with given fields: observer, maxHeightForRequesting 108 func (_m *AssignmentCollectorState) RequestMissingApprovals(observer consensus.SealingObservation, maxHeightForRequesting uint64) (uint, error) { 109 ret := _m.Called(observer, maxHeightForRequesting) 110 111 var r0 uint 112 if rf, ok := ret.Get(0).(func(consensus.SealingObservation, uint64) uint); ok { 113 r0 = rf(observer, maxHeightForRequesting) 114 } else { 115 r0 = ret.Get(0).(uint) 116 } 117 118 var r1 error 119 if rf, ok := ret.Get(1).(func(consensus.SealingObservation, uint64) error); ok { 120 r1 = rf(observer, maxHeightForRequesting) 121 } else { 122 r1 = ret.Error(1) 123 } 124 125 return r0, r1 126 } 127 128 // Result provides a mock function with given fields: 129 func (_m *AssignmentCollectorState) Result() *flow.ExecutionResult { 130 ret := _m.Called() 131 132 var r0 *flow.ExecutionResult 133 if rf, ok := ret.Get(0).(func() *flow.ExecutionResult); ok { 134 r0 = rf() 135 } else { 136 if ret.Get(0) != nil { 137 r0 = ret.Get(0).(*flow.ExecutionResult) 138 } 139 } 140 141 return r0 142 } 143 144 // ResultID provides a mock function with given fields: 145 func (_m *AssignmentCollectorState) ResultID() flow.Identifier { 146 ret := _m.Called() 147 148 var r0 flow.Identifier 149 if rf, ok := ret.Get(0).(func() flow.Identifier); ok { 150 r0 = rf() 151 } else { 152 if ret.Get(0) != nil { 153 r0 = ret.Get(0).(flow.Identifier) 154 } 155 } 156 157 return r0 158 } 159 160 type mockConstructorTestingTNewAssignmentCollectorState interface { 161 mock.TestingT 162 Cleanup(func()) 163 } 164 165 // NewAssignmentCollectorState creates a new instance of AssignmentCollectorState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 166 func NewAssignmentCollectorState(t mockConstructorTestingTNewAssignmentCollectorState) *AssignmentCollectorState { 167 mock := &AssignmentCollectorState{} 168 mock.Mock.Test(t) 169 170 t.Cleanup(func() { mock.AssertExpectations(t) }) 171 172 return mock 173 }