mocks

package
v1.4.10 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: MIT Imports: 2 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 *testing.T, expected, actual interface{}, msgAndArgs ...interface{}) bool
	EqualInvoked bool

	JSONEqFn      func(t *testing.T, expected string, actual string, msgAndArgs ...interface{}) bool
	JSONEqInvoked bool

	FailFn      func(t *testing.T, failureMessage string, msgAndArgs ...interface{}) bool
	FailInvoked bool

	NoErrorFn      func(t *testing.T, err error, msgAndArgs ...interface{}) bool
	NoErrorInvoked bool
}

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

func NewVerifier

func NewVerifier() MockVerifier

func (MockVerifier) Equal

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

Equal mocks the Equal method of the Verifier

func (MockVerifier) Fail

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

Fail mocks the Fail method of the Verifier

func (MockVerifier) JSONEq

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

JSONEq mocks the JSONEq method of the Verifier

func (MockVerifier) NoError added in v1.4.8

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

NoError asserts that a function returned no error

Jump to

Keyboard shortcuts

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