mocks

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockVerifier

type MockVerifier struct {
	EqualFn      func(t spectest.TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool
	EqualInvoked bool

	TrueFn      func(t spectest.TestingT, val bool, msgAndArgs ...interface{}) bool
	TrueInvoked bool

	JSONEqFn      func(t spectest.TestingT, expected string, actual string, msgAndArgs ...interface{}) bool
	JSONEqInvoked bool

	FailFn      func(t spectest.TestingT, failureMessage string, msgAndArgs ...interface{}) bool
	FailInvoked bool

	NoErrorFn      func(t spectest.TestingT, err error, msgAndArgs ...interface{}) bool
	NoErrorInvoked bool
}

MockVerifier is a mock of the Verifier interface that is used in tests of spectest

func NewVerifier

func NewVerifier() *MockVerifier

NewVerifier creates a new instance of the MockVerifier

func (*MockVerifier) Equal

func (m *MockVerifier) Equal(t spectest.TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool

Equal mocks the Equal method of the Verifier

func (*MockVerifier) Fail

func (m *MockVerifier) Fail(t spectest.TestingT, failureMessage string, msgAndArgs ...interface{}) bool

Fail mocks the Fail method of the Verifier

func (*MockVerifier) JSONEq

func (m *MockVerifier) JSONEq(t spectest.TestingT, expected string, actual string, msgAndArgs ...interface{}) bool

JSONEq mocks the JSONEq method of the Verifier

func (*MockVerifier) NoError

func (m *MockVerifier) NoError(t spectest.TestingT, err error, msgAndArgs ...interface{}) bool

NoError asserts that a function returned no error

func (*MockVerifier) True

func (m *MockVerifier) True(t spectest.TestingT, val bool, msgAndArgs ...interface{}) bool

True mocks the Equal method of the Verifier

Jump to

Keyboard shortcuts

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