consul/internal/controller/controllermock/mock_task.go

79 lines
1.8 KiB
Go

// Code generated by mockery v2.37.1. DO NOT EDIT.
package controllermock
import (
context "context"
mock "github.com/stretchr/testify/mock"
)
// task is an autogenerated mock type for the task type
type task struct {
mock.Mock
}
type task_Expecter struct {
mock *mock.Mock
}
func (_m *task) EXPECT() *task_Expecter {
return &task_Expecter{mock: &_m.Mock}
}
// Execute provides a mock function with given fields: _a0
func (_m *task) Execute(_a0 context.Context) error {
ret := _m.Called(_a0)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context) error); ok {
r0 = rf(_a0)
} else {
r0 = ret.Error(0)
}
return r0
}
// task_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'
type task_Execute_Call struct {
*mock.Call
}
// Execute is a helper method to define mock.On call
// - _a0 context.Context
func (_e *task_Expecter) Execute(_a0 interface{}) *task_Execute_Call {
return &task_Execute_Call{Call: _e.mock.On("Execute", _a0)}
}
func (_c *task_Execute_Call) Run(run func(_a0 context.Context)) *task_Execute_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context))
})
return _c
}
func (_c *task_Execute_Call) Return(_a0 error) *task_Execute_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *task_Execute_Call) RunAndReturn(run func(context.Context) error) *task_Execute_Call {
_c.Call.Return(run)
return _c
}
// 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.
// The first argument is typically a *testing.T value.
func newTask(t interface {
mock.TestingT
Cleanup(func())
}) *task {
mock := &task{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}