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

package database

import (
	context "context"

	mock "github.com/stretchr/testify/mock"
	database "opencsg.com/csghub-server/builder/store/database"
)

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

type MockNamespaceStore_Expecter struct {
	mock *mock.Mock
}

func (_m *MockNamespaceStore) EXPECT() *MockNamespaceStore_Expecter {
	return &MockNamespaceStore_Expecter{mock: &_m.Mock}
}

// Exists provides a mock function with given fields: ctx, path
func (_m *MockNamespaceStore) Exists(ctx context.Context, path string) (bool, error) {
	ret := _m.Called(ctx, path)

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

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

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

	return r0, r1
}

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

// Exists is a helper method to define mock.On call
//   - ctx context.Context
//   - path string
func (_e *MockNamespaceStore_Expecter) Exists(ctx interface{}, path interface{}) *MockNamespaceStore_Exists_Call {
	return &MockNamespaceStore_Exists_Call{Call: _e.mock.On("Exists", ctx, path)}
}

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

func (_c *MockNamespaceStore_Exists_Call) Return(exists bool, err error) *MockNamespaceStore_Exists_Call {
	_c.Call.Return(exists, err)
	return _c
}

func (_c *MockNamespaceStore_Exists_Call) RunAndReturn(run func(context.Context, string) (bool, error)) *MockNamespaceStore_Exists_Call {
	_c.Call.Return(run)
	return _c
}

// FindByPath provides a mock function with given fields: ctx, path
func (_m *MockNamespaceStore) FindByPath(ctx context.Context, path string) (database.Namespace, error) {
	ret := _m.Called(ctx, path)

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

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

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

	return r0, r1
}

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

// FindByPath is a helper method to define mock.On call
//   - ctx context.Context
//   - path string
func (_e *MockNamespaceStore_Expecter) FindByPath(ctx interface{}, path interface{}) *MockNamespaceStore_FindByPath_Call {
	return &MockNamespaceStore_FindByPath_Call{Call: _e.mock.On("FindByPath", ctx, path)}
}

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

func (_c *MockNamespaceStore_FindByPath_Call) Return(namespace database.Namespace, err error) *MockNamespaceStore_FindByPath_Call {
	_c.Call.Return(namespace, err)
	return _c
}

func (_c *MockNamespaceStore_FindByPath_Call) RunAndReturn(run func(context.Context, string) (database.Namespace, error)) *MockNamespaceStore_FindByPath_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
