tasks/pkg/mocks/APIFilter.go
Андрей Иванов 8f33a4aadc Решено
2025-07-30 14:37:05 +03:00

153 lines
4.1 KiB
Go

// Code generated by mockery. DO NOT EDIT.
package mocks
import (
api_filter "tasks/internal/20250729_api_filter"
mock "github.com/stretchr/testify/mock"
)
// APIFilter is an autogenerated mock type for the API type
type APIFilter struct {
mock.Mock
}
type APIFilter_Expecter struct {
mock *mock.Mock
}
func (_m *APIFilter) EXPECT() *APIFilter_Expecter {
return &APIFilter_Expecter{mock: &_m.Mock}
}
// GetIDByPath provides a mock function with given fields: paths
func (_m *APIFilter) GetIDByPath(paths []string) ([]api_filter.RealID, error) {
ret := _m.Called(paths)
if len(ret) == 0 {
panic("no return value specified for GetIDByPath")
}
var r0 []api_filter.RealID
var r1 error
if rf, ok := ret.Get(0).(func([]string) ([]api_filter.RealID, error)); ok {
return rf(paths)
}
if rf, ok := ret.Get(0).(func([]string) []api_filter.RealID); ok {
r0 = rf(paths)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]api_filter.RealID)
}
}
if rf, ok := ret.Get(1).(func([]string) error); ok {
r1 = rf(paths)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// APIFilter_GetIDByPath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetIDByPath'
type APIFilter_GetIDByPath_Call struct {
*mock.Call
}
// GetIDByPath is a helper method to define mock.On call
// - paths []string
func (_e *APIFilter_Expecter) GetIDByPath(paths interface{}) *APIFilter_GetIDByPath_Call {
return &APIFilter_GetIDByPath_Call{Call: _e.mock.On("GetIDByPath", paths)}
}
func (_c *APIFilter_GetIDByPath_Call) Run(run func(paths []string)) *APIFilter_GetIDByPath_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].([]string))
})
return _c
}
func (_c *APIFilter_GetIDByPath_Call) Return(IDs []api_filter.RealID, err error) *APIFilter_GetIDByPath_Call {
_c.Call.Return(IDs, err)
return _c
}
func (_c *APIFilter_GetIDByPath_Call) RunAndReturn(run func([]string) ([]api_filter.RealID, error)) *APIFilter_GetIDByPath_Call {
_c.Call.Return(run)
return _c
}
// GetNodeAttribute provides a mock function with given fields: realIDs
func (_m *APIFilter) GetNodeAttribute(realIDs []string) ([]api_filter.NodeAttribute, error) {
ret := _m.Called(realIDs)
if len(ret) == 0 {
panic("no return value specified for GetNodeAttribute")
}
var r0 []api_filter.NodeAttribute
var r1 error
if rf, ok := ret.Get(0).(func([]string) ([]api_filter.NodeAttribute, error)); ok {
return rf(realIDs)
}
if rf, ok := ret.Get(0).(func([]string) []api_filter.NodeAttribute); ok {
r0 = rf(realIDs)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]api_filter.NodeAttribute)
}
}
if rf, ok := ret.Get(1).(func([]string) error); ok {
r1 = rf(realIDs)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// APIFilter_GetNodeAttribute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNodeAttribute'
type APIFilter_GetNodeAttribute_Call struct {
*mock.Call
}
// GetNodeAttribute is a helper method to define mock.On call
// - realIDs []string
func (_e *APIFilter_Expecter) GetNodeAttribute(realIDs interface{}) *APIFilter_GetNodeAttribute_Call {
return &APIFilter_GetNodeAttribute_Call{Call: _e.mock.On("GetNodeAttribute", realIDs)}
}
func (_c *APIFilter_GetNodeAttribute_Call) Run(run func(realIDs []string)) *APIFilter_GetNodeAttribute_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].([]string))
})
return _c
}
func (_c *APIFilter_GetNodeAttribute_Call) Return(nodes []api_filter.NodeAttribute, err error) *APIFilter_GetNodeAttribute_Call {
_c.Call.Return(nodes, err)
return _c
}
func (_c *APIFilter_GetNodeAttribute_Call) RunAndReturn(run func([]string) ([]api_filter.NodeAttribute, error)) *APIFilter_GetNodeAttribute_Call {
_c.Call.Return(run)
return _c
}
// NewAPIFilter creates a new instance of APIFilter. 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 NewAPIFilter(t interface {
mock.TestingT
Cleanup(func())
}) *APIFilter {
mock := &APIFilter{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}