recipes2/internal/http-server/handlers/recipeImage/mocks/ImageProvider.go

60 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"
io "io"
mock "github.com/stretchr/testify/mock"
)
// ImageProvider is an autogenerated mock type for the ImageProvider type
type ImageProvider struct {
mock.Mock
}
// RecipeImage provides a mock function with given fields: ctx, filename
func (_m *ImageProvider) RecipeImage(ctx context.Context, filename string) (io.ReadCloser, error) {
ret := _m.Called(ctx, filename)
if len(ret) == 0 {
panic("no return value specified for RecipeImage")
}
var r0 io.ReadCloser
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (io.ReadCloser, error)); ok {
return rf(ctx, filename)
}
if rf, ok := ret.Get(0).(func(context.Context, string) io.ReadCloser); ok {
r0 = rf(ctx, filename)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(io.ReadCloser)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, filename)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// NewImageProvider creates a new instance of ImageProvider. 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 NewImageProvider(t interface {
mock.TestingT
Cleanup(func())
}) *ImageProvider {
mock := &ImageProvider{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}