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

package backend

import (
	"context"

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

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

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

	return mock
}

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

type MockBuilder_Expecter struct {
	mock *mock.Mock
}

func (_m *MockBuilder) EXPECT() *MockBuilder_Expecter {
	return &MockBuilder_Expecter{mock: &_m.Mock}
}

// Build provides a mock function for the type MockBuilder
func (_mock *MockBuilder) Build(ctx context.Context, name string) (Store, error) {
	ret := _mock.Called(ctx, name)

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

	var r0 Store
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (Store, error)); ok {
		return returnFunc(ctx, name)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) Store); ok {
		r0 = returnFunc(ctx, name)
	} 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(ctx, name)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Build is a helper method to define mock.On call
//   - ctx
//   - name
func (_e *MockBuilder_Expecter) Build(ctx interface{}, name interface{}) *MockBuilder_Build_Call {
	return &MockBuilder_Build_Call{Call: _e.mock.On("Build", ctx, name)}
}

func (_c *MockBuilder_Build_Call) Run(run func(ctx context.Context, name string)) *MockBuilder_Build_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string))
	})
	return _c
}

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

func (_c *MockBuilder_Build_Call) RunAndReturn(run func(ctx context.Context, name string) (Store, error)) *MockBuilder_Build_Call {
	_c.Call.Return(run)
	return _c
}
