github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/consensus/hotstuff/mocks/random_beacon_reconstructor.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 crypto "github.com/onflow/crypto" 7 flow "github.com/onflow/flow-go/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 var r1 error 37 if rf, ok := ret.Get(0).(func() (crypto.Signature, error)); ok { 38 return rf() 39 } 40 if rf, ok := ret.Get(0).(func() crypto.Signature); ok { 41 r0 = rf() 42 } else { 43 if ret.Get(0) != nil { 44 r0 = ret.Get(0).(crypto.Signature) 45 } 46 } 47 48 if rf, ok := ret.Get(1).(func() error); ok { 49 r1 = rf() 50 } else { 51 r1 = ret.Error(1) 52 } 53 54 return r0, r1 55 } 56 57 // TrustedAdd provides a mock function with given fields: signerID, sig 58 func (_m *RandomBeaconReconstructor) TrustedAdd(signerID flow.Identifier, sig crypto.Signature) (bool, error) { 59 ret := _m.Called(signerID, sig) 60 61 var r0 bool 62 var r1 error 63 if rf, ok := ret.Get(0).(func(flow.Identifier, crypto.Signature) (bool, error)); ok { 64 return rf(signerID, sig) 65 } 66 if rf, ok := ret.Get(0).(func(flow.Identifier, crypto.Signature) bool); ok { 67 r0 = rf(signerID, sig) 68 } else { 69 r0 = ret.Get(0).(bool) 70 } 71 72 if rf, ok := ret.Get(1).(func(flow.Identifier, crypto.Signature) error); ok { 73 r1 = rf(signerID, sig) 74 } else { 75 r1 = ret.Error(1) 76 } 77 78 return r0, r1 79 } 80 81 // Verify provides a mock function with given fields: signerID, sig 82 func (_m *RandomBeaconReconstructor) Verify(signerID flow.Identifier, sig crypto.Signature) error { 83 ret := _m.Called(signerID, sig) 84 85 var r0 error 86 if rf, ok := ret.Get(0).(func(flow.Identifier, crypto.Signature) error); ok { 87 r0 = rf(signerID, sig) 88 } else { 89 r0 = ret.Error(0) 90 } 91 92 return r0 93 } 94 95 type mockConstructorTestingTNewRandomBeaconReconstructor interface { 96 mock.TestingT 97 Cleanup(func()) 98 } 99 100 // 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. 101 func NewRandomBeaconReconstructor(t mockConstructorTestingTNewRandomBeaconReconstructor) *RandomBeaconReconstructor { 102 mock := &RandomBeaconReconstructor{} 103 mock.Mock.Test(t) 104 105 t.Cleanup(func() { mock.AssertExpectations(t) }) 106 107 return mock 108 }