github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/module/mock/dkg_controller.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 mock "github.com/stretchr/testify/mock" 10 ) 11 12 // DKGController is an autogenerated mock type for the DKGController type 13 type DKGController struct { 14 mock.Mock 15 } 16 17 // End provides a mock function with given fields: 18 func (_m *DKGController) End() error { 19 ret := _m.Called() 20 21 var r0 error 22 if rf, ok := ret.Get(0).(func() error); ok { 23 r0 = rf() 24 } else { 25 r0 = ret.Error(0) 26 } 27 28 return r0 29 } 30 31 // EndPhase1 provides a mock function with given fields: 32 func (_m *DKGController) EndPhase1() error { 33 ret := _m.Called() 34 35 var r0 error 36 if rf, ok := ret.Get(0).(func() error); ok { 37 r0 = rf() 38 } else { 39 r0 = ret.Error(0) 40 } 41 42 return r0 43 } 44 45 // EndPhase2 provides a mock function with given fields: 46 func (_m *DKGController) EndPhase2() error { 47 ret := _m.Called() 48 49 var r0 error 50 if rf, ok := ret.Get(0).(func() error); ok { 51 r0 = rf() 52 } else { 53 r0 = ret.Error(0) 54 } 55 56 return r0 57 } 58 59 // GetArtifacts provides a mock function with given fields: 60 func (_m *DKGController) GetArtifacts() (crypto.PrivateKey, crypto.PublicKey, []crypto.PublicKey) { 61 ret := _m.Called() 62 63 var r0 crypto.PrivateKey 64 var r1 crypto.PublicKey 65 var r2 []crypto.PublicKey 66 if rf, ok := ret.Get(0).(func() (crypto.PrivateKey, crypto.PublicKey, []crypto.PublicKey)); ok { 67 return rf() 68 } 69 if rf, ok := ret.Get(0).(func() crypto.PrivateKey); ok { 70 r0 = rf() 71 } else { 72 if ret.Get(0) != nil { 73 r0 = ret.Get(0).(crypto.PrivateKey) 74 } 75 } 76 77 if rf, ok := ret.Get(1).(func() crypto.PublicKey); ok { 78 r1 = rf() 79 } else { 80 if ret.Get(1) != nil { 81 r1 = ret.Get(1).(crypto.PublicKey) 82 } 83 } 84 85 if rf, ok := ret.Get(2).(func() []crypto.PublicKey); ok { 86 r2 = rf() 87 } else { 88 if ret.Get(2) != nil { 89 r2 = ret.Get(2).([]crypto.PublicKey) 90 } 91 } 92 93 return r0, r1, r2 94 } 95 96 // GetIndex provides a mock function with given fields: 97 func (_m *DKGController) GetIndex() int { 98 ret := _m.Called() 99 100 var r0 int 101 if rf, ok := ret.Get(0).(func() int); ok { 102 r0 = rf() 103 } else { 104 r0 = ret.Get(0).(int) 105 } 106 107 return r0 108 } 109 110 // Poll provides a mock function with given fields: blockReference 111 func (_m *DKGController) Poll(blockReference flow.Identifier) error { 112 ret := _m.Called(blockReference) 113 114 var r0 error 115 if rf, ok := ret.Get(0).(func(flow.Identifier) error); ok { 116 r0 = rf(blockReference) 117 } else { 118 r0 = ret.Error(0) 119 } 120 121 return r0 122 } 123 124 // Run provides a mock function with given fields: 125 func (_m *DKGController) Run() error { 126 ret := _m.Called() 127 128 var r0 error 129 if rf, ok := ret.Get(0).(func() error); ok { 130 r0 = rf() 131 } else { 132 r0 = ret.Error(0) 133 } 134 135 return r0 136 } 137 138 // Shutdown provides a mock function with given fields: 139 func (_m *DKGController) Shutdown() { 140 _m.Called() 141 } 142 143 // SubmitResult provides a mock function with given fields: 144 func (_m *DKGController) SubmitResult() error { 145 ret := _m.Called() 146 147 var r0 error 148 if rf, ok := ret.Get(0).(func() error); ok { 149 r0 = rf() 150 } else { 151 r0 = ret.Error(0) 152 } 153 154 return r0 155 } 156 157 type mockConstructorTestingTNewDKGController interface { 158 mock.TestingT 159 Cleanup(func()) 160 } 161 162 // NewDKGController creates a new instance of DKGController. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 163 func NewDKGController(t mockConstructorTestingTNewDKGController) *DKGController { 164 mock := &DKGController{} 165 mock.Mock.Test(t) 166 167 t.Cleanup(func() { mock.AssertExpectations(t) }) 168 169 return mock 170 }