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

package dao

import (
	context "context"

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

	models "github.com/goharbor/harbor/src/pkg/allowlist/models"
)

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

// QueryByProjectID provides a mock function with given fields: ctx, pid
func (_m *DAO) QueryByProjectID(ctx context.Context, pid int64) (*models.CVEAllowlist, error) {
	ret := _m.Called(ctx, pid)

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

	var r0 *models.CVEAllowlist
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, int64) (*models.CVEAllowlist, error)); ok {
		return rf(ctx, pid)
	}
	if rf, ok := ret.Get(0).(func(context.Context, int64) *models.CVEAllowlist); ok {
		r0 = rf(ctx, pid)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*models.CVEAllowlist)
		}
	}

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

	return r0, r1
}

// Set provides a mock function with given fields: ctx, l
func (_m *DAO) Set(ctx context.Context, l models.CVEAllowlist) (int64, error) {
	ret := _m.Called(ctx, l)

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

	var r0 int64
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, models.CVEAllowlist) (int64, error)); ok {
		return rf(ctx, l)
	}
	if rf, ok := ret.Get(0).(func(context.Context, models.CVEAllowlist) int64); ok {
		r0 = rf(ctx, l)
	} else {
		r0 = ret.Get(0).(int64)
	}

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

	return r0, r1
}

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

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

	return mock
}
