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
Index ¶
- type AndMatcher
- type AssignableToTypeOfMatcher
- type BeADirectoryMatcher
- type BeARegularFileMatcher
- type BeAnExistingFileMatcher
- type BeClosedMatcher
- type BeEmptyMatcher
- type BeEquivalentToMatcher
- type BeFalseMatcher
- type BeIdenticalToMatcher
- type BeNilMatcher
- type BeNumericallyMatcher
- type BeSentMatcher
- func (matcher *BeSentMatcher) FailureMessage(actual interface{}) (message string)
- func (matcher *BeSentMatcher) Match(actual interface{}) (success bool, err error)
- func (matcher *BeSentMatcher) MatchMayChangeInTheFuture(actual interface{}) bool
- func (matcher *BeSentMatcher) NegatedFailureMessage(actual interface{}) (message string)
- type BeTemporallyMatcher
- type BeTrueMatcher
- type BeZeroMatcher
- type ConsistOfMatcher
- type ContainElementMatcher
- type ContainSubstringMatcher
- type EqualMatcher
- type HaveCapMatcher
- type HaveKeyMatcher
- type HaveKeyWithValueMatcher
- type HaveLenMatcher
- type HaveOccurredMatcher
- type HavePrefixMatcher
- type HaveSuffixMatcher
- type MatchErrorMatcher
- type MatchJSONMatcher
- type MatchRegexpMatcher
- type MatchYAMLMatcher
- type NotMatcher
- type OrMatcher
- type PanicMatcher
- type ReceiveMatcher
- func (matcher *ReceiveMatcher) FailureMessage(actual interface{}) (message string)
- func (matcher *ReceiveMatcher) Match(actual interface{}) (success bool, err error)
- func (matcher *ReceiveMatcher) MatchMayChangeInTheFuture(actual interface{}) bool
- func (matcher *ReceiveMatcher) NegatedFailureMessage(actual interface{}) (message string)
- type SucceedMatcher
- type WithTransformMatcher
- func (m *WithTransformMatcher) FailureMessage(_ interface{}) (message string)
- func (m *WithTransformMatcher) Match(actual interface{}) (bool, error)
- func (m *WithTransformMatcher) MatchMayChangeInTheFuture(_ interface{}) bool
- func (m *WithTransformMatcher) NegatedFailureMessage(_ interface{}) (message string)
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 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 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 ¶
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 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 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 MatchYAMLMatcher ¶
type MatchYAMLMatcher struct {
YAMLToMatch interface{}
}
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 (*OrMatcher) MatchMayChangeInTheFuture ¶
func (*OrMatcher) NegatedFailureMessage ¶
type PanicMatcher ¶
type PanicMatcher struct {
// 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 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 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)
Source Files ¶
- and.go
- assignable_to_type_of_matcher.go
- be_a_directory.go
- be_a_regular_file.go
- be_an_existing_file.go
- be_closed_matcher.go
- be_empty_matcher.go
- be_equivalent_to_matcher.go
- be_false_matcher.go
- be_identical_to.go
- be_nil_matcher.go
- be_numerically_matcher.go
- be_sent_matcher.go
- be_temporally_matcher.go
- be_true_matcher.go
- be_zero_matcher.go
- consist_of.go
- contain_element_matcher.go
- contain_substring_matcher.go
- equal_matcher.go
- have_cap_matcher.go
- have_key_matcher.go
- have_key_with_value_matcher.go
- have_len_matcher.go
- have_occurred_matcher.go
- have_prefix_matcher.go
- have_suffix_matcher.go
- match_error_matcher.go
- match_json_matcher.go
- match_regexp_matcher.go
- match_yaml_matcher.go
- not.go
- or.go
- panic_matcher.go
- receive_matcher.go
- succeed_matcher.go
- type_support.go
- with_transform.go
Click to show internal directories.
Click to hide internal directories.