mocksensor

package
v0.0.0-...-82b861d Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockFetcher

type MockFetcher struct {
	mock.Mock
}

MockFetcher is an autogenerated mock type for the Fetcher type

func NewMockFetcher

func NewMockFetcher(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockFetcher

NewMockFetcher creates a new instance of MockFetcher. 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 (*MockFetcher) Do

func (_m *MockFetcher) Do(req *http.Request) (*http.Response, error)

Do provides a mock function with given fields: req

func (*MockFetcher) EXPECT

func (_m *MockFetcher) EXPECT() *MockFetcher_Expecter

func (*MockFetcher) Get

func (_m *MockFetcher) Get(url string) (*http.Response, error)

Get provides a mock function with given fields: url

type MockFetcher_Do_Call

type MockFetcher_Do_Call struct {
	*mock.Call
}

MockFetcher_Do_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Do'

func (*MockFetcher_Do_Call) Return

func (*MockFetcher_Do_Call) Run

func (_c *MockFetcher_Do_Call) Run(run func(req *http.Request)) *MockFetcher_Do_Call

func (*MockFetcher_Do_Call) RunAndReturn

func (_c *MockFetcher_Do_Call) RunAndReturn(run func(*http.Request) (*http.Response, error)) *MockFetcher_Do_Call

type MockFetcher_Expecter

type MockFetcher_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockFetcher_Expecter) Do

func (_e *MockFetcher_Expecter) Do(req interface{}) *MockFetcher_Do_Call

Do is a helper method to define mock.On call

  • req *http.Request

func (*MockFetcher_Expecter) Get

func (_e *MockFetcher_Expecter) Get(url interface{}) *MockFetcher_Get_Call

Get is a helper method to define mock.On call

  • url string

type MockFetcher_Get_Call

type MockFetcher_Get_Call struct {
	*mock.Call
}

MockFetcher_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'

func (*MockFetcher_Get_Call) Return

func (*MockFetcher_Get_Call) Run

func (_c *MockFetcher_Get_Call) Run(run func(url string)) *MockFetcher_Get_Call

func (*MockFetcher_Get_Call) RunAndReturn

func (_c *MockFetcher_Get_Call) RunAndReturn(run func(string) (*http.Response, error)) *MockFetcher_Get_Call

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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