github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/state/protocol/mock/initial_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 // InitialProtocolState is an autogenerated mock type for the InitialProtocolState type 13 type InitialProtocolState struct { 14 mock.Mock 15 } 16 17 // Clustering provides a mock function with given fields: 18 func (_m *InitialProtocolState) 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 *InitialProtocolState) 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 *InitialProtocolState) 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 *InitialProtocolState) 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 *InitialProtocolState) 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 // EpochSetup provides a mock function with given fields: 116 func (_m *InitialProtocolState) EpochSetup() *flow.EpochSetup { 117 ret := _m.Called() 118 119 var r0 *flow.EpochSetup 120 if rf, ok := ret.Get(0).(func() *flow.EpochSetup); ok { 121 r0 = rf() 122 } else { 123 if ret.Get(0) != nil { 124 r0 = ret.Get(0).(*flow.EpochSetup) 125 } 126 } 127 128 return r0 129 } 130 131 type mockConstructorTestingTNewInitialProtocolState interface { 132 mock.TestingT 133 Cleanup(func()) 134 } 135 136 // NewInitialProtocolState creates a new instance of InitialProtocolState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 137 func NewInitialProtocolState(t mockConstructorTestingTNewInitialProtocolState) *InitialProtocolState { 138 mock := &InitialProtocolState{} 139 mock.Mock.Test(t) 140 141 t.Cleanup(func() { mock.AssertExpectations(t) }) 142 143 return mock 144 }