crudtest

package
v0.140.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Eventually = assert.Eventually{
	RetryStrategy: &Waiter,
}
View Source
var Waiter = assert.Waiter{
	WaitDuration: time.Millisecond,
	Timeout:      5 * time.Second,
}

Functions

func CountIs

func CountIs[T any](tb testing.TB, iter iterators.Iterator[T], expected int)

func Create

func Create[Entity, ID any](tb testing.TB, subject sh.CRD[Entity, ID], ctx context.Context, ptr *Entity)

func Delete

func Delete[Entity, ID any](tb testing.TB, subject sh.CRD[Entity, ID], ctx context.Context, ptr *Entity)

func DeleteAll

func DeleteAll[Entity, ID any](tb testing.TB, subject deleteAllDeleter[Entity, ID], ctx context.Context)

func HasEntity

func HasEntity[Entity, ID any](tb testing.TB, subject crud.ByIDFinder[Entity, ID], ctx context.Context, ptr *Entity)

func HasID

func HasID[Entity, ID any](tb testing.TB, ent Entity) (id ID)

func IsAbsent

func IsAbsent[Entity, ID any](tb testing.TB, subject crud.ByIDFinder[Entity, ID], ctx context.Context, id ID)

func IsFindable

func IsFindable[Entity, ID any](tb testing.TB, subject crud.ByIDFinder[Entity, ID], ctx context.Context, id ID) *Entity

func Update

func Update[Entity, ID any](tb testing.TB, subject updater[Entity, ID], ctx context.Context, ptr *Entity)

Types

This section is empty.

Jump to

Keyboard shortcuts

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