Files
Dušan Borovčanin 61d0427898 NOISSUE - Rename to Magistrala (#3427)
Signed-off-by: dusan <borovcanindusan1@gmail.com>
2026-04-06 15:23:42 +02:00

101 lines
2.5 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/notifications"
mock "github.com/stretchr/testify/mock"
)
// NewNotifier creates a new instance of Notifier. 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 NewNotifier(t interface {
mock.TestingT
Cleanup(func())
}) *Notifier {
mock := &Notifier{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}
// Notifier is an autogenerated mock type for the Notifier type
type Notifier struct {
mock.Mock
}
type Notifier_Expecter struct {
mock *mock.Mock
}
func (_m *Notifier) EXPECT() *Notifier_Expecter {
return &Notifier_Expecter{mock: &_m.Mock}
}
// Notify provides a mock function for the type Notifier
func (_mock *Notifier) Notify(ctx context.Context, n notifications.Notification) error {
ret := _mock.Called(ctx, n)
if len(ret) == 0 {
panic("no return value specified for Notify")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(context.Context, notifications.Notification) error); ok {
r0 = returnFunc(ctx, n)
} else {
r0 = ret.Error(0)
}
return r0
}
// Notifier_Notify_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Notify'
type Notifier_Notify_Call struct {
*mock.Call
}
// Notify is a helper method to define mock.On call
// - ctx context.Context
// - n notifications.Notification
func (_e *Notifier_Expecter) Notify(ctx interface{}, n interface{}) *Notifier_Notify_Call {
return &Notifier_Notify_Call{Call: _e.mock.On("Notify", ctx, n)}
}
func (_c *Notifier_Notify_Call) Run(run func(ctx context.Context, n notifications.Notification)) *Notifier_Notify_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 notifications.Notification
if args[1] != nil {
arg1 = args[1].(notifications.Notification)
}
run(
arg0,
arg1,
)
})
return _c
}
func (_c *Notifier_Notify_Call) Return(err error) *Notifier_Notify_Call {
_c.Call.Return(err)
return _c
}
func (_c *Notifier_Notify_Call) RunAndReturn(run func(ctx context.Context, n notifications.Notification) error) *Notifier_Notify_Call {
_c.Call.Return(run)
return _c
}