Debian Codegraph @

pkg/types/mocks/ContextAttachmentSender.go

raw symbols SCIP
1 // Code generated by mockery; DO NOT EDIT.
2 // github.com/vektra/mockery
3 // template: testify
4
5 package mocks
6
7 import (
8 "context"
9
10 "github.com/nicholas-fedor/shoutrrr/pkg/types"
11 mock "github.com/stretchr/testify/mock"
12 )
13
14 // NewMockContextAttachmentSender creates a new instance of MockContextAttachmentSender. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15 // The first argument is typically a *testing.T value.
16 func NewMockContextAttachmentSender(t interface {
17 mock.TestingT
18 Cleanup(func())
19 }) *MockContextAttachmentSender {
20 mock := &MockContextAttachmentSender{}
21 mock.Mock.Test(t)
22
23 t.Cleanup(func() { mock.AssertExpectations(t) })
24
25 return mock
26 }
27
28 // MockContextAttachmentSender is an autogenerated mock type for the ContextAttachmentSender type
29 type MockContextAttachmentSender struct {
30 mock.Mock
31 }
32
33 type MockContextAttachmentSender_Expecter struct {
34 mock *mock.Mock
35 }
36
37 func (_m *MockContextAttachmentSender) EXPECT() *MockContextAttachmentSender_Expecter {
38 return &MockContextAttachmentSender_Expecter{mock: &_m.Mock}
39 }
40
41 // SendItemsContext provides a mock function for the type MockContextAttachmentSender
42 func (_mock *MockContextAttachmentSender) SendItemsContext(ctx context.Context, items []types.MessageItem, params types.Params) error {
43 ret := _mock.Called(ctx, items, params)
44
45 if len(ret) == 0 {
46 panic("no return value specified for SendItemsContext")
47 }
48
49 var r0 error
50 if returnFunc, ok := ret.Get(0).(func(context.Context, []types.MessageItem, types.Params) error); ok {
51 r0 = returnFunc(ctx, items, params)
52 } else {
53 r0 = ret.Error(0)
54 }
55 return r0
56 }
57
58 // MockContextAttachmentSender_SendItemsContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendItemsContext'
59 type MockContextAttachmentSender_SendItemsContext_Call struct {
60 *mock.Call
61 }
62
63 // SendItemsContext is a helper method to define mock.On call
64 // - ctx context.Context
65 // - items []types.MessageItem
66 // - params types.Params
67 func (_e *MockContextAttachmentSender_Expecter) SendItemsContext(ctx any, items any, params any) *MockContextAttachmentSender_SendItemsContext_Call {
68 return &MockContextAttachmentSender_SendItemsContext_Call{Call: _e.mock.On("SendItemsContext", ctx, items, params)}
69 }
70
71 func (_c *MockContextAttachmentSender_SendItemsContext_Call) Run(run func(ctx context.Context, items []types.MessageItem, params types.Params)) *MockContextAttachmentSender_SendItemsContext_Call {
72 _c.Call.Run(func(args mock.Arguments) {
73 var arg0 context.Context
74 if args[0] != nil {
75 arg0 = args[0].(context.Context)
76 }
77 var arg1 []types.MessageItem
78 if args[1] != nil {
79 arg1 = args[1].([]types.MessageItem)
80 }
81 var arg2 types.Params
82 if args[2] != nil {
83 arg2 = args[2].(types.Params)
84 }
85 run(
86 arg0,
87 arg1,
88 arg2,
89 )
90 })
91 return _c
92 }
93
94 func (_c *MockContextAttachmentSender_SendItemsContext_Call) Return(err error) *MockContextAttachmentSender_SendItemsContext_Call {
95 _c.Call.Return(err)
96 return _c
97 }
98
99 func (_c *MockContextAttachmentSender_SendItemsContext_Call) RunAndReturn(run func(ctx context.Context, items []types.MessageItem, params types.Params) error) *MockContextAttachmentSender_SendItemsContext_Call {
100 _c.Call.Return(run)
101 return _c
102 }