// Code generated by mockery v2.12.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)

	var r0 *models.CVEAllowlist
	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)
		}
	}

	var r1 error
	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)

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

	var r1 error
	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
}

type NewDAOT interface {
	mock.TestingT
	Cleanup(func())
}

// 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.
func NewDAO(t NewDAOT) *DAO {
	mock := &DAO{}
	mock.Mock.Test(t)

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

	return mock
}
