mirror of
https://github.com/absmach/magistrala.git
synced 2026-06-23 04:10:28 +00:00
61d0427898
Signed-off-by: dusan <borovcanindusan1@gmail.com>
659 lines
20 KiB
Go
659 lines
20 KiB
Go
// Copyright (c) Abstract Machines
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
// Code generated by mockery; DO NOT EDIT.
|
|
// github.com/vektra/mockery
|
|
// template: testify
|
|
|
|
package mocks
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/absmach/magistrala/journal"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// NewRepository creates a new instance of Repository. 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 NewRepository(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *Repository {
|
|
mock := &Repository{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|
|
|
|
// Repository is an autogenerated mock type for the Repository type
|
|
type Repository struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type Repository_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *Repository) EXPECT() *Repository_Expecter {
|
|
return &Repository_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// AddSubscription provides a mock function for the type Repository
|
|
func (_mock *Repository) AddSubscription(ctx context.Context, sub journal.ClientSubscription) error {
|
|
ret := _mock.Called(ctx, sub)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for AddSubscription")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, journal.ClientSubscription) error); ok {
|
|
r0 = returnFunc(ctx, sub)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Repository_AddSubscription_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddSubscription'
|
|
type Repository_AddSubscription_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// AddSubscription is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - sub journal.ClientSubscription
|
|
func (_e *Repository_Expecter) AddSubscription(ctx interface{}, sub interface{}) *Repository_AddSubscription_Call {
|
|
return &Repository_AddSubscription_Call{Call: _e.mock.On("AddSubscription", ctx, sub)}
|
|
}
|
|
|
|
func (_c *Repository_AddSubscription_Call) Run(run func(ctx context.Context, sub journal.ClientSubscription)) *Repository_AddSubscription_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 journal.ClientSubscription
|
|
if args[1] != nil {
|
|
arg1 = args[1].(journal.ClientSubscription)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_AddSubscription_Call) Return(err error) *Repository_AddSubscription_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_AddSubscription_Call) RunAndReturn(run func(ctx context.Context, sub journal.ClientSubscription) error) *Repository_AddSubscription_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CountSubscriptions provides a mock function for the type Repository
|
|
func (_mock *Repository) CountSubscriptions(ctx context.Context, clientID string) (uint64, error) {
|
|
ret := _mock.Called(ctx, clientID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CountSubscriptions")
|
|
}
|
|
|
|
var r0 uint64
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) (uint64, error)); ok {
|
|
return returnFunc(ctx, clientID)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) uint64); ok {
|
|
r0 = returnFunc(ctx, clientID)
|
|
} else {
|
|
r0 = ret.Get(0).(uint64)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
r1 = returnFunc(ctx, clientID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Repository_CountSubscriptions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CountSubscriptions'
|
|
type Repository_CountSubscriptions_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CountSubscriptions is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - clientID string
|
|
func (_e *Repository_Expecter) CountSubscriptions(ctx interface{}, clientID interface{}) *Repository_CountSubscriptions_Call {
|
|
return &Repository_CountSubscriptions_Call{Call: _e.mock.On("CountSubscriptions", ctx, clientID)}
|
|
}
|
|
|
|
func (_c *Repository_CountSubscriptions_Call) Run(run func(ctx context.Context, clientID string)) *Repository_CountSubscriptions_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_CountSubscriptions_Call) Return(v uint64, err error) *Repository_CountSubscriptions_Call {
|
|
_c.Call.Return(v, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_CountSubscriptions_Call) RunAndReturn(run func(ctx context.Context, clientID string) (uint64, error)) *Repository_CountSubscriptions_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DeleteClientTelemetry provides a mock function for the type Repository
|
|
func (_mock *Repository) DeleteClientTelemetry(ctx context.Context, clientID string, domainID string) error {
|
|
ret := _mock.Called(ctx, clientID, domainID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DeleteClientTelemetry")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
|
|
r0 = returnFunc(ctx, clientID, domainID)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Repository_DeleteClientTelemetry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteClientTelemetry'
|
|
type Repository_DeleteClientTelemetry_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DeleteClientTelemetry is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - clientID string
|
|
// - domainID string
|
|
func (_e *Repository_Expecter) DeleteClientTelemetry(ctx interface{}, clientID interface{}, domainID interface{}) *Repository_DeleteClientTelemetry_Call {
|
|
return &Repository_DeleteClientTelemetry_Call{Call: _e.mock.On("DeleteClientTelemetry", ctx, clientID, domainID)}
|
|
}
|
|
|
|
func (_c *Repository_DeleteClientTelemetry_Call) Run(run func(ctx context.Context, clientID string, domainID string)) *Repository_DeleteClientTelemetry_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
var arg2 string
|
|
if args[2] != nil {
|
|
arg2 = args[2].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_DeleteClientTelemetry_Call) Return(err error) *Repository_DeleteClientTelemetry_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_DeleteClientTelemetry_Call) RunAndReturn(run func(ctx context.Context, clientID string, domainID string) error) *Repository_DeleteClientTelemetry_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// IncrementInboundMessages provides a mock function for the type Repository
|
|
func (_mock *Repository) IncrementInboundMessages(ctx context.Context, ct journal.ClientTelemetry) error {
|
|
ret := _mock.Called(ctx, ct)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for IncrementInboundMessages")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, journal.ClientTelemetry) error); ok {
|
|
r0 = returnFunc(ctx, ct)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Repository_IncrementInboundMessages_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IncrementInboundMessages'
|
|
type Repository_IncrementInboundMessages_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// IncrementInboundMessages is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - ct journal.ClientTelemetry
|
|
func (_e *Repository_Expecter) IncrementInboundMessages(ctx interface{}, ct interface{}) *Repository_IncrementInboundMessages_Call {
|
|
return &Repository_IncrementInboundMessages_Call{Call: _e.mock.On("IncrementInboundMessages", ctx, ct)}
|
|
}
|
|
|
|
func (_c *Repository_IncrementInboundMessages_Call) Run(run func(ctx context.Context, ct journal.ClientTelemetry)) *Repository_IncrementInboundMessages_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 journal.ClientTelemetry
|
|
if args[1] != nil {
|
|
arg1 = args[1].(journal.ClientTelemetry)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_IncrementInboundMessages_Call) Return(err error) *Repository_IncrementInboundMessages_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_IncrementInboundMessages_Call) RunAndReturn(run func(ctx context.Context, ct journal.ClientTelemetry) error) *Repository_IncrementInboundMessages_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// IncrementOutboundMessages provides a mock function for the type Repository
|
|
func (_mock *Repository) IncrementOutboundMessages(ctx context.Context, channelID string, subtopic string) error {
|
|
ret := _mock.Called(ctx, channelID, subtopic)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for IncrementOutboundMessages")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
|
|
r0 = returnFunc(ctx, channelID, subtopic)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Repository_IncrementOutboundMessages_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IncrementOutboundMessages'
|
|
type Repository_IncrementOutboundMessages_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// IncrementOutboundMessages is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - channelID string
|
|
// - subtopic string
|
|
func (_e *Repository_Expecter) IncrementOutboundMessages(ctx interface{}, channelID interface{}, subtopic interface{}) *Repository_IncrementOutboundMessages_Call {
|
|
return &Repository_IncrementOutboundMessages_Call{Call: _e.mock.On("IncrementOutboundMessages", ctx, channelID, subtopic)}
|
|
}
|
|
|
|
func (_c *Repository_IncrementOutboundMessages_Call) Run(run func(ctx context.Context, channelID string, subtopic string)) *Repository_IncrementOutboundMessages_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
var arg2 string
|
|
if args[2] != nil {
|
|
arg2 = args[2].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_IncrementOutboundMessages_Call) Return(err error) *Repository_IncrementOutboundMessages_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_IncrementOutboundMessages_Call) RunAndReturn(run func(ctx context.Context, channelID string, subtopic string) error) *Repository_IncrementOutboundMessages_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// RemoveSubscription provides a mock function for the type Repository
|
|
func (_mock *Repository) RemoveSubscription(ctx context.Context, subscriberID string) error {
|
|
ret := _mock.Called(ctx, subscriberID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for RemoveSubscription")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
|
r0 = returnFunc(ctx, subscriberID)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Repository_RemoveSubscription_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveSubscription'
|
|
type Repository_RemoveSubscription_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// RemoveSubscription is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - subscriberID string
|
|
func (_e *Repository_Expecter) RemoveSubscription(ctx interface{}, subscriberID interface{}) *Repository_RemoveSubscription_Call {
|
|
return &Repository_RemoveSubscription_Call{Call: _e.mock.On("RemoveSubscription", ctx, subscriberID)}
|
|
}
|
|
|
|
func (_c *Repository_RemoveSubscription_Call) Run(run func(ctx context.Context, subscriberID string)) *Repository_RemoveSubscription_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_RemoveSubscription_Call) Return(err error) *Repository_RemoveSubscription_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_RemoveSubscription_Call) RunAndReturn(run func(ctx context.Context, subscriberID string) error) *Repository_RemoveSubscription_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// RetrieveAll provides a mock function for the type Repository
|
|
func (_mock *Repository) RetrieveAll(ctx context.Context, page journal.Page) (journal.JournalsPage, error) {
|
|
ret := _mock.Called(ctx, page)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for RetrieveAll")
|
|
}
|
|
|
|
var r0 journal.JournalsPage
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, journal.Page) (journal.JournalsPage, error)); ok {
|
|
return returnFunc(ctx, page)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, journal.Page) journal.JournalsPage); ok {
|
|
r0 = returnFunc(ctx, page)
|
|
} else {
|
|
r0 = ret.Get(0).(journal.JournalsPage)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, journal.Page) error); ok {
|
|
r1 = returnFunc(ctx, page)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Repository_RetrieveAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RetrieveAll'
|
|
type Repository_RetrieveAll_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// RetrieveAll is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - page journal.Page
|
|
func (_e *Repository_Expecter) RetrieveAll(ctx interface{}, page interface{}) *Repository_RetrieveAll_Call {
|
|
return &Repository_RetrieveAll_Call{Call: _e.mock.On("RetrieveAll", ctx, page)}
|
|
}
|
|
|
|
func (_c *Repository_RetrieveAll_Call) Run(run func(ctx context.Context, page journal.Page)) *Repository_RetrieveAll_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 journal.Page
|
|
if args[1] != nil {
|
|
arg1 = args[1].(journal.Page)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_RetrieveAll_Call) Return(journalsPage journal.JournalsPage, err error) *Repository_RetrieveAll_Call {
|
|
_c.Call.Return(journalsPage, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_RetrieveAll_Call) RunAndReturn(run func(ctx context.Context, page journal.Page) (journal.JournalsPage, error)) *Repository_RetrieveAll_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// RetrieveClientTelemetry provides a mock function for the type Repository
|
|
func (_mock *Repository) RetrieveClientTelemetry(ctx context.Context, clientID string, domainID string) (journal.ClientTelemetry, error) {
|
|
ret := _mock.Called(ctx, clientID, domainID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for RetrieveClientTelemetry")
|
|
}
|
|
|
|
var r0 journal.ClientTelemetry
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (journal.ClientTelemetry, error)); ok {
|
|
return returnFunc(ctx, clientID, domainID)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) journal.ClientTelemetry); ok {
|
|
r0 = returnFunc(ctx, clientID, domainID)
|
|
} else {
|
|
r0 = ret.Get(0).(journal.ClientTelemetry)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
|
|
r1 = returnFunc(ctx, clientID, domainID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Repository_RetrieveClientTelemetry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RetrieveClientTelemetry'
|
|
type Repository_RetrieveClientTelemetry_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// RetrieveClientTelemetry is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - clientID string
|
|
// - domainID string
|
|
func (_e *Repository_Expecter) RetrieveClientTelemetry(ctx interface{}, clientID interface{}, domainID interface{}) *Repository_RetrieveClientTelemetry_Call {
|
|
return &Repository_RetrieveClientTelemetry_Call{Call: _e.mock.On("RetrieveClientTelemetry", ctx, clientID, domainID)}
|
|
}
|
|
|
|
func (_c *Repository_RetrieveClientTelemetry_Call) Run(run func(ctx context.Context, clientID string, domainID string)) *Repository_RetrieveClientTelemetry_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
var arg2 string
|
|
if args[2] != nil {
|
|
arg2 = args[2].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_RetrieveClientTelemetry_Call) Return(clientTelemetry journal.ClientTelemetry, err error) *Repository_RetrieveClientTelemetry_Call {
|
|
_c.Call.Return(clientTelemetry, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_RetrieveClientTelemetry_Call) RunAndReturn(run func(ctx context.Context, clientID string, domainID string) (journal.ClientTelemetry, error)) *Repository_RetrieveClientTelemetry_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Save provides a mock function for the type Repository
|
|
func (_mock *Repository) Save(ctx context.Context, journal1 journal.Journal) error {
|
|
ret := _mock.Called(ctx, journal1)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Save")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, journal.Journal) error); ok {
|
|
r0 = returnFunc(ctx, journal1)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Repository_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save'
|
|
type Repository_Save_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Save is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - journal1 journal.Journal
|
|
func (_e *Repository_Expecter) Save(ctx interface{}, journal1 interface{}) *Repository_Save_Call {
|
|
return &Repository_Save_Call{Call: _e.mock.On("Save", ctx, journal1)}
|
|
}
|
|
|
|
func (_c *Repository_Save_Call) Run(run func(ctx context.Context, journal1 journal.Journal)) *Repository_Save_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 journal.Journal
|
|
if args[1] != nil {
|
|
arg1 = args[1].(journal.Journal)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_Save_Call) Return(err error) *Repository_Save_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_Save_Call) RunAndReturn(run func(ctx context.Context, journal1 journal.Journal) error) *Repository_Save_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SaveClientTelemetry provides a mock function for the type Repository
|
|
func (_mock *Repository) SaveClientTelemetry(ctx context.Context, ct journal.ClientTelemetry) error {
|
|
ret := _mock.Called(ctx, ct)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SaveClientTelemetry")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, journal.ClientTelemetry) error); ok {
|
|
r0 = returnFunc(ctx, ct)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Repository_SaveClientTelemetry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveClientTelemetry'
|
|
type Repository_SaveClientTelemetry_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SaveClientTelemetry is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - ct journal.ClientTelemetry
|
|
func (_e *Repository_Expecter) SaveClientTelemetry(ctx interface{}, ct interface{}) *Repository_SaveClientTelemetry_Call {
|
|
return &Repository_SaveClientTelemetry_Call{Call: _e.mock.On("SaveClientTelemetry", ctx, ct)}
|
|
}
|
|
|
|
func (_c *Repository_SaveClientTelemetry_Call) Run(run func(ctx context.Context, ct journal.ClientTelemetry)) *Repository_SaveClientTelemetry_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 journal.ClientTelemetry
|
|
if args[1] != nil {
|
|
arg1 = args[1].(journal.ClientTelemetry)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_SaveClientTelemetry_Call) Return(err error) *Repository_SaveClientTelemetry_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_SaveClientTelemetry_Call) RunAndReturn(run func(ctx context.Context, ct journal.ClientTelemetry) error) *Repository_SaveClientTelemetry_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|