// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify

package backend

import (
	"context"

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

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

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

	return mock
}

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

type MockStoreLoader_Expecter struct {
	mock *mock.Mock
}

func (_m *MockStoreLoader) EXPECT() *MockStoreLoader_Expecter {
	return &MockStoreLoader_Expecter{mock: &_m.Mock}
}

// Backend provides a mock function for the type MockStoreLoader
func (_mock *MockStoreLoader) Backend(context1 context.Context, s string) (Store, error) {
	ret := _mock.Called(context1, s)

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

	var r0 Store
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (Store, error)); ok {
		return returnFunc(context1, s)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) Store); ok {
		r0 = returnFunc(context1, s)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(Store)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = returnFunc(context1, s)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Backend is a helper method to define mock.On call
//   - context1
//   - s
func (_e *MockStoreLoader_Expecter) Backend(context1 interface{}, s interface{}) *MockStoreLoader_Backend_Call {
	return &MockStoreLoader_Backend_Call{Call: _e.mock.On("Backend", context1, s)}
}

func (_c *MockStoreLoader_Backend_Call) Run(run func(context1 context.Context, s string)) *MockStoreLoader_Backend_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string))
	})
	return _c
}

func (_c *MockStoreLoader_Backend_Call) Return(store Store, err error) *MockStoreLoader_Backend_Call {
	_c.Call.Return(store, err)
	return _c
}

func (_c *MockStoreLoader_Backend_Call) RunAndReturn(run func(context1 context.Context, s string) (Store, error)) *MockStoreLoader_Backend_Call {
	_c.Call.Return(run)
	return _c
}
