Documentation ¶
Index ¶
- Constants
- func ExpectSerializedObjectBSON(object interface{}, expected interface{})
- func ExpectSerializedObjectJSON(object interface{}, expected interface{})
- func FutureFarTime() time.Time
- func FutureNearTime() time.Time
- func MarshalRequestBody(object interface{}) []byte
- func MarshalResponseBody(object interface{}) []byte
- func MatchArray(elements ...interface{}) gomegaTypes.GomegaMatcher
- func MatchTime(datum *time.Time) gomegaTypes.GomegaMatcher
- func MustBool(value bool, err error) bool
- func MustBytes(value []byte, err error) []byte
- func MustDuration(value time.Duration, err error) time.Duration
- func MustFloat64(value float64, err error) float64
- func MustInt(value int, err error) int
- func MustString(value string, err error) string
- func MustStringArray(value []string, err error) []string
- func MustTime(value time.Time, err error) time.Time
- func NewObjectFromBool(value bool, objectFormat ObjectFormat) interface{}
- func NewObjectFromDuration(value time.Duration, objectFormat ObjectFormat) interface{}
- func NewObjectFromFloat64(value float64, objectFormat ObjectFormat) interface{}
- func NewObjectFromInt(value int, objectFormat ObjectFormat) interface{}
- func NewObjectFromString(value string, objectFormat ObjectFormat) interface{}
- func NewObjectFromStringArray(value []string, objectFormat ObjectFormat) interface{}
- func NewObjectFromTime(value time.Time, objectFormat ObjectFormat) interface{}
- func PastFarTime() time.Time
- func PastNearTime() time.Time
- func RandomBool() bool
- func RandomBytes() []byte
- func RandomBytesFromRange(minimumLength int, maximumLength int) []byte
- func RandomBytesLengthMaximum() int
- func RandomBytesLengthMinimum() int
- func RandomDuration() time.Duration
- func RandomDurationFromArray(array []time.Duration) time.Duration
- func RandomDurationFromRange(minimum time.Duration, maximum time.Duration) time.Duration
- func RandomDurationMaximum() time.Duration
- func RandomDurationMinimum() time.Duration
- func RandomFloat64() float64
- func RandomFloat64FromArray(array []float64) float64
- func RandomFloat64FromRange(minimum float64, maximum float64) float64
- func RandomFloat64Maximum() float64
- func RandomFloat64Minimum() float64
- func RandomInt() int
- func RandomIntFromArray(array []int) int
- func RandomIntFromRange(minimum int, maximum int) int
- func RandomIntMaximum() int
- func RandomIntMinimum() int
- func RandomString() string
- func RandomStringArray() []string
- func RandomStringArrayFromRange(minimumLength int, maximumLength int) []string
- func RandomStringArrayFromRangeAndArrayWithDuplicates(minimumLength int, maximumLength int, array []string) []string
- func RandomStringArrayFromRangeAndArrayWithoutDuplicates(minimumLength int, maximumLength int, array []string) []string
- func RandomStringArrayFromRangeAndCharset(minimumLength int, maximumLength int, charset string) []string
- func RandomStringArrayFromRangeAndGeneratorWithDuplicates(minimumLength int, maximumLength int, generator func() string) []string
- func RandomStringArrayFromRangeAndGeneratorWithoutDuplicates(minimumLength int, maximumLength int, generator func() string) []string
- func RandomStringArrayLengthMaximum() int
- func RandomStringArrayLengthMinimum() int
- func RandomStringFromArray(array []string) string
- func RandomStringFromCharset(charset string) string
- func RandomStringFromRange(minimumLength int, maximumLength int) string
- func RandomStringFromRangeAndCharset(minimumLength int, maximumLength int, charset string) string
- func RandomStringLengthMaximum() int
- func RandomStringLengthMinimum() int
- func RandomTemporaryDirectory() string
- func RandomTemporaryFile() *os.File
- func RandomTime() time.Time
- func RandomTimeFromArray(array []time.Time) time.Time
- func RandomTimeFromRange(minimum time.Time, maximum time.Time) time.Time
- func RandomTimeMaximum() time.Time
- func RandomTimeMinimum() time.Time
- func Test(t *testing.T)
- type Closer
- type MatchArrayMatcher
- type ObjectFormat
- type ReadOutput
- type Reader
Constants ¶
View Source
const ( CharsetLowercase = "abcdefghijklmnopqrstuvwxyz" CharsetUppercase = "ABCDEFGHIJKLMNOPQRSTUVWYXZ" CharsetNumeric = "1234567890" CharsetWhitespace = " " CharsetSymbols = "!\"#$%&'()*+,-./:;<=>@\\]^_`{|}~" CharsetUnicode = "" /* 146-byte string literal not displayed */ CharsetEmoji = "😀🤣🤩😈👻😼💔💯💣👏💪🧠🧚🏄👣🐥🦖🥨🍕🍩🌎" CharsetAlpha = CharsetUppercase + CharsetLowercase CharsetAlphaNumeric = CharsetAlpha + CharsetNumeric CharsetText = CharsetAlphaNumeric + CharsetWhitespace + CharsetSymbols + CharsetUnicode + CharsetEmoji CharsetHexidecimalLowercase = CharsetNumeric + "abcdef" )
Variables ¶
This section is empty.
Functions ¶
func ExpectSerializedObjectBSON ¶ added in v1.31.0
func ExpectSerializedObjectBSON(object interface{}, expected interface{})
func ExpectSerializedObjectJSON ¶ added in v1.31.0
func ExpectSerializedObjectJSON(object interface{}, expected interface{})
func FutureFarTime ¶ added in v1.31.0
func FutureNearTime ¶ added in v1.31.0
func MarshalRequestBody ¶ added in v1.29.0
func MarshalRequestBody(object interface{}) []byte
func MarshalResponseBody ¶ added in v1.30.0
func MarshalResponseBody(object interface{}) []byte
func MatchArray ¶ added in v1.31.0
func MatchArray(elements ...interface{}) gomegaTypes.GomegaMatcher
func MatchTime ¶ added in v1.31.0
func MatchTime(datum *time.Time) gomegaTypes.GomegaMatcher
func MustDuration ¶ added in v1.31.0
func MustFloat64 ¶ added in v1.31.0
func MustString ¶ added in v1.31.0
func MustStringArray ¶ added in v1.31.0
func NewObjectFromBool ¶ added in v1.27.0
func NewObjectFromBool(value bool, objectFormat ObjectFormat) interface{}
func NewObjectFromDuration ¶ added in v1.27.0
func NewObjectFromDuration(value time.Duration, objectFormat ObjectFormat) interface{}
func NewObjectFromFloat64 ¶ added in v1.27.0
func NewObjectFromFloat64(value float64, objectFormat ObjectFormat) interface{}
func NewObjectFromInt ¶ added in v1.27.0
func NewObjectFromInt(value int, objectFormat ObjectFormat) interface{}
func NewObjectFromString ¶ added in v1.27.0
func NewObjectFromString(value string, objectFormat ObjectFormat) interface{}
func NewObjectFromStringArray ¶ added in v1.27.0
func NewObjectFromStringArray(value []string, objectFormat ObjectFormat) interface{}
func NewObjectFromTime ¶ added in v1.27.0
func NewObjectFromTime(value time.Time, objectFormat ObjectFormat) interface{}
func PastFarTime ¶ added in v1.31.0
func PastNearTime ¶ added in v1.31.0
func RandomBool ¶ added in v1.26.0
func RandomBool() bool
func RandomBytes ¶ added in v1.27.0
func RandomBytes() []byte
func RandomBytesFromRange ¶ added in v1.27.0
func RandomBytesLengthMaximum ¶ added in v1.27.0
func RandomBytesLengthMaximum() int
func RandomBytesLengthMinimum ¶ added in v1.27.0
func RandomBytesLengthMinimum() int
func RandomDuration ¶ added in v1.27.0
func RandomDurationFromArray ¶ added in v1.27.0
func RandomDurationFromRange ¶ added in v1.27.0
func RandomDurationMaximum ¶ added in v1.27.0
func RandomDurationMinimum ¶ added in v1.27.0
func RandomFloat64 ¶ added in v1.27.0
func RandomFloat64() float64
func RandomFloat64FromArray ¶ added in v1.26.0
func RandomFloat64FromRange ¶ added in v1.24.0
func RandomFloat64Maximum ¶ added in v1.27.0
func RandomFloat64Maximum() float64
func RandomFloat64Minimum ¶ added in v1.27.0
func RandomFloat64Minimum() float64
func RandomIntFromArray ¶ added in v1.26.0
func RandomIntFromRange ¶ added in v1.24.0
func RandomIntMaximum ¶ added in v1.27.0
func RandomIntMaximum() int
func RandomIntMinimum ¶ added in v1.27.0
func RandomIntMinimum() int
func RandomString ¶ added in v1.27.0
func RandomString() string
func RandomStringArray ¶ added in v1.27.0
func RandomStringArray() []string
func RandomStringArrayFromRange ¶ added in v1.27.0
func RandomStringArrayFromRangeAndArrayWithDuplicates ¶ added in v1.27.0
func RandomStringArrayFromRangeAndArrayWithoutDuplicates ¶ added in v1.27.0
func RandomStringArrayFromRangeAndCharset ¶ added in v1.27.0
func RandomStringArrayFromRangeAndGeneratorWithDuplicates ¶ added in v1.27.0
func RandomStringArrayFromRangeAndGeneratorWithoutDuplicates ¶ added in v1.27.0
func RandomStringArrayLengthMaximum ¶ added in v1.27.0
func RandomStringArrayLengthMaximum() int
func RandomStringArrayLengthMinimum ¶ added in v1.27.0
func RandomStringArrayLengthMinimum() int
func RandomStringFromArray ¶ added in v1.26.0
func RandomStringFromCharset ¶ added in v1.27.0
func RandomStringFromRange ¶ added in v1.27.0
func RandomStringFromRangeAndCharset ¶ added in v1.27.0
func RandomStringLengthMaximum ¶ added in v1.27.0
func RandomStringLengthMaximum() int
func RandomStringLengthMinimum ¶ added in v1.27.0
func RandomStringLengthMinimum() int
func RandomTemporaryDirectory ¶ added in v1.27.0
func RandomTemporaryDirectory() string
func RandomTemporaryFile ¶ added in v1.27.0
func RandomTime ¶ added in v1.27.0
func RandomTimeFromRange ¶ added in v1.27.0
func RandomTimeMaximum ¶ added in v1.27.0
func RandomTimeMinimum ¶ added in v1.27.0
Types ¶
type Closer ¶ added in v1.27.0
type Closer struct { CloseInvocations int CloseStub func() error CloseOutputs []error CloseOutput *error }
func (*Closer) AssertOutputsEmpty ¶ added in v1.27.0
func (c *Closer) AssertOutputsEmpty()
type MatchArrayMatcher ¶ added in v1.31.0
type MatchArrayMatcher struct {
Elements []interface{}
}
func (*MatchArrayMatcher) FailureMessage ¶ added in v1.31.0
func (m *MatchArrayMatcher) FailureMessage(actual interface{}) (message string)
func (*MatchArrayMatcher) Match ¶ added in v1.31.0
func (m *MatchArrayMatcher) Match(actual interface{}) (bool, error)
func (*MatchArrayMatcher) NegatedFailureMessage ¶ added in v1.31.0
func (m *MatchArrayMatcher) NegatedFailureMessage(actual interface{}) (message string)
type ObjectFormat ¶ added in v1.27.0
type ObjectFormat int
const ( ObjectFormatBSON ObjectFormat = iota ObjectFormatJSON )
type ReadOutput ¶ added in v1.27.0
type Reader ¶ added in v1.27.0
type Reader struct { ReadInvocations int ReadInputs [][]byte ReadStub func(bites []byte) (int, error) ReadOutputs []ReadOutput ReadOutput *ReadOutput }
func (*Reader) AssertOutputsEmpty ¶ added in v1.27.0
func (r *Reader) AssertOutputsEmpty()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.