github.com/koko1123/flow-go-1@v0.29.6/consensus/hotstuff/mocks/signer.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 model "github.com/koko1123/flow-go-1/consensus/hotstuff/model" 7 mock "github.com/stretchr/testify/mock" 8 ) 9 10 // Signer is an autogenerated mock type for the Signer type 11 type Signer struct { 12 mock.Mock 13 } 14 15 // CreateProposal provides a mock function with given fields: block 16 func (_m *Signer) CreateProposal(block *model.Block) (*model.Proposal, error) { 17 ret := _m.Called(block) 18 19 var r0 *model.Proposal 20 if rf, ok := ret.Get(0).(func(*model.Block) *model.Proposal); ok { 21 r0 = rf(block) 22 } else { 23 if ret.Get(0) != nil { 24 r0 = ret.Get(0).(*model.Proposal) 25 } 26 } 27 28 var r1 error 29 if rf, ok := ret.Get(1).(func(*model.Block) error); ok { 30 r1 = rf(block) 31 } else { 32 r1 = ret.Error(1) 33 } 34 35 return r0, r1 36 } 37 38 // CreateVote provides a mock function with given fields: block 39 func (_m *Signer) CreateVote(block *model.Block) (*model.Vote, error) { 40 ret := _m.Called(block) 41 42 var r0 *model.Vote 43 if rf, ok := ret.Get(0).(func(*model.Block) *model.Vote); ok { 44 r0 = rf(block) 45 } else { 46 if ret.Get(0) != nil { 47 r0 = ret.Get(0).(*model.Vote) 48 } 49 } 50 51 var r1 error 52 if rf, ok := ret.Get(1).(func(*model.Block) error); ok { 53 r1 = rf(block) 54 } else { 55 r1 = ret.Error(1) 56 } 57 58 return r0, r1 59 } 60 61 type mockConstructorTestingTNewSigner interface { 62 mock.TestingT 63 Cleanup(func()) 64 } 65 66 // 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. 67 func NewSigner(t mockConstructorTestingTNewSigner) *Signer { 68 mock := &Signer{} 69 mock.Mock.Test(t) 70 71 t.Cleanup(func() { mock.AssertExpectations(t) }) 72 73 return mock 74 }