matchers

package
Version: v0.0.0-...-046742e Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2015 License: MIT, GPL-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Gomega matchers

This package implements the Gomega matchers and does not typically need to be imported. See the docs for Gomega for documentation on the matchers

http://onsi.github.io/gomega/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssignableToTypeOfMatcher

type AssignableToTypeOfMatcher struct {
	Expected interface{}
}

func (*AssignableToTypeOfMatcher) FailureMessage

func (matcher *AssignableToTypeOfMatcher) FailureMessage(actual interface{}) string

func (*AssignableToTypeOfMatcher) Match

func (matcher *AssignableToTypeOfMatcher) Match(actual interface{}) (success bool, err error)

func (*AssignableToTypeOfMatcher) NegatedFailureMessage

func (matcher *AssignableToTypeOfMatcher) NegatedFailureMessage(actual interface{}) string

type BeClosedMatcher

type BeClosedMatcher struct {
}

func (*BeClosedMatcher) FailureMessage

func (matcher *BeClosedMatcher) FailureMessage(actual interface{}) (message string)

func (*BeClosedMatcher) Match

func (matcher *BeClosedMatcher) Match(actual interface{}) (success bool, err error)

func (*BeClosedMatcher) NegatedFailureMessage

func (matcher *BeClosedMatcher) NegatedFailureMessage(actual interface{}) (message string)

type BeEmptyMatcher

type BeEmptyMatcher struct {
}

func (*BeEmptyMatcher) FailureMessage

func (matcher *BeEmptyMatcher) FailureMessage(actual interface{}) (message string)

func (*BeEmptyMatcher) Match

func (matcher *BeEmptyMatcher) Match(actual interface{}) (success bool, err error)

func (*BeEmptyMatcher) NegatedFailureMessage

func (matcher *BeEmptyMatcher) NegatedFailureMessage(actual interface{}) (message string)

type BeEquivalentToMatcher

type BeEquivalentToMatcher struct {
	Expected interface{}
}

func (*BeEquivalentToMatcher) FailureMessage

func (matcher *BeEquivalentToMatcher) FailureMessage(actual interface{}) (message string)

func (*BeEquivalentToMatcher) Match

func (matcher *BeEquivalentToMatcher) Match(actual interface{}) (success bool, err error)

func (*BeEquivalentToMatcher) NegatedFailureMessage

func (matcher *BeEquivalentToMatcher) NegatedFailureMessage(actual interface{}) (message string)

type BeFalseMatcher

type BeFalseMatcher struct {
}

func (*BeFalseMatcher) FailureMessage

func (matcher *BeFalseMatcher) FailureMessage(actual interface{}) (message string)

func (*BeFalseMatcher) Match

func (matcher *BeFalseMatcher) Match(actual interface{}) (success bool, err error)

func (*BeFalseMatcher) NegatedFailureMessage

func (matcher *BeFalseMatcher) NegatedFailureMessage(actual interface{}) (message string)

type BeNilMatcher

type BeNilMatcher struct {
}

func (*BeNilMatcher) FailureMessage

func (matcher *BeNilMatcher) FailureMessage(actual interface{}) (message string)

func (*BeNilMatcher) Match

func (matcher *BeNilMatcher) Match(actual interface{}) (success bool, err error)

func (*BeNilMatcher) NegatedFailureMessage

func (matcher *BeNilMatcher) NegatedFailureMessage(actual interface{}) (message string)

type BeNumericallyMatcher

type BeNumericallyMatcher struct {
	Comparator string
	CompareTo  []interface{}
}

func (*BeNumericallyMatcher) FailureMessage

func (matcher *BeNumericallyMatcher) FailureMessage(actual interface{}) (message string)

func (*BeNumericallyMatcher) Match

func (matcher *BeNumericallyMatcher) Match(actual interface{}) (success bool, err error)

func (*BeNumericallyMatcher) NegatedFailureMessage

func (matcher *BeNumericallyMatcher) NegatedFailureMessage(actual interface{}) (message string)

type BeSentMatcher

type BeSentMatcher struct {
	Arg interface{}
	// contains filtered or unexported fields
}

func (*BeSentMatcher) FailureMessage

func (matcher *BeSentMatcher) FailureMessage(actual interface{}) (message string)

func (*BeSentMatcher) Match

func (matcher *BeSentMatcher) Match(actual interface{}) (success bool, err error)

func (*BeSentMatcher) MatchMayChangeInTheFuture

func (matcher *BeSentMatcher) MatchMayChangeInTheFuture(actual interface{}) bool

func (*BeSentMatcher) NegatedFailureMessage

func (matcher *BeSentMatcher) NegatedFailureMessage(actual interface{}) (message string)

type BeTemporallyMatcher

type BeTemporallyMatcher struct {
	Comparator string
	CompareTo  time.Time
	Threshold  []time.Duration
}

func (*BeTemporallyMatcher) FailureMessage

func (matcher *BeTemporallyMatcher) FailureMessage(actual interface{}) (message string)

func (*BeTemporallyMatcher) Match

func (matcher *BeTemporallyMatcher) Match(actual interface{}) (bool, error)

func (*BeTemporallyMatcher) NegatedFailureMessage

func (matcher *BeTemporallyMatcher) NegatedFailureMessage(actual interface{}) (message string)

type BeTrueMatcher

type BeTrueMatcher struct {
}

func (*BeTrueMatcher) FailureMessage

func (matcher *BeTrueMatcher) FailureMessage(actual interface{}) (message string)

func (*BeTrueMatcher) Match

func (matcher *BeTrueMatcher) Match(actual interface{}) (success bool, err error)

func (*BeTrueMatcher) NegatedFailureMessage

func (matcher *BeTrueMatcher) NegatedFailureMessage(actual interface{}) (message string)

type BeZeroMatcher

type BeZeroMatcher struct {
}

func (*BeZeroMatcher) FailureMessage

func (matcher *BeZeroMatcher) FailureMessage(actual interface{}) (message string)

func (*BeZeroMatcher) Match

func (matcher *BeZeroMatcher) Match(actual interface{}) (success bool, err error)

func (*BeZeroMatcher) NegatedFailureMessage

func (matcher *BeZeroMatcher) NegatedFailureMessage(actual interface{}) (message string)

type ConsistOfMatcher

type ConsistOfMatcher struct {
	Elements []interface{}
}

func (*ConsistOfMatcher) FailureMessage

func (matcher *ConsistOfMatcher) FailureMessage(actual interface{}) (message string)

func (*ConsistOfMatcher) Match

func (matcher *ConsistOfMatcher) Match(actual interface{}) (success bool, err error)

func (*ConsistOfMatcher) NegatedFailureMessage

func (matcher *ConsistOfMatcher) NegatedFailureMessage(actual interface{}) (message string)

type ContainElementMatcher

type ContainElementMatcher struct {
	Element interface{}
}

func (*ContainElementMatcher) FailureMessage

func (matcher *ContainElementMatcher) FailureMessage(actual interface{}) (message string)

func (*ContainElementMatcher) Match

func (matcher *ContainElementMatcher) Match(actual interface{}) (success bool, err error)

func (*ContainElementMatcher) NegatedFailureMessage

func (matcher *ContainElementMatcher) NegatedFailureMessage(actual interface{}) (message string)

type ContainSubstringMatcher

type ContainSubstringMatcher struct {
	Substr string
	Args   []interface{}
}

func (*ContainSubstringMatcher) FailureMessage

func (matcher *ContainSubstringMatcher) FailureMessage(actual interface{}) (message string)

func (*ContainSubstringMatcher) Match

func (matcher *ContainSubstringMatcher) Match(actual interface{}) (success bool, err error)

func (*ContainSubstringMatcher) NegatedFailureMessage

func (matcher *ContainSubstringMatcher) NegatedFailureMessage(actual interface{}) (message string)

type EqualMatcher

type EqualMatcher struct {
	Expected interface{}
}

func (*EqualMatcher) FailureMessage

func (matcher *EqualMatcher) FailureMessage(actual interface{}) (message string)

func (*EqualMatcher) Match

func (matcher *EqualMatcher) Match(actual interface{}) (success bool, err error)

func (*EqualMatcher) NegatedFailureMessage

func (matcher *EqualMatcher) NegatedFailureMessage(actual interface{}) (message string)

type HaveKeyMatcher

type HaveKeyMatcher struct {
	Key interface{}
}

func (*HaveKeyMatcher) FailureMessage

func (matcher *HaveKeyMatcher) FailureMessage(actual interface{}) (message string)

func (*HaveKeyMatcher) Match

func (matcher *HaveKeyMatcher) Match(actual interface{}) (success bool, err error)

func (*HaveKeyMatcher) NegatedFailureMessage

func (matcher *HaveKeyMatcher) NegatedFailureMessage(actual interface{}) (message string)

type HaveKeyWithValueMatcher

type HaveKeyWithValueMatcher struct {
	Key   interface{}
	Value interface{}
}

func (*HaveKeyWithValueMatcher) FailureMessage

func (matcher *HaveKeyWithValueMatcher) FailureMessage(actual interface{}) (message string)

func (*HaveKeyWithValueMatcher) Match

func (matcher *HaveKeyWithValueMatcher) Match(actual interface{}) (success bool, err error)

func (*HaveKeyWithValueMatcher) NegatedFailureMessage

func (matcher *HaveKeyWithValueMatcher) NegatedFailureMessage(actual interface{}) (message string)

type HaveLenMatcher

type HaveLenMatcher struct {
	Count int
}

func (*HaveLenMatcher) FailureMessage

func (matcher *HaveLenMatcher) FailureMessage(actual interface{}) (message string)

func (*HaveLenMatcher) Match

func (matcher *HaveLenMatcher) Match(actual interface{}) (success bool, err error)

func (*HaveLenMatcher) NegatedFailureMessage

func (matcher *HaveLenMatcher) NegatedFailureMessage(actual interface{}) (message string)

type HaveOccurredMatcher

type HaveOccurredMatcher struct {
}

func (*HaveOccurredMatcher) FailureMessage

func (matcher *HaveOccurredMatcher) FailureMessage(actual interface{}) (message string)

func (*HaveOccurredMatcher) Match

func (matcher *HaveOccurredMatcher) Match(actual interface{}) (success bool, err error)

func (*HaveOccurredMatcher) NegatedFailureMessage

func (matcher *HaveOccurredMatcher) NegatedFailureMessage(actual interface{}) (message string)

type HavePrefixMatcher

type HavePrefixMatcher struct {
	Prefix string
	Args   []interface{}
}

func (*HavePrefixMatcher) FailureMessage

func (matcher *HavePrefixMatcher) FailureMessage(actual interface{}) (message string)

func (*HavePrefixMatcher) Match

func (matcher *HavePrefixMatcher) Match(actual interface{}) (success bool, err error)

func (*HavePrefixMatcher) NegatedFailureMessage

func (matcher *HavePrefixMatcher) NegatedFailureMessage(actual interface{}) (message string)

type HaveSuffixMatcher

type HaveSuffixMatcher struct {
	Suffix string
	Args   []interface{}
}

func (*HaveSuffixMatcher) FailureMessage

func (matcher *HaveSuffixMatcher) FailureMessage(actual interface{}) (message string)

func (*HaveSuffixMatcher) Match

func (matcher *HaveSuffixMatcher) Match(actual interface{}) (success bool, err error)

func (*HaveSuffixMatcher) NegatedFailureMessage

func (matcher *HaveSuffixMatcher) NegatedFailureMessage(actual interface{}) (message string)

type MatchErrorMatcher

type MatchErrorMatcher struct {
	Expected interface{}
}

func (*MatchErrorMatcher) FailureMessage

func (matcher *MatchErrorMatcher) FailureMessage(actual interface{}) (message string)

func (*MatchErrorMatcher) Match

func (matcher *MatchErrorMatcher) Match(actual interface{}) (success bool, err error)

func (*MatchErrorMatcher) NegatedFailureMessage

func (matcher *MatchErrorMatcher) NegatedFailureMessage(actual interface{}) (message string)

type MatchJSONMatcher

type MatchJSONMatcher struct {
	JSONToMatch interface{}
}

func (*MatchJSONMatcher) FailureMessage

func (matcher *MatchJSONMatcher) FailureMessage(actual interface{}) (message string)

func (*MatchJSONMatcher) Match

func (matcher *MatchJSONMatcher) Match(actual interface{}) (success bool, err error)

func (*MatchJSONMatcher) NegatedFailureMessage

func (matcher *MatchJSONMatcher) NegatedFailureMessage(actual interface{}) (message string)

type MatchRegexpMatcher

type MatchRegexpMatcher struct {
	Regexp string
	Args   []interface{}
}

func (*MatchRegexpMatcher) FailureMessage

func (matcher *MatchRegexpMatcher) FailureMessage(actual interface{}) (message string)

func (*MatchRegexpMatcher) Match

func (matcher *MatchRegexpMatcher) Match(actual interface{}) (success bool, err error)

func (*MatchRegexpMatcher) NegatedFailureMessage

func (matcher *MatchRegexpMatcher) NegatedFailureMessage(actual interface{}) (message string)

type PanicMatcher

type PanicMatcher struct{}

func (*PanicMatcher) FailureMessage

func (matcher *PanicMatcher) FailureMessage(actual interface{}) (message string)

func (*PanicMatcher) Match

func (matcher *PanicMatcher) Match(actual interface{}) (success bool, err error)

func (*PanicMatcher) NegatedFailureMessage

func (matcher *PanicMatcher) NegatedFailureMessage(actual interface{}) (message string)

type ReceiveMatcher

type ReceiveMatcher struct {
	Arg interface{}
	// contains filtered or unexported fields
}

func (*ReceiveMatcher) FailureMessage

func (matcher *ReceiveMatcher) FailureMessage(actual interface{}) (message string)

func (*ReceiveMatcher) Match

func (matcher *ReceiveMatcher) Match(actual interface{}) (success bool, err error)

func (*ReceiveMatcher) MatchMayChangeInTheFuture

func (matcher *ReceiveMatcher) MatchMayChangeInTheFuture(actual interface{}) bool

func (*ReceiveMatcher) NegatedFailureMessage

func (matcher *ReceiveMatcher) NegatedFailureMessage(actual interface{}) (message string)

type SucceedMatcher

type SucceedMatcher struct {
}

func (*SucceedMatcher) FailureMessage

func (matcher *SucceedMatcher) FailureMessage(actual interface{}) (message string)

func (*SucceedMatcher) Match

func (matcher *SucceedMatcher) Match(actual interface{}) (success bool, err error)

func (*SucceedMatcher) NegatedFailureMessage

func (matcher *SucceedMatcher) NegatedFailureMessage(actual interface{}) (message string)

Directories

Path Synopsis
support

Jump to

Keyboard shortcuts

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