mocks

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: Apache-2.0, Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comparable

type Comparable struct {
	mock.Mock
}

Comparable is an autogenerated mock type for the Comparable type

func NewComparable

func NewComparable(t interface {
	mock.TestingT
	Cleanup(func())
}) *Comparable

NewComparable creates a new instance of Comparable. 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 (*Comparable) Compare

func (_m *Comparable) Compare(to random.Comparable) bool

Compare provides a mock function with given fields: to

func (*Comparable) EXPECT

func (_m *Comparable) EXPECT() *Comparable_Expecter

type Comparable_Compare_Call

type Comparable_Compare_Call struct {
	*mock.Call
}

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

func (*Comparable_Compare_Call) Return

func (*Comparable_Compare_Call) Run

func (*Comparable_Compare_Call) RunAndReturn

type Comparable_Expecter

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

func (*Comparable_Expecter) Compare

func (_e *Comparable_Expecter) Compare(to interface{}) *Comparable_Compare_Call

Compare is a helper method to define mock.On call

  • to random.Comparable

type WeightedRandomList

type WeightedRandomList struct {
	mock.Mock
}

WeightedRandomList is an autogenerated mock type for the WeightedRandomList type

func NewWeightedRandomList

func NewWeightedRandomList(t interface {
	mock.TestingT
	Cleanup(func())
}) *WeightedRandomList

NewWeightedRandomList creates a new instance of WeightedRandomList. 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 (*WeightedRandomList) EXPECT

func (*WeightedRandomList) Get

Get provides a mock function with no fields

func (*WeightedRandomList) GetWithSeed

func (_m *WeightedRandomList) GetWithSeed(seed rand.Source) (random.Comparable, error)

GetWithSeed provides a mock function with given fields: seed

func (*WeightedRandomList) Len

func (_m *WeightedRandomList) Len() int

Len provides a mock function with no fields

func (*WeightedRandomList) List

func (_m *WeightedRandomList) List() []random.Comparable

List provides a mock function with no fields

type WeightedRandomList_Expecter

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

func (*WeightedRandomList_Expecter) Get

Get is a helper method to define mock.On call

func (*WeightedRandomList_Expecter) GetWithSeed

func (_e *WeightedRandomList_Expecter) GetWithSeed(seed interface{}) *WeightedRandomList_GetWithSeed_Call

GetWithSeed is a helper method to define mock.On call

  • seed rand.Source

func (*WeightedRandomList_Expecter) Len

Len is a helper method to define mock.On call

func (*WeightedRandomList_Expecter) List

List is a helper method to define mock.On call

type WeightedRandomList_GetWithSeed_Call

type WeightedRandomList_GetWithSeed_Call struct {
	*mock.Call
}

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

func (*WeightedRandomList_GetWithSeed_Call) Return

func (*WeightedRandomList_GetWithSeed_Call) Run

func (*WeightedRandomList_GetWithSeed_Call) RunAndReturn

type WeightedRandomList_Get_Call

type WeightedRandomList_Get_Call struct {
	*mock.Call
}

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

func (*WeightedRandomList_Get_Call) Return

func (*WeightedRandomList_Get_Call) Run

func (*WeightedRandomList_Get_Call) RunAndReturn

type WeightedRandomList_Len_Call

type WeightedRandomList_Len_Call struct {
	*mock.Call
}

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

func (*WeightedRandomList_Len_Call) Return

func (*WeightedRandomList_Len_Call) Run

func (*WeightedRandomList_Len_Call) RunAndReturn

func (_c *WeightedRandomList_Len_Call) RunAndReturn(run func() int) *WeightedRandomList_Len_Call

type WeightedRandomList_List_Call

type WeightedRandomList_List_Call struct {
	*mock.Call
}

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

func (*WeightedRandomList_List_Call) Return

func (*WeightedRandomList_List_Call) Run

func (*WeightedRandomList_List_Call) RunAndReturn

Jump to

Keyboard shortcuts

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