matchers

package
v0.0.0-...-83c1a15 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllKeys

func AllKeys(matcher types.GomegaMatcher) types.GomegaMatcher

AllKeys allows you to specify a matcher which all map's keys needs to fulfill to make the test statement successful

func BeValidPort

func BeValidPort() types.GomegaMatcher

func MatchGolden

func MatchGolden(matcherFn MatcherFn, goldenFilePath ...string) types.GomegaMatcher

MatchGolden matches Golden file overriding it with actual content if UPDATE_GOLDEN_FILES is set to true

func MatchGoldenEqual

func MatchGoldenEqual(goldenFilePath ...string) types.GomegaMatcher

func MatchGoldenJSON

func MatchGoldenJSON(goldenFilePath ...string) types.GomegaMatcher

func MatchGoldenXML

func MatchGoldenXML(goldenFilePath ...string) types.GomegaMatcher

func MatchGoldenYAML

func MatchGoldenYAML(goldenFilePath ...string) types.GomegaMatcher

func MatchProto

func MatchProto(expected interface{}) types.GomegaMatcher

Types

type GoldenMatcher

type GoldenMatcher struct {
	MatcherFactory MatcherFn
	Matcher        types.GomegaMatcher
	GoldenFilePath string
}

func (*GoldenMatcher) FailureMessage

func (g *GoldenMatcher) FailureMessage(actual interface{}) string

func (*GoldenMatcher) Match

func (g *GoldenMatcher) Match(actual interface{}) (bool, error)

func (*GoldenMatcher) NegatedFailureMessage

func (g *GoldenMatcher) NegatedFailureMessage(actual interface{}) string

type MatcherFn

type MatcherFn = func(expected interface{}) types.GomegaMatcher

type ProtoMatcher

type ProtoMatcher struct {
	Expected interface{}
}

func (*ProtoMatcher) FailureMessage

func (p *ProtoMatcher) FailureMessage(actual interface{}) string

func (*ProtoMatcher) Match

func (p *ProtoMatcher) Match(actual interface{}) (bool, error)

func (*ProtoMatcher) NegatedFailureMessage

func (p *ProtoMatcher) NegatedFailureMessage(actual interface{}) string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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