github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/consensus/hotstuff/mocks/signer.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 flow "github.com/onflow/flow-go/model/flow" 7 8 mock "github.com/stretchr/testify/mock" 9 10 model "github.com/onflow/flow-go/consensus/hotstuff/model" 11 ) 12 13 // Signer is an autogenerated mock type for the Signer type 14 type Signer struct { 15 mock.Mock 16 } 17 18 // CreateProposal provides a mock function with given fields: block 19 func (_m *Signer) CreateProposal(block *model.Block) (*model.Proposal, error) { 20 ret := _m.Called(block) 21 22 var r0 *model.Proposal 23 var r1 error 24 if rf, ok := ret.Get(0).(func(*model.Block) (*model.Proposal, error)); ok { 25 return rf(block) 26 } 27 if rf, ok := ret.Get(0).(func(*model.Block) *model.Proposal); ok { 28 r0 = rf(block) 29 } else { 30 if ret.Get(0) != nil { 31 r0 = ret.Get(0).(*model.Proposal) 32 } 33 } 34 35 if rf, ok := ret.Get(1).(func(*model.Block) error); ok { 36 r1 = rf(block) 37 } else { 38 r1 = ret.Error(1) 39 } 40 41 return r0, r1 42 } 43 44 // CreateTimeout provides a mock function with given fields: curView, newestQC, lastViewTC 45 func (_m *Signer) CreateTimeout(curView uint64, newestQC *flow.QuorumCertificate, lastViewTC *flow.TimeoutCertificate) (*model.TimeoutObject, error) { 46 ret := _m.Called(curView, newestQC, lastViewTC) 47 48 var r0 *model.TimeoutObject 49 var r1 error 50 if rf, ok := ret.Get(0).(func(uint64, *flow.QuorumCertificate, *flow.TimeoutCertificate) (*model.TimeoutObject, error)); ok { 51 return rf(curView, newestQC, lastViewTC) 52 } 53 if rf, ok := ret.Get(0).(func(uint64, *flow.QuorumCertificate, *flow.TimeoutCertificate) *model.TimeoutObject); ok { 54 r0 = rf(curView, newestQC, lastViewTC) 55 } else { 56 if ret.Get(0) != nil { 57 r0 = ret.Get(0).(*model.TimeoutObject) 58 } 59 } 60 61 if rf, ok := ret.Get(1).(func(uint64, *flow.QuorumCertificate, *flow.TimeoutCertificate) error); ok { 62 r1 = rf(curView, newestQC, lastViewTC) 63 } else { 64 r1 = ret.Error(1) 65 } 66 67 return r0, r1 68 } 69 70 // CreateVote provides a mock function with given fields: block 71 func (_m *Signer) CreateVote(block *model.Block) (*model.Vote, error) { 72 ret := _m.Called(block) 73 74 var r0 *model.Vote 75 var r1 error 76 if rf, ok := ret.Get(0).(func(*model.Block) (*model.Vote, error)); ok { 77 return rf(block) 78 } 79 if rf, ok := ret.Get(0).(func(*model.Block) *model.Vote); ok { 80 r0 = rf(block) 81 } else { 82 if ret.Get(0) != nil { 83 r0 = ret.Get(0).(*model.Vote) 84 } 85 } 86 87 if rf, ok := ret.Get(1).(func(*model.Block) error); ok { 88 r1 = rf(block) 89 } else { 90 r1 = ret.Error(1) 91 } 92 93 return r0, r1 94 } 95 96 type mockConstructorTestingTNewSigner interface { 97 mock.TestingT 98 Cleanup(func()) 99 } 100 101 // NewSigner creates a new instance of Signer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 102 func NewSigner(t mockConstructorTestingTNewSigner) *Signer { 103 mock := &Signer{} 104 mock.Mock.Test(t) 105 106 t.Cleanup(func() { mock.AssertExpectations(t) }) 107 108 return mock 109 }