fixtures

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Random = random.NewRandom(rand.NewSource(time.Now().Unix()))
View Source
var SecureRandom = random.NewRandom(random.CryptoSeed{})

Functions

func New

func New(T interface{}) (pointer interface{})

New returns a populated entity for a given business data entity. This is primary and only used for testing. With fixtures, it become easy to create generic query objects that use test cases that does not specify the concrete Structure type.

Types

type FixtureFactory added in v0.5.0

type FixtureFactory struct{}

func (FixtureFactory) Context added in v0.5.0

func (f FixtureFactory) Context() (ctx context.Context)

func (FixtureFactory) Create added in v0.5.0

func (f FixtureFactory) Create(T resources.T) interface{}

Jump to

Keyboard shortcuts

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