Documentation ¶
Index ¶
- func Create[E boltz.Entity](ctx TestContext, entity E) error
- func Delete[E boltz.Entity](ctx TestContext, entity E) error
- func GetStoreForEntity[E boltz.Entity](ctx TestContext, entity E) boltz.EntityStore[E]
- func Patch[E boltz.Entity](ctx TestContext, entity E, checker boltz.FieldChecker) error
- func Reload[E boltz.Entity](ctx TestContext, entity E) error
- func RequireCreate[E boltz.Entity](ctx TestContext, entity E)
- func RequireDelete[E boltz.Entity](ctx TestContext, entity E, ignorePaths ...string)
- func RequirePatch[E boltz.Entity](ctx TestContext, entity E, checker boltz.FieldChecker)
- func RequireReload[E boltz.Entity](ctx TestContext, entity E)
- func RequireUpdate[E boltz.Entity](ctx TestContext, entity E)
- func Update[E boltz.Entity](ctx TestContext, entity E) error
- func ValidateBaseline[E boltz.ExtEntity](ctx TestContext, entity E, opts ...cmp.Option)
- func ValidateDeleted(ctx TestContext, id string, ignorePaths ...string)
- func ValidateUpdated[E boltz.ExtEntity](ctx TestContext, entity E)
- type BaseTestContext
- func (ctx *BaseTestContext) Cleanup()
- func (ctx *BaseTestContext) CreateTags() map[string]interface{}
- func (ctx *BaseTestContext) GetDb() boltz.Db
- func (ctx *BaseTestContext) GetDbFile() *os.File
- func (ctx *BaseTestContext) GetReferenceTime() time.Time
- func (ctx *BaseTestContext) GetRelatedIds(entity boltz.Entity, field string) []string
- func (ctx *BaseTestContext) GetStoreForEntity(entity boltz.Entity) boltz.Store
- func (ctx *BaseTestContext) InitDb(openF func(name string) (boltz.Db, error))
- func (ctx *BaseTestContext) NextTest(t *testing.T)
- func (ctx *BaseTestContext) Require() *require.Assertions
- type StoreFunc
- type TestContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetStoreForEntity ¶
func GetStoreForEntity[E boltz.Entity](ctx TestContext, entity E) boltz.EntityStore[E]
func Patch ¶
func Patch[E boltz.Entity](ctx TestContext, entity E, checker boltz.FieldChecker) error
func RequireCreate ¶
func RequireCreate[E boltz.Entity](ctx TestContext, entity E)
func RequireDelete ¶
func RequireDelete[E boltz.Entity](ctx TestContext, entity E, ignorePaths ...string)
func RequirePatch ¶
func RequirePatch[E boltz.Entity](ctx TestContext, entity E, checker boltz.FieldChecker)
func RequireReload ¶
func RequireReload[E boltz.Entity](ctx TestContext, entity E)
func RequireUpdate ¶
func RequireUpdate[E boltz.Entity](ctx TestContext, entity E)
func ValidateBaseline ¶
func ValidateBaseline[E boltz.ExtEntity](ctx TestContext, entity E, opts ...cmp.Option)
func ValidateDeleted ¶
func ValidateDeleted(ctx TestContext, id string, ignorePaths ...string)
func ValidateUpdated ¶
func ValidateUpdated[E boltz.ExtEntity](ctx TestContext, entity E)
Types ¶
type BaseTestContext ¶
type BaseTestContext struct { require.Assertions ReferenceTime time.Time // contains filtered or unexported fields }
func NewTestContext ¶
func NewTestContext(t testing.TB, storeF StoreFunc) *BaseTestContext
func (*BaseTestContext) Cleanup ¶
func (ctx *BaseTestContext) Cleanup()
func (*BaseTestContext) CreateTags ¶
func (ctx *BaseTestContext) CreateTags() map[string]interface{}
func (*BaseTestContext) GetDb ¶
func (ctx *BaseTestContext) GetDb() boltz.Db
func (*BaseTestContext) GetDbFile ¶
func (ctx *BaseTestContext) GetDbFile() *os.File
func (*BaseTestContext) GetReferenceTime ¶
func (ctx *BaseTestContext) GetReferenceTime() time.Time
func (*BaseTestContext) GetRelatedIds ¶
func (ctx *BaseTestContext) GetRelatedIds(entity boltz.Entity, field string) []string
func (*BaseTestContext) GetStoreForEntity ¶
func (ctx *BaseTestContext) GetStoreForEntity(entity boltz.Entity) boltz.Store
func (*BaseTestContext) InitDb ¶
func (ctx *BaseTestContext) InitDb(openF func(name string) (boltz.Db, error))
func (*BaseTestContext) NextTest ¶
func (ctx *BaseTestContext) NextTest(t *testing.T)
func (*BaseTestContext) Require ¶
func (ctx *BaseTestContext) Require() *require.Assertions
Click to show internal directories.
Click to hide internal directories.