matchers

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 MatchGoldenYAML

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

func MatchProto

func MatchProto(expected interface{}) types.GomegaMatcher

Types

type GoldenMatcher added in v1.8.1

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

func (*GoldenMatcher) FailureMessage added in v1.8.1

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

func (*GoldenMatcher) Match added in v1.8.1

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

func (*GoldenMatcher) NegatedFailureMessage added in v1.8.1

func (g *GoldenMatcher) NegatedFailureMessage(actual interface{}) (message 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{}) (message string)

func (*ProtoMatcher) Match

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

func (*ProtoMatcher) NegatedFailureMessage

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

Jump to

Keyboard shortcuts

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