60 lines
1.6 KiB
Go
60 lines
1.6 KiB
Go
// Code generated by mockery v2.40.1. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
context "context"
|
|
models "recipes/internal/domain/models"
|
|
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// RecipesProvider is an autogenerated mock type for the RecipesProvider type
|
|
type RecipesProvider struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// GetRecipesByCategory provides a mock function with given fields: ctx, offset, limit, category
|
|
func (_m *RecipesProvider) GetRecipesByCategory(ctx context.Context, offset int, limit int, category string) ([]models.Recipe, error) {
|
|
ret := _m.Called(ctx, offset, limit, category)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetRecipesByCategory")
|
|
}
|
|
|
|
var r0 []models.Recipe
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int, int, string) ([]models.Recipe, error)); ok {
|
|
return rf(ctx, offset, limit, category)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, int, int, string) []models.Recipe); ok {
|
|
r0 = rf(ctx, offset, limit, category)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]models.Recipe)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int, int, string) error); ok {
|
|
r1 = rf(ctx, offset, limit, category)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// NewRecipesProvider creates a new instance of RecipesProvider. 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 NewRecipesProvider(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *RecipesProvider {
|
|
mock := &RecipesProvider{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|