// Code generated by mockery v2.43.0. DO NOT EDIT.

package mocks

import (
	context "context"

	auth "github.com/argoproj-labs/argocd-agent/internal/auth"

	mock "github.com/stretchr/testify/mock"
)

// Method is an autogenerated mock type for the Method type
type Method struct {
	mock.Mock
}

type Method_Expecter struct {
	mock *mock.Mock
}

func (_m *Method) EXPECT() *Method_Expecter {
	return &Method_Expecter{mock: &_m.Mock}
}

// Authenticate provides a mock function with given fields: ctx, credentials
func (_m *Method) Authenticate(ctx context.Context, credentials auth.Credentials) (string, error) {
	ret := _m.Called(ctx, credentials)

	if len(ret) == 0 {
		panic("no return value specified for Authenticate")
	}

	var r0 string
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, auth.Credentials) (string, error)); ok {
		return rf(ctx, credentials)
	}
	if rf, ok := ret.Get(0).(func(context.Context, auth.Credentials) string); ok {
		r0 = rf(ctx, credentials)
	} else {
		r0 = ret.Get(0).(string)
	}

	if rf, ok := ret.Get(1).(func(context.Context, auth.Credentials) error); ok {
		r1 = rf(ctx, credentials)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Method_Authenticate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Authenticate'
type Method_Authenticate_Call struct {
	*mock.Call
}

// Authenticate is a helper method to define mock.On call
//   - ctx context.Context
//   - credentials auth.Credentials
func (_e *Method_Expecter) Authenticate(ctx interface{}, credentials interface{}) *Method_Authenticate_Call {
	return &Method_Authenticate_Call{Call: _e.mock.On("Authenticate", ctx, credentials)}
}

func (_c *Method_Authenticate_Call) Run(run func(ctx context.Context, credentials auth.Credentials)) *Method_Authenticate_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(auth.Credentials))
	})
	return _c
}

func (_c *Method_Authenticate_Call) Return(_a0 string, _a1 error) *Method_Authenticate_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *Method_Authenticate_Call) RunAndReturn(run func(context.Context, auth.Credentials) (string, error)) *Method_Authenticate_Call {
	_c.Call.Return(run)
	return _c
}

// Init provides a mock function with given fields:
func (_m *Method) Init() error {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for Init")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func() error); ok {
		r0 = rf()
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// Method_Init_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Init'
type Method_Init_Call struct {
	*mock.Call
}

// Init is a helper method to define mock.On call
func (_e *Method_Expecter) Init() *Method_Init_Call {
	return &Method_Init_Call{Call: _e.mock.On("Init")}
}

func (_c *Method_Init_Call) Run(run func()) *Method_Init_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *Method_Init_Call) Return(_a0 error) *Method_Init_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *Method_Init_Call) RunAndReturn(run func() error) *Method_Init_Call {
	_c.Call.Return(run)
	return _c
}

// NewMethod creates a new instance of Method. 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 NewMethod(t interface {
	mock.TestingT
	Cleanup(func())
}) *Method {
	mock := &Method{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}
