github.com/koko1123/flow-go-1@v0.29.6/module/mock/job_consumer.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 module "github.com/koko1123/flow-go-1/module" 7 mock "github.com/stretchr/testify/mock" 8 ) 9 10 // JobConsumer is an autogenerated mock type for the JobConsumer type 11 type JobConsumer struct { 12 mock.Mock 13 } 14 15 // Check provides a mock function with given fields: 16 func (_m *JobConsumer) Check() { 17 _m.Called() 18 } 19 20 // LastProcessedIndex provides a mock function with given fields: 21 func (_m *JobConsumer) LastProcessedIndex() uint64 { 22 ret := _m.Called() 23 24 var r0 uint64 25 if rf, ok := ret.Get(0).(func() uint64); ok { 26 r0 = rf() 27 } else { 28 r0 = ret.Get(0).(uint64) 29 } 30 31 return r0 32 } 33 34 // NotifyJobIsDone provides a mock function with given fields: _a0 35 func (_m *JobConsumer) NotifyJobIsDone(_a0 module.JobID) uint64 { 36 ret := _m.Called(_a0) 37 38 var r0 uint64 39 if rf, ok := ret.Get(0).(func(module.JobID) uint64); ok { 40 r0 = rf(_a0) 41 } else { 42 r0 = ret.Get(0).(uint64) 43 } 44 45 return r0 46 } 47 48 // Size provides a mock function with given fields: 49 func (_m *JobConsumer) Size() uint { 50 ret := _m.Called() 51 52 var r0 uint 53 if rf, ok := ret.Get(0).(func() uint); ok { 54 r0 = rf() 55 } else { 56 r0 = ret.Get(0).(uint) 57 } 58 59 return r0 60 } 61 62 // Start provides a mock function with given fields: defaultIndex 63 func (_m *JobConsumer) Start(defaultIndex uint64) error { 64 ret := _m.Called(defaultIndex) 65 66 var r0 error 67 if rf, ok := ret.Get(0).(func(uint64) error); ok { 68 r0 = rf(defaultIndex) 69 } else { 70 r0 = ret.Error(0) 71 } 72 73 return r0 74 } 75 76 // Stop provides a mock function with given fields: 77 func (_m *JobConsumer) Stop() { 78 _m.Called() 79 } 80 81 type mockConstructorTestingTNewJobConsumer interface { 82 mock.TestingT 83 Cleanup(func()) 84 } 85 86 // NewJobConsumer creates a new instance of JobConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 87 func NewJobConsumer(t mockConstructorTestingTNewJobConsumer) *JobConsumer { 88 mock := &JobConsumer{} 89 mock.Mock.Test(t) 90 91 t.Cleanup(func() { mock.AssertExpectations(t) }) 92 93 return mock 94 }