Files
opencloud/services/graph/mocks/http_client.go
06kellyjac 2a3a20693a build: Modify mockery config to work with v3
Maintaining the positioning of the files from v2 to reduce cognitive
load.
Indentation of yaml files now matches `.editorconfig`.
All mock files regenerated.
Added empty `{}` following convention from `mockery init` etc.
Removed directory specification where it would already match.
2025-06-19 16:25:39 +01:00

101 lines
2.4 KiB
Go

// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify
package mocks
import (
"net/http"
mock "github.com/stretchr/testify/mock"
)
// 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
}
// HTTPClient is an autogenerated mock type for the HTTPClient type
type HTTPClient struct {
mock.Mock
}
type HTTPClient_Expecter struct {
mock *mock.Mock
}
func (_m *HTTPClient) EXPECT() *HTTPClient_Expecter {
return &HTTPClient_Expecter{mock: &_m.Mock}
}
// Do provides a mock function for the type HTTPClient
func (_mock *HTTPClient) Do(req *http.Request) (*http.Response, error) {
ret := _mock.Called(req)
if len(ret) == 0 {
panic("no return value specified for Do")
}
var r0 *http.Response
var r1 error
if returnFunc, ok := ret.Get(0).(func(*http.Request) (*http.Response, error)); ok {
return returnFunc(req)
}
if returnFunc, ok := ret.Get(0).(func(*http.Request) *http.Response); ok {
r0 = returnFunc(req)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*http.Response)
}
}
if returnFunc, ok := ret.Get(1).(func(*http.Request) error); ok {
r1 = returnFunc(req)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// HTTPClient_Do_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Do'
type HTTPClient_Do_Call struct {
*mock.Call
}
// Do is a helper method to define mock.On call
// - req *http.Request
func (_e *HTTPClient_Expecter) Do(req interface{}) *HTTPClient_Do_Call {
return &HTTPClient_Do_Call{Call: _e.mock.On("Do", req)}
}
func (_c *HTTPClient_Do_Call) Run(run func(req *http.Request)) *HTTPClient_Do_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 *http.Request
if args[0] != nil {
arg0 = args[0].(*http.Request)
}
run(
arg0,
)
})
return _c
}
func (_c *HTTPClient_Do_Call) Return(response *http.Response, err error) *HTTPClient_Do_Call {
_c.Call.Return(response, err)
return _c
}
func (_c *HTTPClient_Do_Call) RunAndReturn(run func(req *http.Request) (*http.Response, error)) *HTTPClient_Do_Call {
_c.Call.Return(run)
return _c
}