Documentation ¶
Index ¶
- func AnyBool() bool
- func AnyBoolSlice() []bool
- func AnyComplex128() complex128
- func AnyComplex128Slice() []complex128
- func AnyComplex64() complex64
- func AnyComplex64Slice() []complex64
- func AnyFloat32() float32
- func AnyFloat32Slice() []float32
- func AnyFloat64() float64
- func AnyFloat64Slice() []float64
- func AnyInt() int
- func AnyInt16() int16
- func AnyInt16Slice() []int16
- func AnyInt32() int32
- func AnyInt32Slice() []int32
- func AnyInt64() int64
- func AnyInt64Slice() []int64
- func AnyInt8() int8
- func AnyInt8Slice() []int8
- func AnyIntSlice() []int
- func AnyString() string
- func AnyStringSlice() []string
- func AnyUint() uint
- func AnyUint16() uint16
- func AnyUint16Slice() []uint16
- func AnyUint32() uint32
- func AnyUint32Slice() []uint32
- func AnyUint64() uint64
- func AnyUint64Slice() []uint64
- func AnyUint8() uint8
- func AnyUint8Slice() []uint8
- func AnyUintSlice() []uint
- func AnyUintptr() uintptr
- func AnyUintptrSlice() []uintptr
- func DumpInvocationsFor(mock Mock)
- func EqBool(value bool) bool
- func EqComplex128(value complex128) complex128
- func EqComplex64(value complex64) complex64
- func EqFloat32(value float32) float32
- func EqFloat64(value float64) float64
- func EqInt(value int) int
- func EqInt16(value int16) int16
- func EqInt32(value int32) int32
- func EqInt64(value int64) int64
- func EqInt8(value int8) int8
- func EqString(value string) string
- func EqUint(value uint) uint
- func EqUint16(value uint16) uint16
- func EqUint32(value uint32) uint32
- func EqUint64(value uint64) uint64
- func EqUint8(value uint8) uint8
- func EqUintptr(value uintptr) uintptr
- func RegisterMatcher(matcher Matcher)
- func RegisterMockFailHandler(handler FailHandler)
- func RegisterMockTestingT(t *testing.T)
- func SDumpInvocationsFor(mock Mock) string
- func When(invocation ...interface{}) *ongoingStubbing
- type AnyMatcher
- 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 Matcher, ...) []MethodInvocation
- type InOrderContext
- type Matcher
- type Matchers
- type MethodInvocation
- type Mock
- type Param
- type ReturnValue
- type ReturnValues
- type Stubbing
- type Stubbings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyBoolSlice ¶
func AnyBoolSlice() []bool
func AnyComplex128 ¶
func AnyComplex128() complex128
func AnyComplex128Slice ¶
func AnyComplex128Slice() []complex128
func AnyComplex64 ¶
func AnyComplex64() complex64
func AnyComplex64Slice ¶
func AnyComplex64Slice() []complex64
func AnyFloat32 ¶
func AnyFloat32() float32
func AnyFloat32Slice ¶
func AnyFloat32Slice() []float32
func AnyFloat64 ¶
func AnyFloat64() float64
func AnyFloat64Slice ¶
func AnyFloat64Slice() []float64
func AnyInt16Slice ¶
func AnyInt16Slice() []int16
func AnyInt32Slice ¶
func AnyInt32Slice() []int32
func AnyInt64Slice ¶
func AnyInt64Slice() []int64
func AnyInt8Slice ¶
func AnyInt8Slice() []int8
func AnyIntSlice ¶
func AnyIntSlice() []int
func AnyStringSlice ¶
func AnyStringSlice() []string
func AnyUint16Slice ¶
func AnyUint16Slice() []uint16
func AnyUint32Slice ¶
func AnyUint32Slice() []uint32
func AnyUint64Slice ¶
func AnyUint64Slice() []uint64
func AnyUint8Slice ¶
func AnyUint8Slice() []uint8
func AnyUintSlice ¶
func AnyUintSlice() []uint
func AnyUintptr ¶
func AnyUintptr() uintptr
func AnyUintptrSlice ¶
func AnyUintptrSlice() []uintptr
func DumpInvocationsFor ¶
func DumpInvocationsFor(mock Mock)
func EqComplex128 ¶
func EqComplex128(value complex128) complex128
func EqComplex64 ¶
func RegisterMatcher ¶
func RegisterMatcher(matcher Matcher)
func RegisterMockFailHandler ¶
func RegisterMockFailHandler(handler FailHandler)
func RegisterMockTestingT ¶
func SDumpInvocationsFor ¶
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 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 BuildTestingTGomegaFailHandler ¶
func BuildTestingTGomegaFailHandler(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 Matcher, methodName string, params []Param) []MethodInvocation
type InOrderContext ¶
type InOrderContext struct {
// contains filtered or unexported fields
}
type Matcher ¶
Matcher ... it is guaranteed that FailureMessage will always be called after Matches so an implementation can save state
type MethodInvocation ¶
type MethodInvocation struct {
// contains filtered or unexported fields
}
type ReturnValue ¶
type ReturnValue interface{}
type ReturnValues ¶
type ReturnValues []ReturnValue
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
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
|
|
Click to show internal directories.
Click to hide internal directories.