github.com/yandex/pandora@v0.5.32/components/guns/http_scenario/mock_client_test.go (about)

     1  // Code generated by mockery v2.22.1. DO NOT EDIT.
     2  
     3  package httpscenario
     4  
     5  import (
     6  	http "net/http"
     7  
     8  	mock "github.com/stretchr/testify/mock"
     9  )
    10  
    11  // MockClient is an autogenerated mock type for the Client type
    12  type MockClient struct {
    13  	mock.Mock
    14  }
    15  
    16  // CloseIdleConnections provides a mock function with given fields:
    17  func (_m *MockClient) CloseIdleConnections() {
    18  	_m.Called()
    19  }
    20  
    21  // Do provides a mock function with given fields: req
    22  func (_m *MockClient) Do(req *http.Request) (*http.Response, error) {
    23  	ret := _m.Called(req)
    24  
    25  	var r0 *http.Response
    26  	var r1 error
    27  	if rf, ok := ret.Get(0).(func(*http.Request) (*http.Response, error)); ok {
    28  		return rf(req)
    29  	}
    30  	if rf, ok := ret.Get(0).(func(*http.Request) *http.Response); ok {
    31  		r0 = rf(req)
    32  	} else {
    33  		if ret.Get(0) != nil {
    34  			r0 = ret.Get(0).(*http.Response)
    35  		}
    36  	}
    37  
    38  	if rf, ok := ret.Get(1).(func(*http.Request) error); ok {
    39  		r1 = rf(req)
    40  	} else {
    41  		r1 = ret.Error(1)
    42  	}
    43  
    44  	return r0, r1
    45  }
    46  
    47  type mockConstructorTestingTNewMockClient interface {
    48  	mock.TestingT
    49  	Cleanup(func())
    50  }
    51  
    52  // 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.
    53  func NewMockClient(t mockConstructorTestingTNewMockClient) *MockClient {
    54  	mock := &MockClient{}
    55  	mock.Mock.Test(t)
    56  
    57  	t.Cleanup(func() { mock.AssertExpectations(t) })
    58  
    59  	return mock
    60  }