Documentation
¶
Overview ¶
Package clocksteps provides a clock for tests with cucumber/godog.
Index ¶
- Variables
- type Clock
- func (c *Clock) Add(d time.Duration) error
- func (c *Clock) AddDate(years, months, days int) error
- func (c *Clock) Clock() clock.Clock
- func (c *Clock) Freeze()
- func (c *Clock) Now() time.Time
- func (c *Clock) RegisterContext(s *godog.ScenarioContext)deprecated
- func (c *Clock) RegisterSteps(s *godog.ScenarioContext)
- func (c *Clock) Set(t time.Time)
- func (c *Clock) Unfreeze()
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrClockIsNotSet = errors.New("clock is not set")
ErrClockIsNotSet indicates that the clock must be set by either Clock.Set() or Clock.Freeze() before adding some time.Duration into it.
Functions ¶
This section is empty.
Types ¶
type Clock ¶
type Clock struct {
// contains filtered or unexported fields
}
Clock is a clock.Clock.
func (*Clock) RegisterContext
deprecated
func (c *Clock) RegisterContext(s *godog.ScenarioContext)
RegisterContext registers clock to godog tests.
Deprecated: use RegisterSteps instead.
func (*Clock) RegisterSteps ¶ added in v0.4.0
func (c *Clock) RegisterSteps(s *godog.ScenarioContext)
RegisterSteps registers clock to godog tests.
Click to show internal directories.
Click to hide internal directories.