github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/module/mock/dkg_broker.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 crypto "github.com/onflow/crypto" 7 flow "github.com/onflow/flow-go/model/flow" 8 9 messages "github.com/onflow/flow-go/model/messages" 10 11 mock "github.com/stretchr/testify/mock" 12 ) 13 14 // DKGBroker is an autogenerated mock type for the DKGBroker type 15 type DKGBroker struct { 16 mock.Mock 17 } 18 19 // Broadcast provides a mock function with given fields: data 20 func (_m *DKGBroker) Broadcast(data []byte) { 21 _m.Called(data) 22 } 23 24 // Disqualify provides a mock function with given fields: participant, log 25 func (_m *DKGBroker) Disqualify(participant int, log string) { 26 _m.Called(participant, log) 27 } 28 29 // FlagMisbehavior provides a mock function with given fields: participant, log 30 func (_m *DKGBroker) FlagMisbehavior(participant int, log string) { 31 _m.Called(participant, log) 32 } 33 34 // GetBroadcastMsgCh provides a mock function with given fields: 35 func (_m *DKGBroker) GetBroadcastMsgCh() <-chan messages.BroadcastDKGMessage { 36 ret := _m.Called() 37 38 var r0 <-chan messages.BroadcastDKGMessage 39 if rf, ok := ret.Get(0).(func() <-chan messages.BroadcastDKGMessage); ok { 40 r0 = rf() 41 } else { 42 if ret.Get(0) != nil { 43 r0 = ret.Get(0).(<-chan messages.BroadcastDKGMessage) 44 } 45 } 46 47 return r0 48 } 49 50 // GetIndex provides a mock function with given fields: 51 func (_m *DKGBroker) GetIndex() int { 52 ret := _m.Called() 53 54 var r0 int 55 if rf, ok := ret.Get(0).(func() int); ok { 56 r0 = rf() 57 } else { 58 r0 = ret.Get(0).(int) 59 } 60 61 return r0 62 } 63 64 // GetPrivateMsgCh provides a mock function with given fields: 65 func (_m *DKGBroker) GetPrivateMsgCh() <-chan messages.PrivDKGMessageIn { 66 ret := _m.Called() 67 68 var r0 <-chan messages.PrivDKGMessageIn 69 if rf, ok := ret.Get(0).(func() <-chan messages.PrivDKGMessageIn); ok { 70 r0 = rf() 71 } else { 72 if ret.Get(0) != nil { 73 r0 = ret.Get(0).(<-chan messages.PrivDKGMessageIn) 74 } 75 } 76 77 return r0 78 } 79 80 // Poll provides a mock function with given fields: referenceBlock 81 func (_m *DKGBroker) Poll(referenceBlock flow.Identifier) error { 82 ret := _m.Called(referenceBlock) 83 84 var r0 error 85 if rf, ok := ret.Get(0).(func(flow.Identifier) error); ok { 86 r0 = rf(referenceBlock) 87 } else { 88 r0 = ret.Error(0) 89 } 90 91 return r0 92 } 93 94 // PrivateSend provides a mock function with given fields: dest, data 95 func (_m *DKGBroker) PrivateSend(dest int, data []byte) { 96 _m.Called(dest, data) 97 } 98 99 // Shutdown provides a mock function with given fields: 100 func (_m *DKGBroker) Shutdown() { 101 _m.Called() 102 } 103 104 // SubmitResult provides a mock function with given fields: _a0, _a1 105 func (_m *DKGBroker) SubmitResult(_a0 crypto.PublicKey, _a1 []crypto.PublicKey) error { 106 ret := _m.Called(_a0, _a1) 107 108 var r0 error 109 if rf, ok := ret.Get(0).(func(crypto.PublicKey, []crypto.PublicKey) error); ok { 110 r0 = rf(_a0, _a1) 111 } else { 112 r0 = ret.Error(0) 113 } 114 115 return r0 116 } 117 118 type mockConstructorTestingTNewDKGBroker interface { 119 mock.TestingT 120 Cleanup(func()) 121 } 122 123 // NewDKGBroker creates a new instance of DKGBroker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 124 func NewDKGBroker(t mockConstructorTestingTNewDKGBroker) *DKGBroker { 125 mock := &DKGBroker{} 126 mock.Mock.Test(t) 127 128 t.Cleanup(func() { mock.AssertExpectations(t) }) 129 130 return mock 131 }