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

package mocks

import (
	context "context"

	biz "github.com/chainloop-dev/chainloop/app/controlplane/pkg/biz"

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

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

// CurrentMembership provides a mock function with given fields: ctx, userID
func (_m *UserOrgFinder) CurrentMembership(ctx context.Context, userID string) (*biz.Membership, error) {
	ret := _m.Called(ctx, userID)

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

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

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

	return r0, r1
}

// FindByID provides a mock function with given fields: ctx, userID
func (_m *UserOrgFinder) FindByID(ctx context.Context, userID string) (*biz.User, error) {
	ret := _m.Called(ctx, userID)

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

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

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

	return r0, r1
}

// MembershipInOrg provides a mock function with given fields: ctx, userID, orgName
func (_m *UserOrgFinder) MembershipInOrg(ctx context.Context, userID string, orgName string) (*biz.Membership, error) {
	ret := _m.Called(ctx, userID, orgName)

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

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

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

	return r0, r1
}

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

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

	return mock
}
