github.com/koko1123/flow-go-1@v0.29.6/module/mock/dkg_contract_client.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 crypto "github.com/onflow/flow-go/crypto" 7 flow "github.com/koko1123/flow-go-1/model/flow" 8 9 messages "github.com/koko1123/flow-go-1/model/messages" 10 11 mock "github.com/stretchr/testify/mock" 12 ) 13 14 // DKGContractClient is an autogenerated mock type for the DKGContractClient type 15 type DKGContractClient struct { 16 mock.Mock 17 } 18 19 // Broadcast provides a mock function with given fields: msg 20 func (_m *DKGContractClient) Broadcast(msg messages.BroadcastDKGMessage) error { 21 ret := _m.Called(msg) 22 23 var r0 error 24 if rf, ok := ret.Get(0).(func(messages.BroadcastDKGMessage) error); ok { 25 r0 = rf(msg) 26 } else { 27 r0 = ret.Error(0) 28 } 29 30 return r0 31 } 32 33 // ReadBroadcast provides a mock function with given fields: fromIndex, referenceBlock 34 func (_m *DKGContractClient) ReadBroadcast(fromIndex uint, referenceBlock flow.Identifier) ([]messages.BroadcastDKGMessage, error) { 35 ret := _m.Called(fromIndex, referenceBlock) 36 37 var r0 []messages.BroadcastDKGMessage 38 if rf, ok := ret.Get(0).(func(uint, flow.Identifier) []messages.BroadcastDKGMessage); ok { 39 r0 = rf(fromIndex, referenceBlock) 40 } else { 41 if ret.Get(0) != nil { 42 r0 = ret.Get(0).([]messages.BroadcastDKGMessage) 43 } 44 } 45 46 var r1 error 47 if rf, ok := ret.Get(1).(func(uint, flow.Identifier) error); ok { 48 r1 = rf(fromIndex, referenceBlock) 49 } else { 50 r1 = ret.Error(1) 51 } 52 53 return r0, r1 54 } 55 56 // SubmitResult provides a mock function with given fields: _a0, _a1 57 func (_m *DKGContractClient) SubmitResult(_a0 crypto.PublicKey, _a1 []crypto.PublicKey) error { 58 ret := _m.Called(_a0, _a1) 59 60 var r0 error 61 if rf, ok := ret.Get(0).(func(crypto.PublicKey, []crypto.PublicKey) error); ok { 62 r0 = rf(_a0, _a1) 63 } else { 64 r0 = ret.Error(0) 65 } 66 67 return r0 68 } 69 70 type mockConstructorTestingTNewDKGContractClient interface { 71 mock.TestingT 72 Cleanup(func()) 73 } 74 75 // NewDKGContractClient creates a new instance of DKGContractClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 76 func NewDKGContractClient(t mockConstructorTestingTNewDKGContractClient) *DKGContractClient { 77 mock := &DKGContractClient{} 78 mock.Mock.Test(t) 79 80 t.Cleanup(func() { mock.AssertExpectations(t) }) 81 82 return mock 83 }