Documentation
¶
Overview ¶
Package testmoqs contains multiple test mocks and adaptors for use in unit testing
Index ¶
- type B
- type DifficultParamNamesFn
- type DifficultResultNamesFn
- type E
- type GenericInterfaceParam
- type GenericInterfaceParamFn
- type GenericInterfaceResult
- type GenericInterfaceResultFn
- type GenericParams
- type GenericParamsFn
- type GenericResults
- type GenericResultsFn
- type InterfaceParamFn
- type InterfaceParamWriter
- type InterfaceResultFn
- type InterfaceResultReader
- type MyReader
- type MyWriter
- type NoNamesFn
- type NoParamsFn
- type NoResultsFn
- type NothingFn
- type Params
- type PartialGenericParams
- type PartialGenericParamsFn
- type PartialGenericResults
- type PartialGenericResultsFn
- type PassByArrayFn
- type PassByChanFn
- type PassByEllipsisFn
- type PassByMapFn
- type PassByReferenceFn
- type PassBySliceFn
- type PassByValueFn
- type RepeatedIdsFn
- type Results
- type S
- type TimesFn
- type UnsafePointerFn
- type Usual
- type UsualFn
- type VariadicFn
- type W
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type B ¶ added in v0.27.0
type B struct{}
The following unused structs check that the AST cache doesn't pick up the wrong types
type DifficultParamNamesFn ¶
type DifficultParamNamesFn func(m, r bool, sequence string, param, params, i int, result, results, _ float32)
DifficultParamNamesFn has parameters with names that have been problematic
type DifficultResultNamesFn ¶
type DifficultResultNamesFn func() (m, r string, sequence error, param, params, i int, result, results, _ float32)
DifficultResultNamesFn has parameters with names that have been problematic
type E ¶ added in v0.27.0
type E struct{}
The following unused structs check that the AST cache doesn't pick up the wrong types
type GenericInterfaceParam ¶ added in v0.27.0
type GenericInterfaceParamFn ¶ added in v0.27.0
GenericInterfaceParamFn tests passing generic interface parameters
type GenericInterfaceResult ¶ added in v0.27.0
type GenericInterfaceResultFn ¶ added in v0.27.0
GenericInterfaceResultFn tests returning generic interface results
type GenericParams ¶ added in v0.27.0
type GenericParamsFn ¶ added in v0.27.0
GenericParamsFn has all generic parameters
type GenericResults ¶ added in v0.27.0
type GenericResultsFn ¶ added in v0.27.0
GenericResultsFn has all generic results
type InterfaceParamFn ¶
InterfaceParamFn tests passing interface parameters
type InterfaceParamWriter ¶
InterfaceParamWriter is used for testing functions that take an interface as a parameter
type InterfaceResultFn ¶
InterfaceResultFn tests returning interface results
type InterfaceResultReader ¶
InterfaceResultReader is used for testing functions that return an interface
type NoParamsFn ¶
NoParamsFn is a function with no parameters
type NoResultsFn ¶
NoResultsFn is a function with no return values
type NothingFn ¶
type NothingFn func()
NothingFn is a function with no parameters and no return values
type PartialGenericParams ¶ added in v0.27.0
type PartialGenericParamsFn ¶ added in v0.27.0
PartialGenericParamsFn has some generic parameters
type PartialGenericResults ¶ added in v0.27.0
type PartialGenericResultsFn ¶ added in v0.27.0
PartialGenericResultsFn has some generic results
type PassByArrayFn ¶ added in v0.27.0
PassByArrayFn tests passing parameters and results by array
type PassByChanFn ¶ added in v0.27.0
PassByChanFn tests passing parameters and results by channel
type PassByEllipsisFn ¶ added in v0.27.0
PassByEllipsisFn tests passing parameters by ellipsis
type PassByMapFn ¶ added in v0.27.0
PassByMapFn tests passing parameters and results by map
type PassByReferenceFn ¶
PassByReferenceFn tests passing parameters and results by reference
type PassBySliceFn ¶ added in v0.27.0
PassBySliceFn tests passing parameters and results by slice
type PassByValueFn ¶ added in v0.27.0
PassByValueFn tests passing parameters and results by reference
type RepeatedIdsFn ¶
type RepeatedIdsFn func(sParam1, sParam2 string, bParam bool) (sResult1, sResult2 string, err error)
RepeatedIdsFn is a function with multiple arguments of the same type
type S ¶ added in v0.27.0
type S struct{}
The following unused structs check that the AST cache doesn't pick up the wrong types
type UnsafePointerFn ¶ added in v0.27.0
type Usual ¶
type Usual interface { Usual(sParam string, bParam bool) (sResult string, err error) NoNames(string, bool) (string, error) NoResults(sParam string, bParam bool) NoParams() (sResult string, err error) Nothing() Variadic(other bool, args ...string) (sResult string, err error) RepeatedIds(sParam1, sParam2 string, bParam bool) (sResult1, sResult2 string, err error) Times(sParam string, times bool) (sResult string, err error) DifficultParamNames(m, r bool, sequence string, param, params, i int, result, results, _ float32) DifficultResultNames() (m, r string, sequence error, param, params, i int, result, results, _ float32) PassByArray(p [3]Params) [3]Results PassByChan(p chan Params) chan Results PassByEllipsis(p ...Params) (string, error) PassByMap(p map[string]Params) map[string]Results PassByReference(p *Params) *Results PassBySlice(p []Params) []Results PassByValue(p Params) Results InterfaceParam(w io.Writer) (sResult string, err error) InterfaceResult(sParam string, bParam bool) (r io.Reader) FnParam(fn func()) other.Other }
Usual combines all the above function types into an interface
type VariadicFn ¶
VariadicFn is a function with a variable number of arguments