blob: d2d59c1e1b80b343886230539420339428e59c7a [file] [log] [blame]
// Code generated by mockery v0.0.0-dev. DO NOT EDIT.
package mocks
import (
http "net/http"
io "io"
mock "github.com/stretchr/testify/mock"
testing "testing"
)
// HTTPClient is an autogenerated mock type for the HTTPClient type
type HTTPClient struct {
mock.Mock
}
// Get provides a mock function with given fields: url
func (_m *HTTPClient) Get(url string) (*http.Response, error) {
ret := _m.Called(url)
var r0 *http.Response
if rf, ok := ret.Get(0).(func(string) *http.Response); ok {
r0 = rf(url)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*http.Response)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(url)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Post provides a mock function with given fields: url, contentType, body
func (_m *HTTPClient) Post(url string, contentType string, body io.Reader) (*http.Response, error) {
ret := _m.Called(url, contentType, body)
var r0 *http.Response
if rf, ok := ret.Get(0).(func(string, string, io.Reader) *http.Response); ok {
r0 = rf(url, contentType, body)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*http.Response)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, string, io.Reader) error); ok {
r1 = rf(url, contentType, body)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// NewHTTPClient creates a new instance of HTTPClient. It also registers a cleanup function to assert the mocks expectations.
func NewHTTPClient(t testing.TB) *HTTPClient {
mock := &HTTPClient{}
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}