github.com/goravel/framework@v1.13.9/contracts/queue/mocks/Task.go (about) 1 // Code generated by mockery v2.14.0. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 queue "github.com/goravel/framework/contracts/queue" 7 mock "github.com/stretchr/testify/mock" 8 9 time "time" 10 ) 11 12 // Task is an autogenerated mock type for the Task type 13 type Task struct { 14 mock.Mock 15 } 16 17 // Delay provides a mock function with given fields: _a0 18 func (_m *Task) Delay(_a0 time.Time) queue.Task { 19 ret := _m.Called(_a0) 20 21 var r0 queue.Task 22 if rf, ok := ret.Get(0).(func(time.Time) queue.Task); ok { 23 r0 = rf(_a0) 24 } else { 25 if ret.Get(0) != nil { 26 r0 = ret.Get(0).(queue.Task) 27 } 28 } 29 30 return r0 31 } 32 33 // Dispatch provides a mock function with given fields: 34 func (_m *Task) Dispatch() error { 35 ret := _m.Called() 36 37 var r0 error 38 if rf, ok := ret.Get(0).(func() error); ok { 39 r0 = rf() 40 } else { 41 r0 = ret.Error(0) 42 } 43 44 return r0 45 } 46 47 // DispatchSync provides a mock function with given fields: 48 func (_m *Task) DispatchSync() error { 49 ret := _m.Called() 50 51 var r0 error 52 if rf, ok := ret.Get(0).(func() error); ok { 53 r0 = rf() 54 } else { 55 r0 = ret.Error(0) 56 } 57 58 return r0 59 } 60 61 // OnConnection provides a mock function with given fields: connection 62 func (_m *Task) OnConnection(connection string) queue.Task { 63 ret := _m.Called(connection) 64 65 var r0 queue.Task 66 if rf, ok := ret.Get(0).(func(string) queue.Task); ok { 67 r0 = rf(connection) 68 } else { 69 if ret.Get(0) != nil { 70 r0 = ret.Get(0).(queue.Task) 71 } 72 } 73 74 return r0 75 } 76 77 // OnQueue provides a mock function with given fields: _a0 78 func (_m *Task) OnQueue(_a0 string) queue.Task { 79 ret := _m.Called(_a0) 80 81 var r0 queue.Task 82 if rf, ok := ret.Get(0).(func(string) queue.Task); ok { 83 r0 = rf(_a0) 84 } else { 85 if ret.Get(0) != nil { 86 r0 = ret.Get(0).(queue.Task) 87 } 88 } 89 90 return r0 91 } 92 93 type mockConstructorTestingTNewTask interface { 94 mock.TestingT 95 Cleanup(func()) 96 } 97 98 // NewTask creates a new instance of Task. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 99 func NewTask(t mockConstructorTestingTNewTask) *Task { 100 mock := &Task{} 101 mock.Mock.Test(t) 102 103 t.Cleanup(func() { mock.AssertExpectations(t) }) 104 105 return mock 106 }