You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
consul/internal/controller/controllermock/mock_CustomDependencyMapper.go

94 lines
3.1 KiB

// Code generated by mockery v2.37.1. DO NOT EDIT.
package controllermock
import (
context "context"
controller "github.com/hashicorp/consul/internal/controller"
mock "github.com/stretchr/testify/mock"
)
// CustomDependencyMapper is an autogenerated mock type for the CustomDependencyMapper type
type CustomDependencyMapper struct {
mock.Mock
}
type CustomDependencyMapper_Expecter struct {
mock *mock.Mock
}
func (_m *CustomDependencyMapper) EXPECT() *CustomDependencyMapper_Expecter {
return &CustomDependencyMapper_Expecter{mock: &_m.Mock}
}
// Execute provides a mock function with given fields: ctx, rt, event
func (_m *CustomDependencyMapper) Execute(ctx context.Context, rt controller.Runtime, event controller.Event) ([]controller.Request, error) {
ret := _m.Called(ctx, rt, event)
var r0 []controller.Request
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, controller.Runtime, controller.Event) ([]controller.Request, error)); ok {
return rf(ctx, rt, event)
}
if rf, ok := ret.Get(0).(func(context.Context, controller.Runtime, controller.Event) []controller.Request); ok {
r0 = rf(ctx, rt, event)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]controller.Request)
}
}
if rf, ok := ret.Get(1).(func(context.Context, controller.Runtime, controller.Event) error); ok {
r1 = rf(ctx, rt, event)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// CustomDependencyMapper_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'
type CustomDependencyMapper_Execute_Call struct {
*mock.Call
}
// Execute is a helper method to define mock.On call
// - ctx context.Context
// - rt controller.Runtime
// - event controller.Event
func (_e *CustomDependencyMapper_Expecter) Execute(ctx interface{}, rt interface{}, event interface{}) *CustomDependencyMapper_Execute_Call {
return &CustomDependencyMapper_Execute_Call{Call: _e.mock.On("Execute", ctx, rt, event)}
}
func (_c *CustomDependencyMapper_Execute_Call) Run(run func(ctx context.Context, rt controller.Runtime, event controller.Event)) *CustomDependencyMapper_Execute_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(controller.Runtime), args[2].(controller.Event))
})
return _c
}
func (_c *CustomDependencyMapper_Execute_Call) Return(_a0 []controller.Request, _a1 error) *CustomDependencyMapper_Execute_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *CustomDependencyMapper_Execute_Call) RunAndReturn(run func(context.Context, controller.Runtime, controller.Event) ([]controller.Request, error)) *CustomDependencyMapper_Execute_Call {
_c.Call.Return(run)
return _c
}
// NewCustomDependencyMapper creates a new instance of CustomDependencyMapper. 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 NewCustomDependencyMapper(t interface {
mock.TestingT
Cleanup(func())
}) *CustomDependencyMapper {
mock := &CustomDependencyMapper{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}