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

package repository

import (
	context "context"

	v0alpha1 "github.com/grafana/grafana/apps/provisioning/pkg/apis/provisioning/v0alpha1"
	mock "github.com/stretchr/testify/mock"
)

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

type MockConfigRepository_Expecter struct {
	mock *mock.Mock
}

func (_m *MockConfigRepository) EXPECT() *MockConfigRepository_Expecter {
	return &MockConfigRepository_Expecter{mock: &_m.Mock}
}

// Config provides a mock function with no fields
func (_m *MockConfigRepository) Config() *v0alpha1.Repository {
	ret := _m.Called()

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

	var r0 *v0alpha1.Repository
	if rf, ok := ret.Get(0).(func() *v0alpha1.Repository); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*v0alpha1.Repository)
		}
	}

	return r0
}

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

// Config is a helper method to define mock.On call
func (_e *MockConfigRepository_Expecter) Config() *MockConfigRepository_Config_Call {
	return &MockConfigRepository_Config_Call{Call: _e.mock.On("Config")}
}

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

func (_c *MockConfigRepository_Config_Call) Return(_a0 *v0alpha1.Repository) *MockConfigRepository_Config_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockConfigRepository_Config_Call) RunAndReturn(run func() *v0alpha1.Repository) *MockConfigRepository_Config_Call {
	_c.Call.Return(run)
	return _c
}

// Test provides a mock function with given fields: ctx
func (_m *MockConfigRepository) Test(ctx context.Context) (*v0alpha1.TestResults, error) {
	ret := _m.Called(ctx)

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

	var r0 *v0alpha1.TestResults
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context) (*v0alpha1.TestResults, error)); ok {
		return rf(ctx)
	}
	if rf, ok := ret.Get(0).(func(context.Context) *v0alpha1.TestResults); ok {
		r0 = rf(ctx)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*v0alpha1.TestResults)
		}
	}

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

	return r0, r1
}

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

// Test is a helper method to define mock.On call
//   - ctx context.Context
func (_e *MockConfigRepository_Expecter) Test(ctx interface{}) *MockConfigRepository_Test_Call {
	return &MockConfigRepository_Test_Call{Call: _e.mock.On("Test", ctx)}
}

func (_c *MockConfigRepository_Test_Call) Run(run func(ctx context.Context)) *MockConfigRepository_Test_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context))
	})
	return _c
}

func (_c *MockConfigRepository_Test_Call) Return(_a0 *v0alpha1.TestResults, _a1 error) *MockConfigRepository_Test_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockConfigRepository_Test_Call) RunAndReturn(run func(context.Context) (*v0alpha1.TestResults, error)) *MockConfigRepository_Test_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
