github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/pkg/http/automock/http_round_tripper.go (about) 1 // Code generated by mockery. DO NOT EDIT. 2 3 package automock 4 5 import ( 6 http "github.com/kyma-incubator/compass/components/director/pkg/http" 7 mock "github.com/stretchr/testify/mock" 8 9 nethttp "net/http" 10 ) 11 12 // HTTPRoundTripper is an autogenerated mock type for the HTTPRoundTripper type 13 type HTTPRoundTripper struct { 14 mock.Mock 15 } 16 17 // Clone provides a mock function with given fields: 18 func (_m *HTTPRoundTripper) Clone() http.HTTPRoundTripper { 19 ret := _m.Called() 20 21 var r0 http.HTTPRoundTripper 22 if rf, ok := ret.Get(0).(func() http.HTTPRoundTripper); ok { 23 r0 = rf() 24 } else { 25 if ret.Get(0) != nil { 26 r0 = ret.Get(0).(http.HTTPRoundTripper) 27 } 28 } 29 30 return r0 31 } 32 33 // GetTransport provides a mock function with given fields: 34 func (_m *HTTPRoundTripper) GetTransport() *nethttp.Transport { 35 ret := _m.Called() 36 37 var r0 *nethttp.Transport 38 if rf, ok := ret.Get(0).(func() *nethttp.Transport); ok { 39 r0 = rf() 40 } else { 41 if ret.Get(0) != nil { 42 r0 = ret.Get(0).(*nethttp.Transport) 43 } 44 } 45 46 return r0 47 } 48 49 // RoundTrip provides a mock function with given fields: _a0 50 func (_m *HTTPRoundTripper) RoundTrip(_a0 *nethttp.Request) (*nethttp.Response, error) { 51 ret := _m.Called(_a0) 52 53 var r0 *nethttp.Response 54 if rf, ok := ret.Get(0).(func(*nethttp.Request) *nethttp.Response); ok { 55 r0 = rf(_a0) 56 } else { 57 if ret.Get(0) != nil { 58 r0 = ret.Get(0).(*nethttp.Response) 59 } 60 } 61 62 var r1 error 63 if rf, ok := ret.Get(1).(func(*nethttp.Request) error); ok { 64 r1 = rf(_a0) 65 } else { 66 r1 = ret.Error(1) 67 } 68 69 return r0, r1 70 } 71 72 type mockConstructorTestingTNewHTTPRoundTripper interface { 73 mock.TestingT 74 Cleanup(func()) 75 } 76 77 // NewHTTPRoundTripper creates a new instance of HTTPRoundTripper. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 78 func NewHTTPRoundTripper(t mockConstructorTestingTNewHTTPRoundTripper) *HTTPRoundTripper { 79 mock := &HTTPRoundTripper{} 80 mock.Mock.Test(t) 81 82 t.Cleanup(func() { mock.AssertExpectations(t) }) 83 84 return mock 85 }