Documentation ¶
Index ¶
- func ContainOrderedJSON(json interface{}, keys ...KeyExclusions) types.GomegaMatcher
- func ContainOrderedYAML(YAML interface{}, keys ...KeyExclusions) types.GomegaMatcher
- func ContainUnorderedJSON(json interface{}, keys ...KeyExclusions) types.GomegaMatcher
- func ContainUnorderedYAML(YAML interface{}, keys ...KeyExclusions) types.GomegaMatcher
- func MatchOrderedJSON(json interface{}, keys ...KeyExclusions) types.GomegaMatcher
- func MatchOrderedYAML(YAML interface{}, keys ...KeyExclusions) types.GomegaMatcher
- func MatchUnorderedJSON(json interface{}, keys ...KeyExclusions) types.GomegaMatcher
- func MatchUnorderedYAML(YAML interface{}, keys ...KeyExclusions) types.GomegaMatcher
- type ExpandedJsonMatcher
- type ExpandedYAMLMatcher
- type KeyExclusions
- type OrderedKeys
- type UnmarshalledDeepMatcher
- type UnorderedKeys
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainOrderedJSON ¶
func ContainOrderedJSON(json interface{}, keys ...KeyExclusions) types.GomegaMatcher
This is for json with Ordered lists ie [1,2,3] is not equal to [2,3,1]. This is just like the default match json. This also is a subset match rather then a full match ie [1,2,3] contains [1,2] If you want to have some lists enforce order, add keys exclusions using Add WithUnorderedListKeys( json keys that refer to unordered lists )
func ContainOrderedYAML ¶
func ContainOrderedYAML(YAML interface{}, keys ...KeyExclusions) types.GomegaMatcher
This is for yaml with Ordered lists ie [1,2,3] is not equal to [2,3,1]. This is just like the default match yaml. This also is a subset match rather then a full match ie [1,2,3] contains [1,2] If you want to have some lists enforce order, add keys exclusions using Add WithUnorderedListKeys( YAML keys that refer to unordered lists )
func ContainUnorderedJSON ¶
func ContainUnorderedJSON(json interface{}, keys ...KeyExclusions) types.GomegaMatcher
This is for json with Unordered lists ie [1,2,3] is equal to [2,3,1]. This also is a subset match rather then a full match ie [1,2,3] contains [1,2] If you want to have some lists enforce order, add keys exclusions using Add WithOrderedListKeys( json keys that refer to unordered lists )
func ContainUnorderedYAML ¶
func ContainUnorderedYAML(YAML interface{}, keys ...KeyExclusions) types.GomegaMatcher
This is for yaml with Unordered lists ie [1,2,3] is equal to [2,3,1]. This also is a subset match rather then a full match ie [1,2,3] contains [1,2] If you want to have some lists enforce order, add keys exclusions using Add WithOrderedListKeys( YAML keys that refer to unordered lists )
func MatchOrderedJSON ¶
func MatchOrderedJSON(json interface{}, keys ...KeyExclusions) types.GomegaMatcher
This is for json with Ordered lists ie [1,2,3] is not equal to [2,3,1]. This is just like the default match json. If you want to have some lists enforce order, add keys exclusions using Add WithUnorderedListKeys( json keys that refer to unordered lists )
func MatchOrderedYAML ¶
func MatchOrderedYAML(YAML interface{}, keys ...KeyExclusions) types.GomegaMatcher
This is for yaml with Ordered lists ie [1,2,3] is not equal to [2,3,1]. This is just like the default match yaml. If you want to have some lists enforce order, add keys exclusions using Add WithUnorderedListKeys( YAML keys that refer to unordered lists )
func MatchUnorderedJSON ¶
func MatchUnorderedJSON(json interface{}, keys ...KeyExclusions) types.GomegaMatcher
This is for json with Unordered lists ie [1,2,3] is equal to [2,3,1]. If you want to have some lists enforce order, add keys exclusions using Add WithOrderedListKeys( json keys that refer to unordered lists )
func MatchUnorderedYAML ¶
func MatchUnorderedYAML(YAML interface{}, keys ...KeyExclusions) types.GomegaMatcher
This is for yaml with Unordered lists ie [1,2,3] is equal to [2,3,1]. If you want to have some lists enforce order, add keys exclusions using Add WithOrderedListKeys( YAML keys that refer to unordered lists )
Types ¶
type ExpandedJsonMatcher ¶
type ExpandedJsonMatcher struct { JSONToMatch interface{} DeepMatcher UnmarshalledDeepMatcher // contains filtered or unexported fields }
func (*ExpandedJsonMatcher) FailureMessage ¶
func (matcher *ExpandedJsonMatcher) FailureMessage(actual interface{}) (message string)
func (*ExpandedJsonMatcher) Match ¶
func (matcher *ExpandedJsonMatcher) Match(actual interface{}) (success bool, err error)
func (*ExpandedJsonMatcher) NegatedFailureMessage ¶
func (matcher *ExpandedJsonMatcher) NegatedFailureMessage(actual interface{}) (message string)
type ExpandedYAMLMatcher ¶
type ExpandedYAMLMatcher struct { YAMLToMatch interface{} DeepMatcher UnmarshalledDeepMatcher // contains filtered or unexported fields }
func (*ExpandedYAMLMatcher) FailureMessage ¶
func (matcher *ExpandedYAMLMatcher) FailureMessage(actual interface{}) (message string)
func (*ExpandedYAMLMatcher) Match ¶
func (matcher *ExpandedYAMLMatcher) Match(actual interface{}) (success bool, err error)
func (*ExpandedYAMLMatcher) NegatedFailureMessage ¶
func (matcher *ExpandedYAMLMatcher) NegatedFailureMessage(actual interface{}) (message string)
type KeyExclusions ¶
type OrderedKeys ¶
type OrderedKeys struct {
// contains filtered or unexported fields
}
func NewOrderedKeys ¶
func NewOrderedKeys() OrderedKeys
func WithOrderedListKeys ¶
func WithOrderedListKeys(keys ...interface{}) OrderedKeys
func (OrderedKeys) GetMap ¶
func (k OrderedKeys) GetMap() map[interface{}]bool
func (OrderedKeys) IsOrdered ¶
func (k OrderedKeys) IsOrdered() bool
type UnmarshalledDeepMatcher ¶
type UnorderedKeys ¶
type UnorderedKeys struct {
// contains filtered or unexported fields
}
func NewUnorderedKeys ¶
func NewUnorderedKeys() UnorderedKeys
func WithUnorderedListKeys ¶
func WithUnorderedListKeys(keys ...interface{}) UnorderedKeys
func (UnorderedKeys) GetMap ¶
func (k UnorderedKeys) GetMap() map[interface{}]bool
func (UnorderedKeys) IsOrdered ¶
func (k UnorderedKeys) IsOrdered() bool