mocks

package
v0.0.0-...-d389d3b Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntityFactory

type EntityFactory[T common.EntityConstraint, U fakers.EntityFaker[T]] struct {
	mock.Mock
}

EntityFactory is an autogenerated mock type for the EntityFactory type

func NewEntityFactory

func NewEntityFactory[T common.EntityConstraint, U fakers.EntityFaker[T]](t mockConstructorTestingTNewEntityFactory) *EntityFactory[T, U]

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

func (*EntityFactory[T, U]) Any

func (_m *EntityFactory[T, U]) Any() (*T, error)

Any provides a mock function with given fields:

func (*EntityFactory[T, U]) EXPECT

func (_m *EntityFactory[T, U]) EXPECT() *EntityFactory_Expecter[T, U]

func (*EntityFactory[T, U]) Given

func (_m *EntityFactory[T, U]) Given(entity T) (*T, error)

Given provides a mock function with given fields: entity

func (*EntityFactory[T, U]) Many

func (_m *EntityFactory[T, U]) Many(numberOfEntities int) ([]T, error)

Many provides a mock function with given fields: numberOfEntities

type EntityFactory_Any_Call

type EntityFactory_Any_Call[T common.EntityConstraint, U fakers.EntityFaker[T]] struct {
	*mock.Call
}

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

func (*EntityFactory_Any_Call[T, U]) Return

func (_c *EntityFactory_Any_Call[T, U]) Return(_a0 *T, _a1 error) *EntityFactory_Any_Call[T, U]

func (*EntityFactory_Any_Call[T, U]) Run

func (_c *EntityFactory_Any_Call[T, U]) Run(run func()) *EntityFactory_Any_Call[T, U]

type EntityFactory_Expecter

type EntityFactory_Expecter[T common.EntityConstraint, U fakers.EntityFaker[T]] struct {
	// contains filtered or unexported fields
}

func (*EntityFactory_Expecter[T, U]) Any

func (_e *EntityFactory_Expecter[T, U]) Any() *EntityFactory_Any_Call[T, U]

Any is a helper method to define mock.On call

func (*EntityFactory_Expecter[T, U]) Given

func (_e *EntityFactory_Expecter[T, U]) Given(entity interface{}) *EntityFactory_Given_Call[T, U]

Given is a helper method to define mock.On call

  • entity T

func (*EntityFactory_Expecter[T, U]) Many

func (_e *EntityFactory_Expecter[T, U]) Many(numberOfEntities interface{}) *EntityFactory_Many_Call[T, U]

Many is a helper method to define mock.On call

  • numberOfEntities int

type EntityFactory_Given_Call

type EntityFactory_Given_Call[T common.EntityConstraint, U fakers.EntityFaker[T]] struct {
	*mock.Call
}

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

func (*EntityFactory_Given_Call[T, U]) Return

func (_c *EntityFactory_Given_Call[T, U]) Return(_a0 *T, _a1 error) *EntityFactory_Given_Call[T, U]

func (*EntityFactory_Given_Call[T, U]) Run

func (_c *EntityFactory_Given_Call[T, U]) Run(run func(entity T)) *EntityFactory_Given_Call[T, U]

type EntityFactory_Many_Call

type EntityFactory_Many_Call[T common.EntityConstraint, U fakers.EntityFaker[T]] struct {
	*mock.Call
}

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

func (*EntityFactory_Many_Call[T, U]) Return

func (_c *EntityFactory_Many_Call[T, U]) Return(_a0 []T, _a1 error) *EntityFactory_Many_Call[T, U]

func (*EntityFactory_Many_Call[T, U]) Run

func (_c *EntityFactory_Many_Call[T, U]) Run(run func(numberOfEntities int)) *EntityFactory_Many_Call[T, U]

Jump to

Keyboard shortcuts

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