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