// Code generated by mockery v1.0.0. DO NOT EDIT.

package local

import mock "github.com/stretchr/testify/mock"
import pkgtypes "github.com/aquasecurity/trivy/pkg/types"
import time "time"
import types "github.com/aquasecurity/fanal/types"

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

type LibraryDetectorDetectArgs struct {
	ImageName         string
	ImageNameAnything bool
	FilePath          string
	FilePathAnything  bool
	Created           time.Time
	CreatedAnything   bool
	Pkgs              []types.LibraryInfo
	PkgsAnything      bool
}

type LibraryDetectorDetectReturns struct {
	DetectedVulns []pkgtypes.DetectedVulnerability
	Err           error
}

type LibraryDetectorDetectExpectation struct {
	Args    LibraryDetectorDetectArgs
	Returns LibraryDetectorDetectReturns
}

func (_m *MockLibraryDetector) ApplyDetectExpectation(e LibraryDetectorDetectExpectation) {
	var args []interface{}
	if e.Args.ImageNameAnything {
		args = append(args, mock.Anything)
	} else {
		args = append(args, e.Args.ImageName)
	}
	if e.Args.FilePathAnything {
		args = append(args, mock.Anything)
	} else {
		args = append(args, e.Args.FilePath)
	}
	if e.Args.CreatedAnything {
		args = append(args, mock.Anything)
	} else {
		args = append(args, e.Args.Created)
	}
	if e.Args.PkgsAnything {
		args = append(args, mock.Anything)
	} else {
		args = append(args, e.Args.Pkgs)
	}
	_m.On("Detect", args...).Return(e.Returns.DetectedVulns, e.Returns.Err)
}

func (_m *MockLibraryDetector) ApplyDetectExpectations(expectations []LibraryDetectorDetectExpectation) {
	for _, e := range expectations {
		_m.ApplyDetectExpectation(e)
	}
}

// Detect provides a mock function with given fields: imageName, filePath, created, pkgs
func (_m *MockLibraryDetector) Detect(imageName string, filePath string, created time.Time, pkgs []types.LibraryInfo) ([]pkgtypes.DetectedVulnerability, error) {
	ret := _m.Called(imageName, filePath, created, pkgs)

	var r0 []pkgtypes.DetectedVulnerability
	if rf, ok := ret.Get(0).(func(string, string, time.Time, []types.LibraryInfo) []pkgtypes.DetectedVulnerability); ok {
		r0 = rf(imageName, filePath, created, pkgs)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]pkgtypes.DetectedVulnerability)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(string, string, time.Time, []types.LibraryInfo) error); ok {
		r1 = rf(imageName, filePath, created, pkgs)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
