mocks

package
v0.0.0-...-c846bbc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpClientMock

type HttpClientMock struct {
	mock.Mock
}

func NewHttpClientMock

func NewHttpClientMock(t testInterface) *HttpClientMock

NewHttpClientMock creates a new instance of HttpClientMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*HttpClientMock) Do

func (h *HttpClientMock) Do(req *http.Request) (*http.Response, error)

func (*HttpClientMock) Get

func (h *HttpClientMock) Get(url string) (*http.Response, error)

func (*HttpClientMock) PostForm

func (h *HttpClientMock) PostForm(url string, data url.Values) (*http.Response, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL