Documentation ¶
Overview ¶
Package mocks provides a plugin that initializes Mocks in the test entry.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TableEntryHooks ¶
type TableEntryHooks struct { plugins.NoopAfterEntry // contains filtered or unexported fields }
TableEntryHooks exposes the before and after hooks for each entry in the table.
func (*TableEntryHooks) BeforeEntry ¶
BeforeEntry is called before the test is run for the table entry. It initializes the Mocks struct and calls NEW for each of the mocks.
type TablePlugin ¶
type TablePlugin struct {
// contains filtered or unexported fields
}
TablePlugin uses the collection of mocks, initializing and populating it for each test entry. This plugin should come before any steps that require mocks.
func New ¶
func New(m *mocks.All) *TablePlugin
New uses the collection of mocks, initializing and populating it for each test entry.
func (*TablePlugin) ParseEntryType ¶
func (t *TablePlugin) ParseEntryType(entryType reflect.Type) (plugins.TableEntryHooks, error)
ParseEntryType is called during the first pass of plugin initialization. It is responsible for making sure the types are as expected.