Documentation ¶
Index ¶
- Variables
- type Fixtures
- func (fix *Fixtures) BeforeScenarioTagLoader(s *godog.Scenario)
- func (Fixtures) Debug() error
- func (Fixtures) DisableDebug() error
- func (fix Fixtures) Load(fixturePath string, instancePickedKey string) error
- func (fix Fixtures) LoadManifest(manifestPath string) error
- func (fix Fixtures) Reset()
- func (fix *Fixtures) WithBasePath(path string) *Fixtures
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidInstance indicates that an object instance was expected but // did not matched expected types. ErrInvalidInstance = fixtures.ErrInvalidInstance // ErrUnknown indicates that an error does not exists ErrUnknown = fixtures.ErrUnknown // ErrUnsupportedFixture indicates provided fixture kind // is not supported. ErrUnsupportedFixture = fixtures.ErrUnsupportedFixture )
Functions ¶
This section is empty.
Types ¶
type Fixtures ¶
type Fixtures struct {
// contains filtered or unexported fields
}
Fixtures manages fixtures files to help data initialisation for test.
It relies on picker.Picker manager.
func New ¶
New initiates a fixtures manager instance using provided picker. It relies on a singleton pattern so successive call to New will return the same instance.
func (*Fixtures) BeforeScenarioTagLoader ¶
BeforeScenarioTagLoader initialize the TagLoader for fixture. It allows to pass a `@manifest` tag to load fixture manifest
@manifest:fixture/example.yml
func (Fixtures) Load ¶
Load loads fixtures using provided Kind and path. Parameter instancePickedKey is required for some Kind.
func (Fixtures) LoadManifest ¶
LoadManifest loads Manifest from path.
func (*Fixtures) WithBasePath ¶
WithBasePath add a path element as prefix for any fixture file path.
Click to show internal directories.
Click to hide internal directories.