mirror of
https://github.com/int128/kubelogin.git
synced 2026-02-14 08:29:51 +00:00
* chore(deps): update module github.com/vektra/mockery/v2 to v3 * Update config --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Hidetake Iwata <int128@gmail.com>
86 lines
2.2 KiB
Go
86 lines
2.2 KiB
Go
// Code generated by mockery; DO NOT EDIT.
|
|
// github.com/vektra/mockery
|
|
// template: testify
|
|
|
|
package setup_mock
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/int128/kubelogin/pkg/usecases/setup"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// NewMockInterface creates a new instance of MockInterface. 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 NewMockInterface(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *MockInterface {
|
|
mock := &MockInterface{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|
|
|
|
// MockInterface is an autogenerated mock type for the Interface type
|
|
type MockInterface struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type MockInterface_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *MockInterface) EXPECT() *MockInterface_Expecter {
|
|
return &MockInterface_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// Do provides a mock function for the type MockInterface
|
|
func (_mock *MockInterface) Do(ctx context.Context, in setup.Input) error {
|
|
ret := _mock.Called(ctx, in)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Do")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, setup.Input) error); ok {
|
|
r0 = returnFunc(ctx, in)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// MockInterface_Do_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Do'
|
|
type MockInterface_Do_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Do is a helper method to define mock.On call
|
|
// - ctx
|
|
// - in
|
|
func (_e *MockInterface_Expecter) Do(ctx interface{}, in interface{}) *MockInterface_Do_Call {
|
|
return &MockInterface_Do_Call{Call: _e.mock.On("Do", ctx, in)}
|
|
}
|
|
|
|
func (_c *MockInterface_Do_Call) Run(run func(ctx context.Context, in setup.Input)) *MockInterface_Do_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(setup.Input))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockInterface_Do_Call) Return(err error) *MockInterface_Do_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockInterface_Do_Call) RunAndReturn(run func(ctx context.Context, in setup.Input) error) *MockInterface_Do_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|