| 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 | mock "github.com/stretchr/testify/mock" |
| 11 | ) |
| 12 | |
| 13 | // NewMockClient creates a new instance of MockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. |
| 14 | // The first argument is typically a *testing.T value. |
| 15 | func NewMockClient(t interface { |
| 16 | mock.TestingT |
| 17 | Cleanup(func()) |
| 18 | }) *MockClient { |
| 19 | mock := &MockClient{} |
| 20 | mock.Mock.Test(t) |
| 21 | |
| 22 | t.Cleanup(func() { mock.AssertExpectations(t) }) |
| 23 | |
| 24 | return mock |
| 25 | } |
| 26 | |
| 27 | // MockClient is an autogenerated mock type for the Client type |
| 28 | type MockClient struct { |
| 29 | mock.Mock |
| 30 | } |
| 31 | |
| 32 | type MockClient_Expecter struct { |
| 33 | mock *mock.Mock |
| 34 | } |
| 35 | |
| 36 | func (_m *MockClient) EXPECT() *MockClient_Expecter { |
| 37 | return &MockClient_Expecter{mock: &_m.Mock} |
| 38 | } |
| 39 | |
| 40 | // ErrorResponse provides a mock function for the type MockClient |
| 41 | func (_mock *MockClient) ErrorResponse(err error, response any) bool { |
| 42 | ret := _mock.Called(err, response) |
| 43 | |
| 44 | if len(ret) == 0 { |
| 45 | panic("no return value specified for ErrorResponse") |
| 46 | } |
| 47 | |
| 48 | var r0 bool |
| 49 | if returnFunc, ok := ret.Get(0).(func(error, any) bool); ok { |
| 50 | r0 = returnFunc(err, response) |
| 51 | } else { |
| 52 | r0 = ret.Get(0).(bool) |
| 53 | } |
| 54 | return r0 |
| 55 | } |
| 56 | |
| 57 | // MockClient_ErrorResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ErrorResponse' |
| 58 | type MockClient_ErrorResponse_Call struct { |
| 59 | *mock.Call |
| 60 | } |
| 61 | |
| 62 | // ErrorResponse is a helper method to define mock.On call |
| 63 | // - err error |
| 64 | // - response any |
| 65 | func (_e *MockClient_Expecter) ErrorResponse(err any, response any) *MockClient_ErrorResponse_Call { |
| 66 | return &MockClient_ErrorResponse_Call{Call: _e.mock.On("ErrorResponse", err, response)} |
| 67 | } |
| 68 | |
| 69 | func (_c *MockClient_ErrorResponse_Call) Run(run func(err error, response any)) *MockClient_ErrorResponse_Call { |
| 70 | _c.Call.Run(func(args mock.Arguments) { |
| 71 | var arg0 error |
| 72 | if args[0] != nil { |
| 73 | arg0 = args[0].(error) |
| 74 | } |
| 75 | var arg1 any |
| 76 | if args[1] != nil { |
| 77 | arg1 = args[1].(any) |
| 78 | } |
| 79 | run( |
| 80 | arg0, |
| 81 | arg1, |
| 82 | ) |
| 83 | }) |
| 84 | return _c |
| 85 | } |
| 86 | |
| 87 | func (_c *MockClient_ErrorResponse_Call) Return(b bool) *MockClient_ErrorResponse_Call { |
| 88 | _c.Call.Return(b) |
| 89 | return _c |
| 90 | } |
| 91 | |
| 92 | func (_c *MockClient_ErrorResponse_Call) RunAndReturn(run func(err error, response any) bool) *MockClient_ErrorResponse_Call { |
| 93 | _c.Call.Return(run) |
| 94 | return _c |
| 95 | } |
| 96 | |
| 97 | // Get provides a mock function for the type MockClient |
| 98 | func (_mock *MockClient) Get(url string, response any) error { |
| 99 | ret := _mock.Called(url, response) |
| 100 | |
| 101 | if len(ret) == 0 { |
| 102 | panic("no return value specified for Get") |
| 103 | } |
| 104 | |
| 105 | var r0 error |
| 106 | if returnFunc, ok := ret.Get(0).(func(string, any) error); ok { |
| 107 | r0 = returnFunc(url, response) |
| 108 | } else { |
| 109 | r0 = ret.Error(0) |
| 110 | } |
| 111 | return r0 |
| 112 | } |
| 113 | |
| 114 | // MockClient_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' |
| 115 | type MockClient_Get_Call struct { |
| 116 | *mock.Call |
| 117 | } |
| 118 | |
| 119 | // Get is a helper method to define mock.On call |
| 120 | // - url string |
| 121 | // - response any |
| 122 | func (_e *MockClient_Expecter) Get(url any, response any) *MockClient_Get_Call { |
| 123 | return &MockClient_Get_Call{Call: _e.mock.On("Get", url, response)} |
| 124 | } |
| 125 | |
| 126 | func (_c *MockClient_Get_Call) Run(run func(url string, response any)) *MockClient_Get_Call { |
| 127 | _c.Call.Run(func(args mock.Arguments) { |
| 128 | var arg0 string |
| 129 | if args[0] != nil { |
| 130 | arg0 = args[0].(string) |
| 131 | } |
| 132 | var arg1 any |
| 133 | if args[1] != nil { |
| 134 | arg1 = args[1].(any) |
| 135 | } |
| 136 | run( |
| 137 | arg0, |
| 138 | arg1, |
| 139 | ) |
| 140 | }) |
| 141 | return _c |
| 142 | } |
| 143 | |
| 144 | func (_c *MockClient_Get_Call) Return(err error) *MockClient_Get_Call { |
| 145 | _c.Call.Return(err) |
| 146 | return _c |
| 147 | } |
| 148 | |
| 149 | func (_c *MockClient_Get_Call) RunAndReturn(run func(url string, response any) error) *MockClient_Get_Call { |
| 150 | _c.Call.Return(run) |
| 151 | return _c |
| 152 | } |
| 153 | |
| 154 | // Headers provides a mock function for the type MockClient |
| 155 | func (_mock *MockClient) Headers() http.Header { |
| 156 | ret := _mock.Called() |
| 157 | |
| 158 | if len(ret) == 0 { |
| 159 | panic("no return value specified for Headers") |
| 160 | } |
| 161 | |
| 162 | var r0 http.Header |
| 163 | if returnFunc, ok := ret.Get(0).(func() http.Header); ok { |
| 164 | r0 = returnFunc() |
| 165 | } else { |
| 166 | if ret.Get(0) != nil { |
| 167 | r0 = ret.Get(0).(http.Header) |
| 168 | } |
| 169 | } |
| 170 | return r0 |
| 171 | } |
| 172 | |
| 173 | // MockClient_Headers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Headers' |
| 174 | type MockClient_Headers_Call struct { |
| 175 | *mock.Call |
| 176 | } |
| 177 | |
| 178 | // Headers is a helper method to define mock.On call |
| 179 | func (_e *MockClient_Expecter) Headers() *MockClient_Headers_Call { |
| 180 | return &MockClient_Headers_Call{Call: _e.mock.On("Headers")} |
| 181 | } |
| 182 | |
| 183 | func (_c *MockClient_Headers_Call) Run(run func()) *MockClient_Headers_Call { |
| 184 | _c.Call.Run(func(args mock.Arguments) { |
| 185 | run() |
| 186 | }) |
| 187 | return _c |
| 188 | } |
| 189 | |
| 190 | func (_c *MockClient_Headers_Call) Return(header http.Header) *MockClient_Headers_Call { |
| 191 | _c.Call.Return(header) |
| 192 | return _c |
| 193 | } |
| 194 | |
| 195 | func (_c *MockClient_Headers_Call) RunAndReturn(run func() http.Header) *MockClient_Headers_Call { |
| 196 | _c.Call.Return(run) |
| 197 | return _c |
| 198 | } |
| 199 | |
| 200 | // Post provides a mock function for the type MockClient |
| 201 | func (_mock *MockClient) Post(url string, request any, response any) error { |
| 202 | ret := _mock.Called(url, request, response) |
| 203 | |
| 204 | if len(ret) == 0 { |
| 205 | panic("no return value specified for Post") |
| 206 | } |
| 207 | |
| 208 | var r0 error |
| 209 | if returnFunc, ok := ret.Get(0).(func(string, any, any) error); ok { |
| 210 | r0 = returnFunc(url, request, response) |
| 211 | } else { |
| 212 | r0 = ret.Error(0) |
| 213 | } |
| 214 | return r0 |
| 215 | } |
| 216 | |
| 217 | // MockClient_Post_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Post' |
| 218 | type MockClient_Post_Call struct { |
| 219 | *mock.Call |
| 220 | } |
| 221 | |
| 222 | // Post is a helper method to define mock.On call |
| 223 | // - url string |
| 224 | // - request any |
| 225 | // - response any |
| 226 | func (_e *MockClient_Expecter) Post(url any, request any, response any) *MockClient_Post_Call { |
| 227 | return &MockClient_Post_Call{Call: _e.mock.On("Post", url, request, response)} |
| 228 | } |
| 229 | |
| 230 | func (_c *MockClient_Post_Call) Run(run func(url string, request any, response any)) *MockClient_Post_Call { |
| 231 | _c.Call.Run(func(args mock.Arguments) { |
| 232 | var arg0 string |
| 233 | if args[0] != nil { |
| 234 | arg0 = args[0].(string) |
| 235 | } |
| 236 | var arg1 any |
| 237 | if args[1] != nil { |
| 238 | arg1 = args[1].(any) |
| 239 | } |
| 240 | var arg2 any |
| 241 | if args[2] != nil { |
| 242 | arg2 = args[2].(any) |
| 243 | } |
| 244 | run( |
| 245 | arg0, |
| 246 | arg1, |
| 247 | arg2, |
| 248 | ) |
| 249 | }) |
| 250 | return _c |
| 251 | } |
| 252 | |
| 253 | func (_c *MockClient_Post_Call) Return(err error) *MockClient_Post_Call { |
| 254 | _c.Call.Return(err) |
| 255 | return _c |
| 256 | } |
| 257 | |
| 258 | func (_c *MockClient_Post_Call) RunAndReturn(run func(url string, request any, response any) error) *MockClient_Post_Call { |
| 259 | _c.Call.Return(run) |
| 260 | return _c |
| 261 | } |