mocks

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sample

type Sample[T any, K any] struct {
	Calls             map[string][]SampleCallerInfo
	MockAge           func() int
	MockName          func() string
	MockSetAndGetUser func(name string, age int, ex example_types.Example) *example_types.User
	MockSetName       func(name string)
	MockSetUser       func(name string, age int, ex example_types.Example, writer io2.Writer)
}

func NewSample

func NewSample[T any, K any]() *Sample[T, K]

func (*Sample[T, K]) Age

func (sMock *Sample[T, K]) Age() int

func (*Sample[T, K]) Name

func (sMock *Sample[T, K]) Name() string

func (*Sample[T, K]) SetAndGetUser

func (sMock *Sample[T, K]) SetAndGetUser(name string, age int, ex example_types.Example) *example_types.User

func (*Sample[T, K]) SetName

func (sMock *Sample[T, K]) SetName(name string)

func (*Sample[T, K]) SetUser

func (sMock *Sample[T, K]) SetUser(name string, age int, ex example_types.Example, writer io2.Writer)

type SampleCallerInfo

type SampleCallerInfo struct {
	Args []any
}

Jump to

Keyboard shortcuts

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