| // Code generated by mockery v0.0.0-dev. DO NOT EDIT. |
| |
| package mocks |
| |
| import ( |
| context "context" |
| http "net/http" |
| |
| io "io" |
| |
| mock "github.com/stretchr/testify/mock" |
| ) |
| |
| // HTTPClient is an autogenerated mock type for the HTTPClient type |
| type HTTPClient struct { |
| mock.Mock |
| } |
| |
| // Get provides a mock function with given fields: ctx, url |
| func (_m *HTTPClient) Get(ctx context.Context, url string) (*http.Response, error) { |
| ret := _m.Called(ctx, url) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for Get") |
| } |
| |
| var r0 *http.Response |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, string) (*http.Response, error)); ok { |
| return rf(ctx, url) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, string) *http.Response); ok { |
| r0 = rf(ctx, url) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*http.Response) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { |
| r1 = rf(ctx, url) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // Post provides a mock function with given fields: ctx, url, contentType, body |
| func (_m *HTTPClient) Post(ctx context.Context, url string, contentType string, body io.Reader) (*http.Response, error) { |
| ret := _m.Called(ctx, url, contentType, body) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for Post") |
| } |
| |
| var r0 *http.Response |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader) (*http.Response, error)); ok { |
| return rf(ctx, url, contentType, body) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader) *http.Response); ok { |
| r0 = rf(ctx, url, contentType, body) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*http.Response) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, string, string, io.Reader) error); ok { |
| r1 = rf(ctx, url, contentType, body) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // NewHTTPClient creates a new instance of HTTPClient. 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 NewHTTPClient(t interface { |
| mock.TestingT |
| Cleanup(func()) |
| }) *HTTPClient { |
| mock := &HTTPClient{} |
| mock.Mock.Test(t) |
| |
| t.Cleanup(func() { mock.AssertExpectations(t) }) |
| |
| return mock |
| } |