helpers/runner_wrapper/mock_commanderFactory.go (55 lines of code) (raw):
// Code generated by mockery v2.53.3. DO NOT EDIT.
package runner_wrapper
import mock "github.com/stretchr/testify/mock"
// mockCommanderFactory is an autogenerated mock type for the commanderFactory type
type mockCommanderFactory struct {
mock.Mock
}
type mockCommanderFactory_Expecter struct {
mock *mock.Mock
}
func (_m *mockCommanderFactory) EXPECT() *mockCommanderFactory_Expecter {
return &mockCommanderFactory_Expecter{mock: &_m.Mock}
}
// Execute provides a mock function with given fields: path, args
func (_m *mockCommanderFactory) Execute(path string, args []string) commander {
ret := _m.Called(path, args)
if len(ret) == 0 {
panic("no return value specified for Execute")
}
var r0 commander
if rf, ok := ret.Get(0).(func(string, []string) commander); ok {
r0 = rf(path, args)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(commander)
}
}
return r0
}
// mockCommanderFactory_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'
type mockCommanderFactory_Execute_Call struct {
*mock.Call
}
// Execute is a helper method to define mock.On call
// - path string
// - args []string
func (_e *mockCommanderFactory_Expecter) Execute(path interface{}, args interface{}) *mockCommanderFactory_Execute_Call {
return &mockCommanderFactory_Execute_Call{Call: _e.mock.On("Execute", path, args)}
}
func (_c *mockCommanderFactory_Execute_Call) Run(run func(path string, args []string)) *mockCommanderFactory_Execute_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string), args[1].([]string))
})
return _c
}
func (_c *mockCommanderFactory_Execute_Call) Return(_a0 commander) *mockCommanderFactory_Execute_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *mockCommanderFactory_Execute_Call) RunAndReturn(run func(string, []string) commander) *mockCommanderFactory_Execute_Call {
_c.Call.Return(run)
return _c
}
// newMockCommanderFactory creates a new instance of mockCommanderFactory. 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 newMockCommanderFactory(t interface {
mock.TestingT
Cleanup(func())
}) *mockCommanderFactory {
mock := &mockCommanderFactory{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}