Debian Codegraph @

pkg/services/push/gotify/mocks/HTTPClientManager.go

raw
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 mock "github.com/stretchr/testify/mock"
12 )
13
14 // NewMockHTTPClientManager creates a new instance of MockHTTPClientManager. 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 NewMockHTTPClientManager(t interface {
17 mock.TestingT
18 Cleanup(func())
19 }) *MockHTTPClientManager {
20 mock := &MockHTTPClientManager{}
21 mock.Mock.Test(t)
22
23 t.Cleanup(func() { mock.AssertExpectations(t) })
24
25 return mock
26 }
27
28 // MockHTTPClientManager is an autogenerated mock type for the HTTPClientManager type
29 type MockHTTPClientManager struct {
30 mock.Mock
31 }
32
33 type MockHTTPClientManager_Expecter struct {
34 mock *mock.Mock
35 }
36
37 func (_m *MockHTTPClientManager) EXPECT() *MockHTTPClientManager_Expecter {
38 return &MockHTTPClientManager_Expecter{mock: &_m.Mock}
39 }
40
41 // CreateClient provides a mock function for the type MockHTTPClientManager
42 func (_mock *MockHTTPClientManager) CreateClient(transport *http.Transport) *http.Client {
43 ret := _mock.Called(transport)
44
45 if len(ret) == 0 {
46 panic("no return value specified for CreateClient")
47 }
48
49 var r0 *http.Client
50 if returnFunc, ok := ret.Get(0).(func(*http.Transport) *http.Client); ok {
51 r0 = returnFunc(transport)
52 } else {
53 if ret.Get(0) != nil {
54 r0 = ret.Get(0).(*http.Client)
55 }
56 }
57 return r0
58 }
59
60 // MockHTTPClientManager_CreateClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateClient'
61 type MockHTTPClientManager_CreateClient_Call struct {
62 *mock.Call
63 }
64
65 // CreateClient is a helper method to define mock.On call
66 // - transport *http.Transport
67 func (_e *MockHTTPClientManager_Expecter) CreateClient(transport interface{}) *MockHTTPClientManager_CreateClient_Call {
68 return &MockHTTPClientManager_CreateClient_Call{Call: _e.mock.On("CreateClient", transport)}
69 }
70
71 func (_c *MockHTTPClientManager_CreateClient_Call) Run(run func(transport *http.Transport)) *MockHTTPClientManager_CreateClient_Call {
72 _c.Call.Run(func(args mock.Arguments) {
73 var arg0 *http.Transport
74 if args[0] != nil {
75 arg0 = args[0].(*http.Transport)
76 }
77 run(
78 arg0,
79 )
80 })
81 return _c
82 }
83
84 func (_c *MockHTTPClientManager_CreateClient_Call) Return(client *http.Client) *MockHTTPClientManager_CreateClient_Call {
85 _c.Call.Return(client)
86 return _c
87 }
88
89 func (_c *MockHTTPClientManager_CreateClient_Call) RunAndReturn(run func(transport *http.Transport) *http.Client) *MockHTTPClientManager_CreateClient_Call {
90 _c.Call.Return(run)
91 return _c
92 }
93
94 // CreateTransport provides a mock function for the type MockHTTPClientManager
95 func (_mock *MockHTTPClientManager) CreateTransport(config *gotify.Config) *http.Transport {
96 ret := _mock.Called(config)
97
98 if len(ret) == 0 {
99 panic("no return value specified for CreateTransport")
100 }
101
102 var r0 *http.Transport
103 if returnFunc, ok := ret.Get(0).(func(*gotify.Config) *http.Transport); ok {
104 r0 = returnFunc(config)
105 } else {
106 if ret.Get(0) != nil {
107 r0 = ret.Get(0).(*http.Transport)
108 }
109 }
110 return r0
111 }
112
113 // MockHTTPClientManager_CreateTransport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTransport'
114 type MockHTTPClientManager_CreateTransport_Call struct {
115 *mock.Call
116 }
117
118 // CreateTransport is a helper method to define mock.On call
119 // - config *gotify.Config
120 func (_e *MockHTTPClientManager_Expecter) CreateTransport(config interface{}) *MockHTTPClientManager_CreateTransport_Call {
121 return &MockHTTPClientManager_CreateTransport_Call{Call: _e.mock.On("CreateTransport", config)}
122 }
123
124 func (_c *MockHTTPClientManager_CreateTransport_Call) Run(run func(config *gotify.Config)) *MockHTTPClientManager_CreateTransport_Call {
125 _c.Call.Run(func(args mock.Arguments) {
126 var arg0 *gotify.Config
127 if args[0] != nil {
128 arg0 = args[0].(*gotify.Config)
129 }
130 run(
131 arg0,
132 )
133 })
134 return _c
135 }
136
137 func (_c *MockHTTPClientManager_CreateTransport_Call) Return(transport *http.Transport) *MockHTTPClientManager_CreateTransport_Call {
138 _c.Call.Return(transport)
139 return _c
140 }
141
142 func (_c *MockHTTPClientManager_CreateTransport_Call) RunAndReturn(run func(config *gotify.Config) *http.Transport) *MockHTTPClientManager_CreateTransport_Call {
143 _c.Call.Return(run)
144 return _c
145 }