Documentation ¶
Index ¶
- func Any[T any]() T
- func AnyBool() booldeprecated
- func AnyBoolSlice() []booldeprecated
- func AnyComplex128() complex128deprecated
- func AnyComplex128Slice() []complex128deprecated
- func AnyComplex64() complex64deprecated
- func AnyComplex64Slice() []complex64deprecated
- func AnyFloat32() float32deprecated
- func AnyFloat32Slice() []float32deprecated
- func AnyFloat64() float64deprecated
- func AnyFloat64Slice() []float64deprecated
- func AnyInt() intdeprecated
- func AnyInt16() int16deprecated
- func AnyInt16Slice() []int16deprecated
- func AnyInt32() int32deprecated
- func AnyInt32Slice() []int32deprecated
- func AnyInt64() int64deprecated
- func AnyInt64Slice() []int64deprecated
- func AnyInt8() int8deprecated
- func AnyInt8Slice() []int8deprecated
- func AnyIntSlice() []intdeprecated
- func AnyInterface() interface{}deprecated
- func AnyInterfaceSlice() []interface{}deprecated
- func AnyString() stringdeprecated
- func AnyStringSlice() []stringdeprecated
- func AnyUint() uintdeprecated
- func AnyUint16() uint16deprecated
- func AnyUint16Slice() []uint16deprecated
- func AnyUint32() uint32deprecated
- func AnyUint32Slice() []uint32deprecated
- func AnyUint64() uint64deprecated
- func AnyUint64Slice() []uint64deprecated
- func AnyUint8() uint8deprecated
- func AnyUint8Slice() []uint8deprecated
- func AnyUintSlice() []uintdeprecated
- func AnyUintptr() uintptrdeprecated
- func AnyUintptrSlice() []uintptrdeprecated
- func ArgThat[T any](matcher ArgumentMatcher) T
- func BoolSliceThat(matcher ArgumentMatcher) []booldeprecated
- func BoolThat(matcher ArgumentMatcher) booldeprecated
- func Complex128SliceThat(matcher ArgumentMatcher) []complex128deprecated
- func Complex128That(matcher ArgumentMatcher) complex128deprecated
- func Complex64SliceThat(matcher ArgumentMatcher) []complex64deprecated
- func Complex64That(matcher ArgumentMatcher) complex64deprecated
- func DumpInvocationsFor(mock Mock)
- func Eq[T any](value T) T
- func EqBool(value bool) booldeprecated
- func EqBoolSlice(value []bool) []booldeprecated
- func EqComplex128(value complex128) complex128deprecated
- func EqComplex128Slice(value []complex128) []complex128deprecated
- func EqComplex64(value complex64) complex64deprecated
- func EqComplex64Slice(value []complex64) []complex64deprecated
- func EqFloat32(value float32) float32deprecated
- func EqFloat32Slice(value []float32) []float32deprecated
- func EqFloat64(value float64) float64deprecated
- func EqFloat64Slice(value []float64) []float64deprecated
- func EqInt(value int) intdeprecated
- func EqInt16(value int16) int16deprecated
- func EqInt16Slice(value []int16) []int16deprecated
- func EqInt32(value int32) int32deprecated
- func EqInt32Slice(value []int32) []int32deprecated
- func EqInt64(value int64) int64deprecated
- func EqInt64Slice(value []int64) []int64deprecated
- func EqInt8(value int8) int8deprecated
- func EqInt8Slice(value []int8) []int8deprecated
- func EqIntSlice(value []int) []intdeprecated
- func EqInterface(value interface{}) interface{}deprecated
- func EqInterfaceSlice(value []interface{}) []interface{}deprecated
- func EqString(value string) stringdeprecated
- func EqStringSlice(value []string) []stringdeprecated
- func EqUint(value uint) uintdeprecated
- func EqUint16(value uint16) uint16deprecated
- func EqUint16Slice(value []uint16) []uint16deprecated
- func EqUint32(value uint32) uint32deprecated
- func EqUint32Slice(value []uint32) []uint32deprecated
- func EqUint64(value uint64) uint64deprecated
- func EqUint64Slice(value []uint64) []uint64deprecated
- func EqUint8(value uint8) uint8deprecated
- func EqUint8Slice(value []uint8) []uint8deprecated
- func EqUintSlice(value []uint) []uintdeprecated
- func EqUintptr(value uintptr) uintptrdeprecated
- func EqUintptrSlice(value []uintptr) []uintptrdeprecated
- func Float32SliceThat(matcher ArgumentMatcher) []float32deprecated
- func Float32That(matcher ArgumentMatcher) float32deprecated
- func Float64SliceThat(matcher ArgumentMatcher) []float64deprecated
- func Float64That(matcher ArgumentMatcher) float64deprecated
- func Int16SliceThat(matcher ArgumentMatcher) []int16deprecated
- func Int16That(matcher ArgumentMatcher) int16deprecated
- func Int32SliceThat(matcher ArgumentMatcher) []int32deprecated
- func Int32That(matcher ArgumentMatcher) int32deprecated
- func Int64SliceThat(matcher ArgumentMatcher) []int64deprecated
- func Int64That(matcher ArgumentMatcher) int64deprecated
- func Int8SliceThat(matcher ArgumentMatcher) []int8deprecated
- func Int8That(matcher ArgumentMatcher) int8deprecated
- func IntSliceThat(matcher ArgumentMatcher) []intdeprecated
- func IntThat(matcher ArgumentMatcher) intdeprecated
- func InterceptMockFailures(f func()) []string
- func InterfaceSliceThat(matcher ArgumentMatcher) []interface{}deprecated
- func InterfaceThat(matcher ArgumentMatcher) interface{}deprecated
- func NotEq[T any](value T) T
- func NotEqBool(value bool) booldeprecated
- func NotEqBoolSlice(value []bool) []booldeprecated
- func NotEqComplex128(value complex128) complex128deprecated
- func NotEqComplex128Slice(value []complex128) []complex128deprecated
- func NotEqComplex64(value complex64) complex64deprecated
- func NotEqComplex64Slice(value []complex64) []complex64deprecated
- func NotEqFloat32(value float32) float32deprecated
- func NotEqFloat32Slice(value []float32) []float32deprecated
- func NotEqFloat64(value float64) float64deprecated
- func NotEqFloat64Slice(value []float64) []float64deprecated
- func NotEqInt(value int) intdeprecated
- func NotEqInt16(value int16) int16deprecated
- func NotEqInt16Slice(value []int16) []int16deprecated
- func NotEqInt32(value int32) int32deprecated
- func NotEqInt32Slice(value []int32) []int32deprecated
- func NotEqInt64(value int64) int64deprecated
- func NotEqInt64Slice(value []int64) []int64deprecated
- func NotEqInt8(value int8) int8deprecated
- func NotEqInt8Slice(value []int8) []int8deprecated
- func NotEqIntSlice(value []int) []intdeprecated
- func NotEqInterface(value interface{}) interface{}deprecated
- func NotEqInterfaceSlice(value []interface{}) []interface{}deprecated
- func NotEqString(value string) stringdeprecated
- func NotEqStringSlice(value []string) []stringdeprecated
- func NotEqUint(value uint) uintdeprecated
- func NotEqUint16(value uint16) uint16deprecated
- func NotEqUint16Slice(value []uint16) []uint16deprecated
- func NotEqUint32(value uint32) uint32deprecated
- func NotEqUint32Slice(value []uint32) []uint32deprecated
- func NotEqUint64(value uint64) uint64deprecated
- func NotEqUint64Slice(value []uint64) []uint64deprecated
- func NotEqUint8(value uint8) uint8deprecated
- func NotEqUint8Slice(value []uint8) []uint8deprecated
- func NotEqUintSlice(value []uint) []uintdeprecated
- func NotEqUintptr(value uintptr) uintptrdeprecated
- func NotEqUintptrSlice(value []uintptr) []uintptrdeprecated
- func RegisterMatcher(matcher ArgumentMatcher)
- func RegisterMockFailHandler(handler FailHandler)
- func RegisterMockTestingT(t *testing.T)
- func SDumpInvocationsFor(mock Mock) string
- func StringSliceThat(matcher ArgumentMatcher) []stringdeprecated
- func StringThat(matcher ArgumentMatcher) stringdeprecated
- func Uint16SliceThat(matcher ArgumentMatcher) []uint16deprecated
- func Uint16That(matcher ArgumentMatcher) uint16deprecated
- func Uint32SliceThat(matcher ArgumentMatcher) []uint32deprecated
- func Uint32That(matcher ArgumentMatcher) uint32deprecated
- func Uint64SliceThat(matcher ArgumentMatcher) []uint64deprecated
- func Uint64That(matcher ArgumentMatcher) uint64deprecated
- func Uint8SliceThat(matcher ArgumentMatcher) []uint8deprecated
- func Uint8That(matcher ArgumentMatcher) uint8deprecated
- func UintSliceThat(matcher ArgumentMatcher) []uintdeprecated
- func UintThat(matcher ArgumentMatcher) uintdeprecated
- func UintptrSliceThat(matcher ArgumentMatcher) []uintptrdeprecated
- func UintptrThat(matcher ArgumentMatcher) uintptrdeprecated
- func When(invocation ...interface{}) *ongoingStubbing
- type AnyMatcher
- type ArgumentMatcher
- type AtLeastIntMatcher
- type AtMostIntMatcher
- type Counter
- type EqMatcher
- type FailHandler
- type GenericMock
- func (genericMock *GenericMock) GetInvocationParams(methodInvocations []MethodInvocation) [][]Param
- func (genericMock *GenericMock) Invoke(methodName string, params []Param, returnTypes []reflect.Type) ReturnValues
- func (genericMock *GenericMock) Verify(inOrderContext *InOrderContext, invocationCountMatcher InvocationCountMatcher, ...) []MethodInvocation
- type InOrderContext
- type InvocationCountMatcher
- type Matcher
- type Matchers
- type MethodInvocation
- type Mock
- type NotEqMatcher
- type Option
- type OptionFunc
- type Param
- type ReturnValue
- type ReturnValues
- type Stubbing
- type Stubbings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyBoolSlice
deprecated
func AnyBoolSlice() []bool
Deprecated: Use Any[T any]() instead.
func AnyComplex128
deprecated
func AnyComplex128() complex128
Deprecated: Use Any[T any]() instead.
func AnyComplex128Slice
deprecated
func AnyComplex128Slice() []complex128
Deprecated: Use Any[T any]() instead.
func AnyComplex64
deprecated
func AnyComplex64() complex64
Deprecated: Use Any[T any]() instead.
func AnyComplex64Slice
deprecated
func AnyComplex64Slice() []complex64
Deprecated: Use Any[T any]() instead.
func AnyFloat32
deprecated
func AnyFloat32() float32
Deprecated: Use Any[T any]() instead.
func AnyFloat32Slice
deprecated
func AnyFloat32Slice() []float32
Deprecated: Use Any[T any]() instead.
func AnyFloat64
deprecated
func AnyFloat64() float64
Deprecated: Use Any[T any]() instead.
func AnyFloat64Slice
deprecated
func AnyFloat64Slice() []float64
Deprecated: Use Any[T any]() instead.
func AnyInt16Slice
deprecated
func AnyInt16Slice() []int16
Deprecated: Use Any[T any]() instead.
func AnyInt32Slice
deprecated
func AnyInt32Slice() []int32
Deprecated: Use Any[T any]() instead.
func AnyInt64Slice
deprecated
func AnyInt64Slice() []int64
Deprecated: Use Any[T any]() instead.
func AnyInt8Slice
deprecated
func AnyInt8Slice() []int8
Deprecated: Use Any[T any]() instead.
func AnyIntSlice
deprecated
func AnyIntSlice() []int
Deprecated: Use Any[T any]() instead.
func AnyInterface
deprecated
func AnyInterface() interface{}
Deprecated: Use Any[T any]() instead.
func AnyInterfaceSlice
deprecated
func AnyInterfaceSlice() []interface{}
Deprecated: Use Any[T any]() instead.
func AnyStringSlice
deprecated
func AnyStringSlice() []string
Deprecated: Use Any[T any]() instead.
func AnyUint16Slice
deprecated
func AnyUint16Slice() []uint16
Deprecated: Use Any[T any]() instead.
func AnyUint32Slice
deprecated
func AnyUint32Slice() []uint32
Deprecated: Use Any[T any]() instead.
func AnyUint64Slice
deprecated
func AnyUint64Slice() []uint64
Deprecated: Use Any[T any]() instead.
func AnyUint8Slice
deprecated
func AnyUint8Slice() []uint8
Deprecated: Use Any[T any]() instead.
func AnyUintSlice
deprecated
func AnyUintSlice() []uint
Deprecated: Use Any[T any]() instead.
func AnyUintptr
deprecated
func AnyUintptr() uintptr
Deprecated: Use Any[T any]() instead.
func AnyUintptrSlice
deprecated
func AnyUintptrSlice() []uintptr
Deprecated: Use Any[T any]() instead.
func ArgThat ¶ added in v3.1.0
func ArgThat[T any](matcher ArgumentMatcher) T
func BoolSliceThat
deprecated
func BoolSliceThat(matcher ArgumentMatcher) []bool
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func BoolThat
deprecated
func BoolThat(matcher ArgumentMatcher) bool
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func Complex128SliceThat
deprecated
func Complex128SliceThat(matcher ArgumentMatcher) []complex128
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func Complex128That
deprecated
func Complex128That(matcher ArgumentMatcher) complex128
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func Complex64SliceThat
deprecated
func Complex64SliceThat(matcher ArgumentMatcher) []complex64
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func Complex64That
deprecated
func Complex64That(matcher ArgumentMatcher) complex64
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func DumpInvocationsFor ¶
func DumpInvocationsFor(mock Mock)
func EqBoolSlice
deprecated
func EqComplex128
deprecated
func EqComplex128(value complex128) complex128
Deprecated: Use Eq[T any](value T) instead.
func EqComplex128Slice
deprecated
func EqComplex128Slice(value []complex128) []complex128
Deprecated: Use Eq[T any](value T) instead.
func EqComplex64
deprecated
func EqComplex64Slice
deprecated
func EqFloat32Slice
deprecated
func EqFloat64Slice
deprecated
func EqInt16Slice
deprecated
func EqInt32Slice
deprecated
func EqInt64Slice
deprecated
func EqInt8Slice
deprecated
func EqIntSlice
deprecated
func EqInterface
deprecated
func EqInterface(value interface{}) interface{}
Deprecated: Use Eq[T any](value T) instead.
func EqInterfaceSlice
deprecated
func EqInterfaceSlice(value []interface{}) []interface{}
Deprecated: Use Eq[T any](value T) instead.
func EqStringSlice
deprecated
func EqUint16Slice
deprecated
func EqUint32Slice
deprecated
func EqUint64Slice
deprecated
func EqUint8Slice
deprecated
func EqUintSlice
deprecated
func EqUintptrSlice
deprecated
func Float32SliceThat
deprecated
func Float32SliceThat(matcher ArgumentMatcher) []float32
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func Float32That
deprecated
func Float32That(matcher ArgumentMatcher) float32
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func Float64SliceThat
deprecated
func Float64SliceThat(matcher ArgumentMatcher) []float64
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func Float64That
deprecated
func Float64That(matcher ArgumentMatcher) float64
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func Int16SliceThat
deprecated
func Int16SliceThat(matcher ArgumentMatcher) []int16
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func Int16That
deprecated
func Int16That(matcher ArgumentMatcher) int16
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func Int32SliceThat
deprecated
func Int32SliceThat(matcher ArgumentMatcher) []int32
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func Int32That
deprecated
func Int32That(matcher ArgumentMatcher) int32
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func Int64SliceThat
deprecated
func Int64SliceThat(matcher ArgumentMatcher) []int64
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func Int64That
deprecated
func Int64That(matcher ArgumentMatcher) int64
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func Int8SliceThat
deprecated
func Int8SliceThat(matcher ArgumentMatcher) []int8
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func Int8That
deprecated
func Int8That(matcher ArgumentMatcher) int8
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func IntSliceThat
deprecated
func IntSliceThat(matcher ArgumentMatcher) []int
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func IntThat
deprecated
func IntThat(matcher ArgumentMatcher) int
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func InterceptMockFailures ¶
func InterceptMockFailures(f func()) []string
InterceptMockFailures runs a given callback and returns an array of failure messages generated by any Pegomock verifications within the callback.
This is accomplished by temporarily replacing the *global* fail handler with a fail handler that simply annotates failures. The original fail handler is reset when InterceptMockFailures returns.
func InterfaceSliceThat
deprecated
func InterfaceSliceThat(matcher ArgumentMatcher) []interface{}
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func InterfaceThat
deprecated
func InterfaceThat(matcher ArgumentMatcher) interface{}
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func NotEqBoolSlice
deprecated
func NotEqComplex128
deprecated
func NotEqComplex128(value complex128) complex128
Deprecated: Use NotEq[T any](value T) instead.
func NotEqComplex128Slice
deprecated
func NotEqComplex128Slice(value []complex128) []complex128
Deprecated: Use NotEq[T any](value T) instead.
func NotEqComplex64
deprecated
func NotEqComplex64Slice
deprecated
func NotEqFloat32
deprecated
func NotEqFloat32Slice
deprecated
func NotEqFloat64
deprecated
func NotEqFloat64Slice
deprecated
func NotEqInt16
deprecated
func NotEqInt16Slice
deprecated
func NotEqInt32
deprecated
func NotEqInt32Slice
deprecated
func NotEqInt64
deprecated
func NotEqInt64Slice
deprecated
func NotEqInt8Slice
deprecated
func NotEqIntSlice
deprecated
func NotEqInterface
deprecated
func NotEqInterface(value interface{}) interface{}
Deprecated: Use NotEq[T any](value T) instead.
func NotEqInterfaceSlice
deprecated
func NotEqInterfaceSlice(value []interface{}) []interface{}
Deprecated: Use NotEq[T any](value T) instead.
func NotEqString
deprecated
func NotEqStringSlice
deprecated
func NotEqUint16
deprecated
func NotEqUint16Slice
deprecated
func NotEqUint32
deprecated
func NotEqUint32Slice
deprecated
func NotEqUint64
deprecated
func NotEqUint64Slice
deprecated
func NotEqUint8
deprecated
func NotEqUint8Slice
deprecated
func NotEqUintSlice
deprecated
func NotEqUintptr
deprecated
func NotEqUintptrSlice
deprecated
func RegisterMatcher ¶
func RegisterMatcher(matcher ArgumentMatcher)
func RegisterMockFailHandler ¶
func RegisterMockFailHandler(handler FailHandler)
func RegisterMockTestingT ¶
func SDumpInvocationsFor ¶
func StringSliceThat
deprecated
func StringSliceThat(matcher ArgumentMatcher) []string
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func StringThat
deprecated
func StringThat(matcher ArgumentMatcher) string
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func Uint16SliceThat
deprecated
func Uint16SliceThat(matcher ArgumentMatcher) []uint16
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func Uint16That
deprecated
func Uint16That(matcher ArgumentMatcher) uint16
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func Uint32SliceThat
deprecated
func Uint32SliceThat(matcher ArgumentMatcher) []uint32
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func Uint32That
deprecated
func Uint32That(matcher ArgumentMatcher) uint32
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func Uint64SliceThat
deprecated
func Uint64SliceThat(matcher ArgumentMatcher) []uint64
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func Uint64That
deprecated
func Uint64That(matcher ArgumentMatcher) uint64
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func Uint8SliceThat
deprecated
func Uint8SliceThat(matcher ArgumentMatcher) []uint8
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func Uint8That
deprecated
func Uint8That(matcher ArgumentMatcher) uint8
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func UintSliceThat
deprecated
func UintSliceThat(matcher ArgumentMatcher) []uint
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func UintThat
deprecated
func UintThat(matcher ArgumentMatcher) uint
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func UintptrSliceThat
deprecated
func UintptrSliceThat(matcher ArgumentMatcher) []uintptr
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
func UintptrThat
deprecated
func UintptrThat(matcher ArgumentMatcher) uintptr
Deprecated: Use ArgThat[T any](matcher ArgumentMatcher) instead.
Types ¶
type AnyMatcher ¶
func NewAnyMatcher ¶
func NewAnyMatcher(typ reflect.Type) *AnyMatcher
func (*AnyMatcher) FailureMessage ¶
func (matcher *AnyMatcher) FailureMessage() string
func (*AnyMatcher) Matches ¶
func (matcher *AnyMatcher) Matches(param Param) bool
func (*AnyMatcher) String ¶
func (matcher *AnyMatcher) String() string
type ArgumentMatcher ¶
ArgumentMatcher can be used to match arguments.
type AtLeastIntMatcher ¶
type AtLeastIntMatcher struct { Value int // contains filtered or unexported fields }
func AtLeast ¶
func AtLeast(numDesiredInvocations int) *AtLeastIntMatcher
func (*AtLeastIntMatcher) FailureMessage ¶
func (matcher *AtLeastIntMatcher) FailureMessage() string
func (*AtLeastIntMatcher) Matches ¶
func (matcher *AtLeastIntMatcher) Matches(param Param) bool
func (*AtLeastIntMatcher) String ¶
func (matcher *AtLeastIntMatcher) String() string
type AtMostIntMatcher ¶
type AtMostIntMatcher struct { Value int // contains filtered or unexported fields }
func AtMost ¶
func AtMost(numDesiredInvocations int) *AtMostIntMatcher
func (*AtMostIntMatcher) FailureMessage ¶
func (matcher *AtMostIntMatcher) FailureMessage() string
func (*AtMostIntMatcher) Matches ¶
func (matcher *AtMostIntMatcher) Matches(param Param) bool
func (*AtMostIntMatcher) String ¶
func (matcher *AtMostIntMatcher) String() string
type EqMatcher ¶
func (*EqMatcher) FailureMessage ¶
type FailHandler ¶
var GlobalFailHandler FailHandler
func BuildTestingTFailHandler ¶
func BuildTestingTFailHandler(t testingT) FailHandler
type GenericMock ¶
func GetGenericMockFrom ¶
func GetGenericMockFrom(mock Mock) *GenericMock
func (*GenericMock) GetInvocationParams ¶
func (genericMock *GenericMock) GetInvocationParams(methodInvocations []MethodInvocation) [][]Param
TODO this doesn't need to be a method, can be a free function
func (*GenericMock) Invoke ¶
func (genericMock *GenericMock) Invoke(methodName string, params []Param, returnTypes []reflect.Type) ReturnValues
func (*GenericMock) Verify ¶
func (genericMock *GenericMock) Verify( inOrderContext *InOrderContext, invocationCountMatcher InvocationCountMatcher, methodName string, params []Param, options ...interface{}, ) []MethodInvocation
type InOrderContext ¶
type InOrderContext struct {
// contains filtered or unexported fields
}
type InvocationCountMatcher ¶
InvocationCountMatcher can be used to match invocation counts. It is guaranteed that FailureMessage will always be called after Matches so an implementation can save state.
type Matcher ¶
Matcher can be used to match arguments as well as invocation counts. Note that support for overlapping embedded interfaces was added in Go 1.14, which is why ArgumentMatcher and InvocationCountMatcher are not embedded here.
type Matchers ¶
type Matchers []ArgumentMatcher
type MethodInvocation ¶
type MethodInvocation struct {
// contains filtered or unexported fields
}
type Mock ¶
type Mock interface { SetFailHandler(FailHandler) FailHandler() FailHandler }
type NotEqMatcher ¶
type NotEqMatcher struct {
Value Param
}
func (*NotEqMatcher) FailureMessage ¶
func (matcher *NotEqMatcher) FailureMessage() string
func (*NotEqMatcher) Matches ¶
func (matcher *NotEqMatcher) Matches(param Param) bool
func (*NotEqMatcher) String ¶
func (matcher *NotEqMatcher) String() string
type Option ¶
type Option interface{ Apply(Mock) }
func WithFailHandler ¶
func WithFailHandler(fail FailHandler) Option
type OptionFunc ¶
type OptionFunc func(mock Mock)
func (OptionFunc) Apply ¶
func (f OptionFunc) Apply(mock Mock)
type ReturnValue ¶
type ReturnValue interface{}
type ReturnValues ¶
type ReturnValues []ReturnValue
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
Code generated by pegomock.
|
Code generated by pegomock. |
MockGen generates mock implementations of Go interfaces.
|
MockGen generates mock implementations of Go interfaces. |
Package model contains the data model necessary for generating mock implementations.
|
Package model contains the data model necessary for generating mock implementations. |
modelgen
|
|