mockrequire

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func Called

func Called(t require.TestingT, mockFn interface{}, msgAndArgs ...interface{})

Called asserts that the mock function object was called at least once.

func CalledN

func CalledN(t require.TestingT, mockFn interface{}, n int, msgAndArgs ...interface{})

CalledOnce asserts that the mock function object was called exactly n times.

func CalledNWith

func CalledNWith(t require.TestingT, mockFn interface{}, n int, asserter CallInstanceAsserter, msgAndArgs ...interface{})

CalledNWith asserts that the mock function object was called exactly n times with a set of arguments matching the given mockassertion function.

func CalledOnce

func CalledOnce(t require.TestingT, mockFn interface{}, msgAndArgs ...interface{})

CalledOnce asserts that the mock function object was called exactly once.

func CalledOnceWith

func CalledOnceWith(t require.TestingT, mockFn interface{}, asserter CallInstanceAsserter, msgAndArgs ...interface{})

CalledOnceWith asserts that the mock function object was called exactly once with a set of arguments matching the given mockassertion function.

func CalledWith

func CalledWith(t require.TestingT, mockFn interface{}, asserter CallInstanceAsserter, msgAndArgs ...interface{})

CalledWith asserts that the mock function object was called at least once with a set of arguments matching the given mockassertion function.

func NotCalled

func NotCalled(t require.TestingT, mockFn interface{}, msgAndArgs ...interface{})

NotCalled asserts that the mock function object was not called.

func NotCalledWith

func NotCalledWith(t require.TestingT, mockFn interface{}, asserter CallInstanceAsserter, msgAndArgs ...interface{})

CalledWith asserts that the mock function object was not called with a set of arguments matching the given mockassertion function.

Types

type CallInstanceAsserter

type CallInstanceAsserter = mockassert.CallInstanceAsserter

type CallInstanceAsserterFunc

type CallInstanceAsserterFunc = mockassert.CallInstanceAsserterFunc

Jump to

Keyboard shortcuts

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