mirror of
https://github.com/absmach/magistrala.git
synced 2026-06-23 04:10:28 +00:00
c5eee6d8fd
Signed-off-by: dusan <borovcanindusan1@gmail.com>
167 lines
4.4 KiB
Go
167 lines
4.4 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 (
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// NewEmailer creates a new instance of Emailer. 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 NewEmailer(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *Emailer {
|
|
mock := &Emailer{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|
|
|
|
// Emailer is an autogenerated mock type for the Emailer type
|
|
type Emailer struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type Emailer_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *Emailer) EXPECT() *Emailer_Expecter {
|
|
return &Emailer_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// SendPasswordReset provides a mock function for the type Emailer
|
|
func (_mock *Emailer) SendPasswordReset(To []string, user string, token string) error {
|
|
ret := _mock.Called(To, user, token)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SendPasswordReset")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func([]string, string, string) error); ok {
|
|
r0 = returnFunc(To, user, token)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Emailer_SendPasswordReset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendPasswordReset'
|
|
type Emailer_SendPasswordReset_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SendPasswordReset is a helper method to define mock.On call
|
|
// - To []string
|
|
// - user string
|
|
// - token string
|
|
func (_e *Emailer_Expecter) SendPasswordReset(To interface{}, user interface{}, token interface{}) *Emailer_SendPasswordReset_Call {
|
|
return &Emailer_SendPasswordReset_Call{Call: _e.mock.On("SendPasswordReset", To, user, token)}
|
|
}
|
|
|
|
func (_c *Emailer_SendPasswordReset_Call) Run(run func(To []string, user string, token string)) *Emailer_SendPasswordReset_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 []string
|
|
if args[0] != nil {
|
|
arg0 = args[0].([]string)
|
|
}
|
|
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 *Emailer_SendPasswordReset_Call) Return(err error) *Emailer_SendPasswordReset_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Emailer_SendPasswordReset_Call) RunAndReturn(run func(To []string, user string, token string) error) *Emailer_SendPasswordReset_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SendVerification provides a mock function for the type Emailer
|
|
func (_mock *Emailer) SendVerification(To []string, user string, verificationToken string) error {
|
|
ret := _mock.Called(To, user, verificationToken)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SendVerification")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func([]string, string, string) error); ok {
|
|
r0 = returnFunc(To, user, verificationToken)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Emailer_SendVerification_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendVerification'
|
|
type Emailer_SendVerification_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SendVerification is a helper method to define mock.On call
|
|
// - To []string
|
|
// - user string
|
|
// - verificationToken string
|
|
func (_e *Emailer_Expecter) SendVerification(To interface{}, user interface{}, verificationToken interface{}) *Emailer_SendVerification_Call {
|
|
return &Emailer_SendVerification_Call{Call: _e.mock.On("SendVerification", To, user, verificationToken)}
|
|
}
|
|
|
|
func (_c *Emailer_SendVerification_Call) Run(run func(To []string, user string, verificationToken string)) *Emailer_SendVerification_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 []string
|
|
if args[0] != nil {
|
|
arg0 = args[0].([]string)
|
|
}
|
|
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 *Emailer_SendVerification_Call) Return(err error) *Emailer_SendVerification_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Emailer_SendVerification_Call) RunAndReturn(run func(To []string, user string, verificationToken string) error) *Emailer_SendVerification_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|