mirror of
https://github.com/owncloud/ocis.git
synced 2025-04-18 23:44:07 +03:00
98 lines
2.6 KiB
Go
98 lines
2.6 KiB
Go
// Code generated by mockery v2.52.3. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
mock "github.com/stretchr/testify/mock"
|
|
events "go-micro.dev/v4/events"
|
|
)
|
|
|
|
// 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 with given fields: _a0, _a1, _a2
|
|
func (_m *Publisher) Publish(_a0 string, _a1 interface{}, _a2 ...events.PublishOption) error {
|
|
_va := make([]interface{}, len(_a2))
|
|
for _i := range _a2 {
|
|
_va[_i] = _a2[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, _a0, _a1)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Publish")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, interface{}, ...events.PublishOption) error); ok {
|
|
r0 = rf(_a0, _a1, _a2...)
|
|
} 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
|
|
// - _a0 string
|
|
// - _a1 interface{}
|
|
// - _a2 ...events.PublishOption
|
|
func (_e *Publisher_Expecter) Publish(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *Publisher_Publish_Call {
|
|
return &Publisher_Publish_Call{Call: _e.mock.On("Publish",
|
|
append([]interface{}{_a0, _a1}, _a2...)...)}
|
|
}
|
|
|
|
func (_c *Publisher_Publish_Call) Run(run func(_a0 string, _a1 interface{}, _a2 ...events.PublishOption)) *Publisher_Publish_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]events.PublishOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(events.PublishOption)
|
|
}
|
|
}
|
|
run(args[0].(string), args[1].(interface{}), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Publisher_Publish_Call) Return(_a0 error) *Publisher_Publish_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Publisher_Publish_Call) RunAndReturn(run func(string, interface{}, ...events.PublishOption) error) *Publisher_Publish_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// 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
|
|
}
|