crudtest

package
v0.255.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Eventually = assert.Retry{
	Strategy: &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[ENT, ID any](tb testing.TB, subject crud.Creator[ENT], ctx context.Context, ptr *ENT)

func Delete

func Delete[ENT, ID any](tb testing.TB, subject crud.ByIDDeleter[ID], ctx context.Context, ptr *ENT)

func DeleteAll

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

func HasEntity

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

func HasID

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

func IsAbsent

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

func IsPresent

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

func Save added in v0.242.0

func Save[ENT, ID any](tb testing.TB, subject crud.Saver[ENT], ctx context.Context, ptr *ENT)

func Update

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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