mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-06 20:32:06 -05:00
Maintaining the positioning of the files from v2 to reduce cognitive
load.
Indentation of yaml files now matches `.editorconfig`.
All mock files regenerated.
Added empty `{}` following convention from `mockery init` etc.
Removed directory specification where it would already match.
110 lines
2.9 KiB
Go
110 lines
2.9 KiB
Go
// Code generated by mockery; DO NOT EDIT.
|
|
// github.com/vektra/mockery
|
|
// template: testify
|
|
|
|
package mocks
|
|
|
|
import (
|
|
mock "github.com/stretchr/testify/mock"
|
|
"go-micro.dev/v4/events"
|
|
)
|
|
|
|
// NewPublisher creates a new instance of Publisher. 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 NewPublisher(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *Publisher {
|
|
mock := &Publisher{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|
|
|
|
// Publisher is an autogenerated mock type for the Publisher type
|
|
type Publisher struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type Publisher_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *Publisher) EXPECT() *Publisher_Expecter {
|
|
return &Publisher_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// Publish provides a mock function for the type Publisher
|
|
func (_mock *Publisher) Publish(s string, ifaceVal interface{}, publishOptions ...events.PublishOption) error {
|
|
var tmpRet mock.Arguments
|
|
if len(publishOptions) > 0 {
|
|
tmpRet = _mock.Called(s, ifaceVal, publishOptions)
|
|
} else {
|
|
tmpRet = _mock.Called(s, ifaceVal)
|
|
}
|
|
ret := tmpRet
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Publish")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(string, interface{}, ...events.PublishOption) error); ok {
|
|
r0 = returnFunc(s, ifaceVal, publishOptions...)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Publisher_Publish_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Publish'
|
|
type Publisher_Publish_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Publish is a helper method to define mock.On call
|
|
// - s string
|
|
// - ifaceVal interface{}
|
|
// - publishOptions ...events.PublishOption
|
|
func (_e *Publisher_Expecter) Publish(s interface{}, ifaceVal interface{}, publishOptions ...interface{}) *Publisher_Publish_Call {
|
|
return &Publisher_Publish_Call{Call: _e.mock.On("Publish",
|
|
append([]interface{}{s, ifaceVal}, publishOptions...)...)}
|
|
}
|
|
|
|
func (_c *Publisher_Publish_Call) Run(run func(s string, ifaceVal interface{}, publishOptions ...events.PublishOption)) *Publisher_Publish_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 string
|
|
if args[0] != nil {
|
|
arg0 = args[0].(string)
|
|
}
|
|
var arg1 interface{}
|
|
if args[1] != nil {
|
|
arg1 = args[1].(interface{})
|
|
}
|
|
var arg2 []events.PublishOption
|
|
var variadicArgs []events.PublishOption
|
|
if len(args) > 2 {
|
|
variadicArgs = args[2].([]events.PublishOption)
|
|
}
|
|
arg2 = variadicArgs
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2...,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Publisher_Publish_Call) Return(err error) *Publisher_Publish_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Publisher_Publish_Call) RunAndReturn(run func(s string, ifaceVal interface{}, publishOptions ...events.PublishOption) error) *Publisher_Publish_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|