github.com/koko1123/flow-go-1@v0.29.6/module/mock/hot_stuff.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 flow "github.com/koko1123/flow-go-1/model/flow" 7 irrecoverable "github.com/koko1123/flow-go-1/module/irrecoverable" 8 9 mock "github.com/stretchr/testify/mock" 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, parentView 55 func (_m *HotStuff) SubmitProposal(proposal *flow.Header, parentView uint64) <-chan struct{} { 56 ret := _m.Called(proposal, parentView) 57 58 var r0 <-chan struct{} 59 if rf, ok := ret.Get(0).(func(*flow.Header, uint64) <-chan struct{}); ok { 60 r0 = rf(proposal, parentView) 61 } else { 62 if ret.Get(0) != nil { 63 r0 = ret.Get(0).(<-chan struct{}) 64 } 65 } 66 67 return r0 68 } 69 70 type mockConstructorTestingTNewHotStuff interface { 71 mock.TestingT 72 Cleanup(func()) 73 } 74 75 // 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. 76 func NewHotStuff(t mockConstructorTestingTNewHotStuff) *HotStuff { 77 mock := &HotStuff{} 78 mock.Mock.Test(t) 79 80 t.Cleanup(func() { mock.AssertExpectations(t) }) 81 82 return mock 83 }