Initial QSfera import
This commit is contained in:
@@ -0,0 +1,106 @@
|
||||
// Code generated by mockery; DO NOT EDIT.
|
||||
// github.com/vektra/mockery
|
||||
// template: testify
|
||||
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
|
||||
"github.com/qsfera/server/services/search/pkg/content"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
// NewExtractor creates a new instance of Extractor. 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 NewExtractor(t interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}) *Extractor {
|
||||
mock := &Extractor{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
|
||||
// Extractor is an autogenerated mock type for the Extractor type
|
||||
type Extractor struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
type Extractor_Expecter struct {
|
||||
mock *mock.Mock
|
||||
}
|
||||
|
||||
func (_m *Extractor) EXPECT() *Extractor_Expecter {
|
||||
return &Extractor_Expecter{mock: &_m.Mock}
|
||||
}
|
||||
|
||||
// Extract provides a mock function for the type Extractor
|
||||
func (_mock *Extractor) Extract(ctx context.Context, ri *providerv1beta1.ResourceInfo) (content.Document, error) {
|
||||
ret := _mock.Called(ctx, ri)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Extract")
|
||||
}
|
||||
|
||||
var r0 content.Document
|
||||
var r1 error
|
||||
if returnFunc, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceInfo) (content.Document, error)); ok {
|
||||
return returnFunc(ctx, ri)
|
||||
}
|
||||
if returnFunc, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceInfo) content.Document); ok {
|
||||
r0 = returnFunc(ctx, ri)
|
||||
} else {
|
||||
r0 = ret.Get(0).(content.Document)
|
||||
}
|
||||
if returnFunc, ok := ret.Get(1).(func(context.Context, *providerv1beta1.ResourceInfo) error); ok {
|
||||
r1 = returnFunc(ctx, ri)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// Extractor_Extract_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Extract'
|
||||
type Extractor_Extract_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// Extract is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - ri *providerv1beta1.ResourceInfo
|
||||
func (_e *Extractor_Expecter) Extract(ctx interface{}, ri interface{}) *Extractor_Extract_Call {
|
||||
return &Extractor_Extract_Call{Call: _e.mock.On("Extract", ctx, ri)}
|
||||
}
|
||||
|
||||
func (_c *Extractor_Extract_Call) Run(run func(ctx context.Context, ri *providerv1beta1.ResourceInfo)) *Extractor_Extract_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
var arg0 context.Context
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(context.Context)
|
||||
}
|
||||
var arg1 *providerv1beta1.ResourceInfo
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(*providerv1beta1.ResourceInfo)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *Extractor_Extract_Call) Return(document content.Document, err error) *Extractor_Extract_Call {
|
||||
_c.Call.Return(document, err)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *Extractor_Extract_Call) RunAndReturn(run func(ctx context.Context, ri *providerv1beta1.ResourceInfo) (content.Document, error)) *Extractor_Extract_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
Reference in New Issue
Block a user