gohtmock

package module
v0.0.0-...-a2bfa16 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

README

gohtmock

http mock for golang

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mock

type Mock struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New() *Mock

func (*Mock) AssertCallCount

func (m *Mock) AssertCallCount(tb testing.TB, method, path string, expected int)

func (*Mock) AssertCallCountAsserted

func (m *Mock) AssertCallCountAsserted(tb testing.TB)

func (*Mock) AssertMocksCalled

func (m *Mock) AssertMocksCalled(tb testing.TB)

func (*Mock) AssertNoMissingMocks

func (m *Mock) AssertNoMissingMocks(tb testing.TB)

func (*Mock) Close

func (m *Mock) Close()

func (*Mock) Mock

func (m *Mock) Mock(path, resp string, callback ...func(*http.Request) int) *mockResponse

func (*Mock) ServeHTTP

func (m *Mock) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Mock) URL

func (m *Mock) URL() string

Jump to

Keyboard shortcuts

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