recipes2/internal/http-server/handlers/recipe/mocks/RecipeProvider.go

58 lines
1.4 KiB
Go
Raw Normal View History

2024-01-28 10:37:18 +02:00
// 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"
)
// RecipeProvider is an autogenerated mock type for the RecipeProvider type
type RecipeProvider struct {
mock.Mock
}
// GetRecipe provides a mock function with given fields: ctx, r_id
func (_m *RecipeProvider) GetRecipe(ctx context.Context, r_id uint) (models.Recipe, error) {
ret := _m.Called(ctx, r_id)
if len(ret) == 0 {
panic("no return value specified for GetRecipe")
}
var r0 models.Recipe
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, uint) (models.Recipe, error)); ok {
return rf(ctx, r_id)
}
if rf, ok := ret.Get(0).(func(context.Context, uint) models.Recipe); ok {
r0 = rf(ctx, r_id)
} else {
r0 = ret.Get(0).(models.Recipe)
}
if rf, ok := ret.Get(1).(func(context.Context, uint) error); ok {
r1 = rf(ctx, r_id)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// NewRecipeProvider creates a new instance of RecipeProvider. 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 NewRecipeProvider(t interface {
mock.TestingT
Cleanup(func())
}) *RecipeProvider {
mock := &RecipeProvider{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}