mock

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package mock provides mocks for the cookiejar package.

Index

Constants

This section is empty.

Variables

View Source
var NopJar = Mock()

NopJar is no mock Jar.

Functions

This section is empty.

Types

type Jar

type Jar struct {
	mock.Mock
}

Jar is an autogenerated mock type for the jar type

func NewJar

func NewJar(t mockConstructorTestingTNewJar) *Jar

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

func (*Jar) Cookies

func (_m *Jar) Cookies(u *url.URL) []*http.Cookie

Cookies provides a mock function with given fields: u

func (*Jar) SetCookies

func (_m *Jar) SetCookies(u *url.URL, cookies []*http.Cookie)

SetCookies provides a mock function with given fields: u, cookies

type Mocker

type Mocker func(tb testing.TB) *Jar

Mocker is Jar mocker.

func Mock

func Mock(mocks ...func(j *Jar)) Mocker

Mock creates Jar mock with cleanup to ensure all the expectations are met.

Jump to

Keyboard shortcuts

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