github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/state/protocol/mock/follower_state.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 context "context" 7 8 flow "github.com/onflow/flow-go/model/flow" 9 mock "github.com/stretchr/testify/mock" 10 11 protocol "github.com/onflow/flow-go/state/protocol" 12 ) 13 14 // FollowerState is an autogenerated mock type for the FollowerState type 15 type FollowerState struct { 16 mock.Mock 17 } 18 19 // AtBlockID provides a mock function with given fields: blockID 20 func (_m *FollowerState) AtBlockID(blockID flow.Identifier) protocol.Snapshot { 21 ret := _m.Called(blockID) 22 23 var r0 protocol.Snapshot 24 if rf, ok := ret.Get(0).(func(flow.Identifier) protocol.Snapshot); ok { 25 r0 = rf(blockID) 26 } else { 27 if ret.Get(0) != nil { 28 r0 = ret.Get(0).(protocol.Snapshot) 29 } 30 } 31 32 return r0 33 } 34 35 // AtHeight provides a mock function with given fields: height 36 func (_m *FollowerState) AtHeight(height uint64) protocol.Snapshot { 37 ret := _m.Called(height) 38 39 var r0 protocol.Snapshot 40 if rf, ok := ret.Get(0).(func(uint64) protocol.Snapshot); ok { 41 r0 = rf(height) 42 } else { 43 if ret.Get(0) != nil { 44 r0 = ret.Get(0).(protocol.Snapshot) 45 } 46 } 47 48 return r0 49 } 50 51 // ExtendCertified provides a mock function with given fields: ctx, candidate, qc 52 func (_m *FollowerState) ExtendCertified(ctx context.Context, candidate *flow.Block, qc *flow.QuorumCertificate) error { 53 ret := _m.Called(ctx, candidate, qc) 54 55 var r0 error 56 if rf, ok := ret.Get(0).(func(context.Context, *flow.Block, *flow.QuorumCertificate) error); ok { 57 r0 = rf(ctx, candidate, qc) 58 } else { 59 r0 = ret.Error(0) 60 } 61 62 return r0 63 } 64 65 // Final provides a mock function with given fields: 66 func (_m *FollowerState) Final() protocol.Snapshot { 67 ret := _m.Called() 68 69 var r0 protocol.Snapshot 70 if rf, ok := ret.Get(0).(func() protocol.Snapshot); ok { 71 r0 = rf() 72 } else { 73 if ret.Get(0) != nil { 74 r0 = ret.Get(0).(protocol.Snapshot) 75 } 76 } 77 78 return r0 79 } 80 81 // Finalize provides a mock function with given fields: ctx, blockID 82 func (_m *FollowerState) Finalize(ctx context.Context, blockID flow.Identifier) error { 83 ret := _m.Called(ctx, blockID) 84 85 var r0 error 86 if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) error); ok { 87 r0 = rf(ctx, blockID) 88 } else { 89 r0 = ret.Error(0) 90 } 91 92 return r0 93 } 94 95 // Params provides a mock function with given fields: 96 func (_m *FollowerState) Params() protocol.Params { 97 ret := _m.Called() 98 99 var r0 protocol.Params 100 if rf, ok := ret.Get(0).(func() protocol.Params); ok { 101 r0 = rf() 102 } else { 103 if ret.Get(0) != nil { 104 r0 = ret.Get(0).(protocol.Params) 105 } 106 } 107 108 return r0 109 } 110 111 // Sealed provides a mock function with given fields: 112 func (_m *FollowerState) Sealed() protocol.Snapshot { 113 ret := _m.Called() 114 115 var r0 protocol.Snapshot 116 if rf, ok := ret.Get(0).(func() protocol.Snapshot); ok { 117 r0 = rf() 118 } else { 119 if ret.Get(0) != nil { 120 r0 = ret.Get(0).(protocol.Snapshot) 121 } 122 } 123 124 return r0 125 } 126 127 type mockConstructorTestingTNewFollowerState interface { 128 mock.TestingT 129 Cleanup(func()) 130 } 131 132 // NewFollowerState creates a new instance of FollowerState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 133 func NewFollowerState(t mockConstructorTestingTNewFollowerState) *FollowerState { 134 mock := &FollowerState{} 135 mock.Mock.Test(t) 136 137 t.Cleanup(func() { mock.AssertExpectations(t) }) 138 139 return mock 140 }