github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/state/protocol/mock/dynamic_protocol_state.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 flow "github.com/onflow/flow-go/model/flow" 7 mock "github.com/stretchr/testify/mock" 8 9 protocol "github.com/onflow/flow-go/state/protocol" 10 ) 11 12 // DynamicProtocolState is an autogenerated mock type for the DynamicProtocolState type 13 type DynamicProtocolState struct { 14 mock.Mock 15 } 16 17 // Clustering provides a mock function with given fields: 18 func (_m *DynamicProtocolState) Clustering() (flow.ClusterList, error) { 19 ret := _m.Called() 20 21 var r0 flow.ClusterList 22 var r1 error 23 if rf, ok := ret.Get(0).(func() (flow.ClusterList, error)); ok { 24 return rf() 25 } 26 if rf, ok := ret.Get(0).(func() flow.ClusterList); ok { 27 r0 = rf() 28 } else { 29 if ret.Get(0) != nil { 30 r0 = ret.Get(0).(flow.ClusterList) 31 } 32 } 33 34 if rf, ok := ret.Get(1).(func() error); ok { 35 r1 = rf() 36 } else { 37 r1 = ret.Error(1) 38 } 39 40 return r0, r1 41 } 42 43 // DKG provides a mock function with given fields: 44 func (_m *DynamicProtocolState) DKG() (protocol.DKG, error) { 45 ret := _m.Called() 46 47 var r0 protocol.DKG 48 var r1 error 49 if rf, ok := ret.Get(0).(func() (protocol.DKG, error)); ok { 50 return rf() 51 } 52 if rf, ok := ret.Get(0).(func() protocol.DKG); ok { 53 r0 = rf() 54 } else { 55 if ret.Get(0) != nil { 56 r0 = ret.Get(0).(protocol.DKG) 57 } 58 } 59 60 if rf, ok := ret.Get(1).(func() error); ok { 61 r1 = rf() 62 } else { 63 r1 = ret.Error(1) 64 } 65 66 return r0, r1 67 } 68 69 // Entry provides a mock function with given fields: 70 func (_m *DynamicProtocolState) Entry() *flow.RichProtocolStateEntry { 71 ret := _m.Called() 72 73 var r0 *flow.RichProtocolStateEntry 74 if rf, ok := ret.Get(0).(func() *flow.RichProtocolStateEntry); ok { 75 r0 = rf() 76 } else { 77 if ret.Get(0) != nil { 78 r0 = ret.Get(0).(*flow.RichProtocolStateEntry) 79 } 80 } 81 82 return r0 83 } 84 85 // Epoch provides a mock function with given fields: 86 func (_m *DynamicProtocolState) Epoch() uint64 { 87 ret := _m.Called() 88 89 var r0 uint64 90 if rf, ok := ret.Get(0).(func() uint64); ok { 91 r0 = rf() 92 } else { 93 r0 = ret.Get(0).(uint64) 94 } 95 96 return r0 97 } 98 99 // EpochCommit provides a mock function with given fields: 100 func (_m *DynamicProtocolState) EpochCommit() *flow.EpochCommit { 101 ret := _m.Called() 102 103 var r0 *flow.EpochCommit 104 if rf, ok := ret.Get(0).(func() *flow.EpochCommit); ok { 105 r0 = rf() 106 } else { 107 if ret.Get(0) != nil { 108 r0 = ret.Get(0).(*flow.EpochCommit) 109 } 110 } 111 112 return r0 113 } 114 115 // EpochPhase provides a mock function with given fields: 116 func (_m *DynamicProtocolState) EpochPhase() flow.EpochPhase { 117 ret := _m.Called() 118 119 var r0 flow.EpochPhase 120 if rf, ok := ret.Get(0).(func() flow.EpochPhase); ok { 121 r0 = rf() 122 } else { 123 r0 = ret.Get(0).(flow.EpochPhase) 124 } 125 126 return r0 127 } 128 129 // EpochSetup provides a mock function with given fields: 130 func (_m *DynamicProtocolState) EpochSetup() *flow.EpochSetup { 131 ret := _m.Called() 132 133 var r0 *flow.EpochSetup 134 if rf, ok := ret.Get(0).(func() *flow.EpochSetup); ok { 135 r0 = rf() 136 } else { 137 if ret.Get(0) != nil { 138 r0 = ret.Get(0).(*flow.EpochSetup) 139 } 140 } 141 142 return r0 143 } 144 145 // GlobalParams provides a mock function with given fields: 146 func (_m *DynamicProtocolState) GlobalParams() protocol.GlobalParams { 147 ret := _m.Called() 148 149 var r0 protocol.GlobalParams 150 if rf, ok := ret.Get(0).(func() protocol.GlobalParams); ok { 151 r0 = rf() 152 } else { 153 if ret.Get(0) != nil { 154 r0 = ret.Get(0).(protocol.GlobalParams) 155 } 156 } 157 158 return r0 159 } 160 161 // Identities provides a mock function with given fields: 162 func (_m *DynamicProtocolState) Identities() flow.GenericIdentityList[flow.Identity] { 163 ret := _m.Called() 164 165 var r0 flow.GenericIdentityList[flow.Identity] 166 if rf, ok := ret.Get(0).(func() flow.GenericIdentityList[flow.Identity]); ok { 167 r0 = rf() 168 } else { 169 if ret.Get(0) != nil { 170 r0 = ret.Get(0).(flow.GenericIdentityList[flow.Identity]) 171 } 172 } 173 174 return r0 175 } 176 177 // InvalidEpochTransitionAttempted provides a mock function with given fields: 178 func (_m *DynamicProtocolState) InvalidEpochTransitionAttempted() bool { 179 ret := _m.Called() 180 181 var r0 bool 182 if rf, ok := ret.Get(0).(func() bool); ok { 183 r0 = rf() 184 } else { 185 r0 = ret.Get(0).(bool) 186 } 187 188 return r0 189 } 190 191 // PreviousEpochExists provides a mock function with given fields: 192 func (_m *DynamicProtocolState) PreviousEpochExists() bool { 193 ret := _m.Called() 194 195 var r0 bool 196 if rf, ok := ret.Get(0).(func() bool); ok { 197 r0 = rf() 198 } else { 199 r0 = ret.Get(0).(bool) 200 } 201 202 return r0 203 } 204 205 type mockConstructorTestingTNewDynamicProtocolState interface { 206 mock.TestingT 207 Cleanup(func()) 208 } 209 210 // NewDynamicProtocolState creates a new instance of DynamicProtocolState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 211 func NewDynamicProtocolState(t mockConstructorTestingTNewDynamicProtocolState) *DynamicProtocolState { 212 mock := &DynamicProtocolState{} 213 mock.Mock.Test(t) 214 215 t.Cleanup(func() { mock.AssertExpectations(t) }) 216 217 return mock 218 }