mock

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package mock provides functionalities for mocking clock.Clock.

Index

Constants

This section is empty.

Variables

View Source
var NoMock = Mock()

NoMock is no mock Clock.

Functions

This section is empty.

Types

type Clock

type Clock struct {
	mockit.Mock
}

Clock is a clock.Clock.

func (*Clock) Clock

func (c *Clock) Clock() clock.Clock

Clock satisfies clock.Provider.

func (*Clock) Now

func (c *Clock) Now() time.Time

Now satisfies clock.Clock.

type Mocker

type Mocker func(tb testing.TB) *Clock

Mocker is Clock mocker.

func Mock

func Mock(mocks ...func(c *Clock)) Mocker

Mock creates Clock mock with cleanup to ensure all the expectations are met.

Jump to

Keyboard shortcuts

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