github.com/koko1123/flow-go-1@v0.29.6/consensus/hotstuff/mocks/random_beacon_reconstructor.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 // RandomBeaconReconstructor is an autogenerated mock type for the RandomBeaconReconstructor type 13 type RandomBeaconReconstructor struct { 14 mock.Mock 15 } 16 17 // EnoughShares provides a mock function with given fields: 18 func (_m *RandomBeaconReconstructor) EnoughShares() bool { 19 ret := _m.Called() 20 21 var r0 bool 22 if rf, ok := ret.Get(0).(func() bool); ok { 23 r0 = rf() 24 } else { 25 r0 = ret.Get(0).(bool) 26 } 27 28 return r0 29 } 30 31 // Reconstruct provides a mock function with given fields: 32 func (_m *RandomBeaconReconstructor) Reconstruct() (crypto.Signature, error) { 33 ret := _m.Called() 34 35 var r0 crypto.Signature 36 if rf, ok := ret.Get(0).(func() crypto.Signature); ok { 37 r0 = rf() 38 } else { 39 if ret.Get(0) != nil { 40 r0 = ret.Get(0).(crypto.Signature) 41 } 42 } 43 44 var r1 error 45 if rf, ok := ret.Get(1).(func() error); ok { 46 r1 = rf() 47 } else { 48 r1 = ret.Error(1) 49 } 50 51 return r0, r1 52 } 53 54 // TrustedAdd provides a mock function with given fields: signerID, sig 55 func (_m *RandomBeaconReconstructor) TrustedAdd(signerID flow.Identifier, sig crypto.Signature) (bool, error) { 56 ret := _m.Called(signerID, sig) 57 58 var r0 bool 59 if rf, ok := ret.Get(0).(func(flow.Identifier, crypto.Signature) bool); ok { 60 r0 = rf(signerID, sig) 61 } else { 62 r0 = ret.Get(0).(bool) 63 } 64 65 var r1 error 66 if rf, ok := ret.Get(1).(func(flow.Identifier, crypto.Signature) error); ok { 67 r1 = rf(signerID, sig) 68 } else { 69 r1 = ret.Error(1) 70 } 71 72 return r0, r1 73 } 74 75 // Verify provides a mock function with given fields: signerID, sig 76 func (_m *RandomBeaconReconstructor) Verify(signerID flow.Identifier, sig crypto.Signature) error { 77 ret := _m.Called(signerID, sig) 78 79 var r0 error 80 if rf, ok := ret.Get(0).(func(flow.Identifier, crypto.Signature) error); ok { 81 r0 = rf(signerID, sig) 82 } else { 83 r0 = ret.Error(0) 84 } 85 86 return r0 87 } 88 89 type mockConstructorTestingTNewRandomBeaconReconstructor interface { 90 mock.TestingT 91 Cleanup(func()) 92 } 93 94 // NewRandomBeaconReconstructor creates a new instance of RandomBeaconReconstructor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 95 func NewRandomBeaconReconstructor(t mockConstructorTestingTNewRandomBeaconReconstructor) *RandomBeaconReconstructor { 96 mock := &RandomBeaconReconstructor{} 97 mock.Mock.Test(t) 98 99 t.Cleanup(func() { mock.AssertExpectations(t) }) 100 101 return mock 102 }