github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/module/mock/hot_stuff.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 irrecoverable "github.com/onflow/flow-go/module/irrecoverable" 7 mock "github.com/stretchr/testify/mock" 8 9 model "github.com/onflow/flow-go/consensus/hotstuff/model" 10 ) 11 12 // HotStuff is an autogenerated mock type for the HotStuff type 13 type HotStuff struct { 14 mock.Mock 15 } 16 17 // Done provides a mock function with given fields: 18 func (_m *HotStuff) Done() <-chan struct{} { 19 ret := _m.Called() 20 21 var r0 <-chan struct{} 22 if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { 23 r0 = rf() 24 } else { 25 if ret.Get(0) != nil { 26 r0 = ret.Get(0).(<-chan struct{}) 27 } 28 } 29 30 return r0 31 } 32 33 // Ready provides a mock function with given fields: 34 func (_m *HotStuff) Ready() <-chan struct{} { 35 ret := _m.Called() 36 37 var r0 <-chan struct{} 38 if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { 39 r0 = rf() 40 } else { 41 if ret.Get(0) != nil { 42 r0 = ret.Get(0).(<-chan struct{}) 43 } 44 } 45 46 return r0 47 } 48 49 // Start provides a mock function with given fields: _a0 50 func (_m *HotStuff) Start(_a0 irrecoverable.SignalerContext) { 51 _m.Called(_a0) 52 } 53 54 // SubmitProposal provides a mock function with given fields: proposal 55 func (_m *HotStuff) SubmitProposal(proposal *model.Proposal) { 56 _m.Called(proposal) 57 } 58 59 type mockConstructorTestingTNewHotStuff interface { 60 mock.TestingT 61 Cleanup(func()) 62 } 63 64 // NewHotStuff creates a new instance of HotStuff. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 65 func NewHotStuff(t mockConstructorTestingTNewHotStuff) *HotStuff { 66 mock := &HotStuff{} 67 mock.Mock.Test(t) 68 69 t.Cleanup(func() { mock.AssertExpectations(t) }) 70 71 return mock 72 }