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

package mocks

import (
	"context"

	"github.com/agntcy/identity-service/internal/core/idp"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type CredentialStore_Expecter struct {
	mock *mock.Mock
}

func (_m *CredentialStore) EXPECT() *CredentialStore_Expecter {
	return &CredentialStore_Expecter{mock: &_m.Mock}
}

// Delete provides a mock function for the type CredentialStore
func (_mock *CredentialStore) Delete(ctx context.Context, subject string) error {
	ret := _mock.Called(ctx, subject)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
		r0 = returnFunc(ctx, subject)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// Delete is a helper method to define mock.On call
//   - ctx context.Context
//   - subject string
func (_e *CredentialStore_Expecter) Delete(ctx interface{}, subject interface{}) *CredentialStore_Delete_Call {
	return &CredentialStore_Delete_Call{Call: _e.mock.On("Delete", ctx, subject)}
}

func (_c *CredentialStore_Delete_Call) Run(run func(ctx context.Context, subject string)) *CredentialStore_Delete_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *CredentialStore_Delete_Call) Return(err error) *CredentialStore_Delete_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *CredentialStore_Delete_Call) RunAndReturn(run func(ctx context.Context, subject string) error) *CredentialStore_Delete_Call {
	_c.Call.Return(run)
	return _c
}

// Get provides a mock function for the type CredentialStore
func (_mock *CredentialStore) Get(ctx context.Context, subject string) (*idp.ClientCredentials, error) {
	ret := _mock.Called(ctx, subject)

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

	var r0 *idp.ClientCredentials
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*idp.ClientCredentials, error)); ok {
		return returnFunc(ctx, subject)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) *idp.ClientCredentials); ok {
		r0 = returnFunc(ctx, subject)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*idp.ClientCredentials)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = returnFunc(ctx, subject)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Get is a helper method to define mock.On call
//   - ctx context.Context
//   - subject string
func (_e *CredentialStore_Expecter) Get(ctx interface{}, subject interface{}) *CredentialStore_Get_Call {
	return &CredentialStore_Get_Call{Call: _e.mock.On("Get", ctx, subject)}
}

func (_c *CredentialStore_Get_Call) Run(run func(ctx context.Context, subject string)) *CredentialStore_Get_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *CredentialStore_Get_Call) Return(clientCredentials *idp.ClientCredentials, err error) *CredentialStore_Get_Call {
	_c.Call.Return(clientCredentials, err)
	return _c
}

func (_c *CredentialStore_Get_Call) RunAndReturn(run func(ctx context.Context, subject string) (*idp.ClientCredentials, error)) *CredentialStore_Get_Call {
	_c.Call.Return(run)
	return _c
}

// Put provides a mock function for the type CredentialStore
func (_mock *CredentialStore) Put(ctx context.Context, cred *idp.ClientCredentials, subject string) error {
	ret := _mock.Called(ctx, cred, subject)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *idp.ClientCredentials, string) error); ok {
		r0 = returnFunc(ctx, cred, subject)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// Put is a helper method to define mock.On call
//   - ctx context.Context
//   - cred *idp.ClientCredentials
//   - subject string
func (_e *CredentialStore_Expecter) Put(ctx interface{}, cred interface{}, subject interface{}) *CredentialStore_Put_Call {
	return &CredentialStore_Put_Call{Call: _e.mock.On("Put", ctx, cred, subject)}
}

func (_c *CredentialStore_Put_Call) Run(run func(ctx context.Context, cred *idp.ClientCredentials, subject string)) *CredentialStore_Put_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *idp.ClientCredentials
		if args[1] != nil {
			arg1 = args[1].(*idp.ClientCredentials)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *CredentialStore_Put_Call) Return(err error) *CredentialStore_Put_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *CredentialStore_Put_Call) RunAndReturn(run func(ctx context.Context, cred *idp.ClientCredentials, subject string) error) *CredentialStore_Put_Call {
	_c.Call.Return(run)
	return _c
}
