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