matchers

package
v1.27.3 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MIT Imports: 23 Imported by: 565

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AndMatcher

type AndMatcher struct {
	Matchers []types.GomegaMatcher
	// contains filtered or unexported fields
}

func (*AndMatcher) FailureMessage

func (m *AndMatcher) FailureMessage(actual interface{}) (message string)

func (*AndMatcher) Match

func (m *AndMatcher) Match(actual interface{}) (success bool, err error)

func (*AndMatcher) MatchMayChangeInTheFuture

func (m *AndMatcher) MatchMayChangeInTheFuture(actual interface{}) bool

func (*AndMatcher) NegatedFailureMessage

func (m *AndMatcher) NegatedFailureMessage(actual interface{}) (message string)

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 BeADirectoryMatcher

type BeADirectoryMatcher struct {
	// contains filtered or unexported fields
}

func (*BeADirectoryMatcher) FailureMessage

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

func (*BeADirectoryMatcher) Match

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

func (*BeADirectoryMatcher) NegatedFailureMessage

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

type BeARegularFileMatcher

type BeARegularFileMatcher struct {
	// contains filtered or unexported fields
}

func (*BeARegularFileMatcher) FailureMessage

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

func (*BeARegularFileMatcher) Match

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

func (*BeARegularFileMatcher) NegatedFailureMessage

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

type BeAnExistingFileMatcher

type BeAnExistingFileMatcher struct {
	// contains filtered or unexported fields
}

func (*BeAnExistingFileMatcher) FailureMessage

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

func (*BeAnExistingFileMatcher) Match

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

func (*BeAnExistingFileMatcher) NegatedFailureMessage

func (matcher *BeAnExistingFileMatcher) NegatedFailureMessage(actual interface{}) (message 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 BeComparableToMatcher added in v1.20.0

type BeComparableToMatcher struct {
	Expected interface{}
	Options  cmp.Options
}

func (*BeComparableToMatcher) FailureMessage added in v1.20.0

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

func (*BeComparableToMatcher) Match added in v1.20.0

func (matcher *BeComparableToMatcher) Match(actual interface{}) (success bool, matchErr error)

func (*BeComparableToMatcher) NegatedFailureMessage added in v1.20.0

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

type BeElementOfMatcher added in v1.6.0

type BeElementOfMatcher struct {
	Elements []interface{}
}

func (*BeElementOfMatcher) FailureMessage added in v1.6.0

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

func (*BeElementOfMatcher) Match added in v1.6.0

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

func (*BeElementOfMatcher) NegatedFailureMessage added in v1.6.0

func (matcher *BeElementOfMatcher) 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 BeIdenticalToMatcher

type BeIdenticalToMatcher struct {
	Expected interface{}
}

func (*BeIdenticalToMatcher) FailureMessage

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

func (*BeIdenticalToMatcher) Match

func (matcher *BeIdenticalToMatcher) Match(actual interface{}) (success bool, matchErr error)

func (*BeIdenticalToMatcher) NegatedFailureMessage

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

type BeKeyOfMatcher added in v1.21.0

type BeKeyOfMatcher struct {
	Map interface{}
}

func (*BeKeyOfMatcher) FailureMessage added in v1.21.0

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

func (*BeKeyOfMatcher) Match added in v1.21.0

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

func (*BeKeyOfMatcher) NegatedFailureMessage added in v1.21.0

func (matcher *BeKeyOfMatcher) 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) FormatFailureMessage added in v1.4.2

func (matcher *BeNumericallyMatcher) FormatFailureMessage(actual interface{}, negated bool) (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{}
	// contains filtered or unexported fields
}

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{}
	Result  []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 ContainElementsMatcher added in v1.9.0

type ContainElementsMatcher struct {
	Elements []interface{}
	// contains filtered or unexported fields
}

func (*ContainElementsMatcher) FailureMessage added in v1.9.0

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

func (*ContainElementsMatcher) Match added in v1.9.0

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

func (*ContainElementsMatcher) NegatedFailureMessage added in v1.9.0

func (matcher *ContainElementsMatcher) 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 HaveCapMatcher

type HaveCapMatcher struct {
	Count int
}

func (*HaveCapMatcher) FailureMessage

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

func (*HaveCapMatcher) Match

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

func (*HaveCapMatcher) NegatedFailureMessage

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

type HaveEachMatcher added in v1.19.0

type HaveEachMatcher struct {
	Element interface{}
}

func (*HaveEachMatcher) FailureMessage added in v1.19.0

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

FailureMessage returns a suitable failure message.

func (*HaveEachMatcher) Match added in v1.19.0

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

func (*HaveEachMatcher) NegatedFailureMessage added in v1.19.0

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

NegatedFailureMessage returns a suitable negated failure message.

type HaveExactElementsMatcher added in v1.27.0

type HaveExactElementsMatcher struct {
	Elements []interface{}
	// contains filtered or unexported fields
}

func (*HaveExactElementsMatcher) FailureMessage added in v1.27.0

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

func (*HaveExactElementsMatcher) Match added in v1.27.0

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

func (*HaveExactElementsMatcher) NegatedFailureMessage added in v1.27.0

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

type HaveExistingFieldMatcher added in v1.20.0

type HaveExistingFieldMatcher struct {
	Field string
}

func (*HaveExistingFieldMatcher) FailureMessage added in v1.20.0

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

func (*HaveExistingFieldMatcher) Match added in v1.20.0

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

func (*HaveExistingFieldMatcher) NegatedFailureMessage added in v1.20.0

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

type HaveFieldMatcher added in v1.17.0

type HaveFieldMatcher struct {
	Field    string
	Expected interface{}
	// contains filtered or unexported fields
}

func (*HaveFieldMatcher) FailureMessage added in v1.17.0

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

func (*HaveFieldMatcher) Match added in v1.17.0

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

func (*HaveFieldMatcher) NegatedFailureMessage added in v1.17.0

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

type HaveHTTPBodyMatcher added in v1.16.0

type HaveHTTPBodyMatcher struct {
	Expected interface{}
	// contains filtered or unexported fields
}

func (*HaveHTTPBodyMatcher) FailureMessage added in v1.16.0

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

func (*HaveHTTPBodyMatcher) Match added in v1.16.0

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

func (*HaveHTTPBodyMatcher) NegatedFailureMessage added in v1.16.0

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

type HaveHTTPHeaderWithValueMatcher added in v1.16.0

type HaveHTTPHeaderWithValueMatcher struct {
	Header string
	Value  interface{}
}

func (*HaveHTTPHeaderWithValueMatcher) FailureMessage added in v1.16.0

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

func (*HaveHTTPHeaderWithValueMatcher) Match added in v1.16.0

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

func (*HaveHTTPHeaderWithValueMatcher) NegatedFailureMessage added in v1.16.0

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

type HaveHTTPStatusMatcher added in v1.10.0

type HaveHTTPStatusMatcher struct {
	Expected []interface{}
}

func (*HaveHTTPStatusMatcher) FailureMessage added in v1.10.0

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

func (*HaveHTTPStatusMatcher) Match added in v1.10.0

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

func (*HaveHTTPStatusMatcher) NegatedFailureMessage added in v1.10.0

func (matcher *HaveHTTPStatusMatcher) 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 HaveValueMatcher added in v1.18.0

type HaveValueMatcher struct {
	Matcher types.GomegaMatcher // the matcher to apply to the "resolved" actual value.
	// contains filtered or unexported fields
}

func (*HaveValueMatcher) FailureMessage added in v1.18.0

func (m *HaveValueMatcher) FailureMessage(_ interface{}) (message string)

func (*HaveValueMatcher) Match added in v1.18.0

func (m *HaveValueMatcher) Match(actual interface{}) (bool, error)

func (*HaveValueMatcher) NegatedFailureMessage added in v1.18.0

func (m *HaveValueMatcher) NegatedFailureMessage(_ 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{}
	// contains filtered or unexported fields
}

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 MatchXMLMatcher added in v1.2.0

type MatchXMLMatcher struct {
	XMLToMatch interface{}
}

func (*MatchXMLMatcher) FailureMessage added in v1.2.0

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

func (*MatchXMLMatcher) Match added in v1.2.0

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

func (*MatchXMLMatcher) NegatedFailureMessage added in v1.2.0

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

type MatchYAMLMatcher

type MatchYAMLMatcher struct {
	YAMLToMatch interface{}
	// contains filtered or unexported fields
}

func (*MatchYAMLMatcher) FailureMessage

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

func (*MatchYAMLMatcher) Match

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

func (*MatchYAMLMatcher) NegatedFailureMessage

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

type NotMatcher

type NotMatcher struct {
	Matcher types.GomegaMatcher
}

func (*NotMatcher) FailureMessage

func (m *NotMatcher) FailureMessage(actual interface{}) (message string)

func (*NotMatcher) Match

func (m *NotMatcher) Match(actual interface{}) (bool, error)

func (*NotMatcher) MatchMayChangeInTheFuture

func (m *NotMatcher) MatchMayChangeInTheFuture(actual interface{}) bool

func (*NotMatcher) NegatedFailureMessage

func (m *NotMatcher) NegatedFailureMessage(actual interface{}) (message string)

type OrMatcher

type OrMatcher struct {
	Matchers []types.GomegaMatcher
	// contains filtered or unexported fields
}

func (*OrMatcher) FailureMessage

func (m *OrMatcher) FailureMessage(actual interface{}) (message string)

func (*OrMatcher) Match

func (m *OrMatcher) Match(actual interface{}) (success bool, err error)

func (*OrMatcher) MatchMayChangeInTheFuture

func (m *OrMatcher) MatchMayChangeInTheFuture(actual interface{}) bool

func (*OrMatcher) NegatedFailureMessage

func (m *OrMatcher) NegatedFailureMessage(actual interface{}) (message string)

type PanicMatcher

type PanicMatcher struct {
	Expected interface{}
	// contains filtered or unexported fields
}

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 SatisfyMatcher added in v1.12.0

type SatisfyMatcher struct {
	Predicate interface{}
	// contains filtered or unexported fields
}

func NewSatisfyMatcher added in v1.12.0

func NewSatisfyMatcher(predicate interface{}) *SatisfyMatcher

func (*SatisfyMatcher) FailureMessage added in v1.12.0

func (m *SatisfyMatcher) FailureMessage(actual interface{}) (message string)

func (*SatisfyMatcher) Match added in v1.12.0

func (m *SatisfyMatcher) Match(actual interface{}) (success bool, err error)

func (*SatisfyMatcher) NegatedFailureMessage added in v1.12.0

func (m *SatisfyMatcher) 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)

type WithTransformMatcher

type WithTransformMatcher struct {
	// input
	Transform interface{} // must be a function of one parameter that returns one value and an optional error
	Matcher   types.GomegaMatcher
	// contains filtered or unexported fields
}

func NewWithTransformMatcher

func NewWithTransformMatcher(transform interface{}, matcher types.GomegaMatcher) *WithTransformMatcher

func (*WithTransformMatcher) FailureMessage

func (m *WithTransformMatcher) FailureMessage(_ interface{}) (message string)

func (*WithTransformMatcher) Match

func (m *WithTransformMatcher) Match(actual interface{}) (bool, error)

func (*WithTransformMatcher) MatchMayChangeInTheFuture

func (m *WithTransformMatcher) MatchMayChangeInTheFuture(_ interface{}) bool

func (*WithTransformMatcher) NegatedFailureMessage

func (m *WithTransformMatcher) NegatedFailureMessage(_ 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