github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/consensus/hotstuff/mocks/timeout_collector.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 model "github.com/onflow/flow-go/consensus/hotstuff/model" 7 mock "github.com/stretchr/testify/mock" 8 ) 9 10 // TimeoutCollector is an autogenerated mock type for the TimeoutCollector type 11 type TimeoutCollector struct { 12 mock.Mock 13 } 14 15 // AddTimeout provides a mock function with given fields: timeoutObject 16 func (_m *TimeoutCollector) AddTimeout(timeoutObject *model.TimeoutObject) error { 17 ret := _m.Called(timeoutObject) 18 19 var r0 error 20 if rf, ok := ret.Get(0).(func(*model.TimeoutObject) error); ok { 21 r0 = rf(timeoutObject) 22 } else { 23 r0 = ret.Error(0) 24 } 25 26 return r0 27 } 28 29 // View provides a mock function with given fields: 30 func (_m *TimeoutCollector) View() uint64 { 31 ret := _m.Called() 32 33 var r0 uint64 34 if rf, ok := ret.Get(0).(func() uint64); ok { 35 r0 = rf() 36 } else { 37 r0 = ret.Get(0).(uint64) 38 } 39 40 return r0 41 } 42 43 type mockConstructorTestingTNewTimeoutCollector interface { 44 mock.TestingT 45 Cleanup(func()) 46 } 47 48 // NewTimeoutCollector creates a new instance of TimeoutCollector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 49 func NewTimeoutCollector(t mockConstructorTestingTNewTimeoutCollector) *TimeoutCollector { 50 mock := &TimeoutCollector{} 51 mock.Mock.Test(t) 52 53 t.Cleanup(func() { mock.AssertExpectations(t) }) 54 55 return mock 56 }