Help us shape the future of Go! Take the 2026 Go Developer Survey

testabilities

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FirstCreatedAt = time.Date(2006, 0o2, 0o1, 15, 4, 5, 7, time.UTC)

Functions

This section is empty.

Types

type DatabaseDataFixtures

type DatabaseDataFixtures interface {
	HasUTXO() UserUtxoFixture
}

type DatabaseFixture

type DatabaseFixture interface {
	DB() DatabaseDataFixtures
	GormDB() *gorm.DB
}

func Given

func Given(t testing.TB, opts ...testengine.ConfigOpts) (given DatabaseFixture, cleanup func())

type Storable

type Storable[Data any] interface {
	// Stored ensures that the data is stored in the database.
	Stored() *Data
}

type UserUtxoFixture

type UserUtxoFixture interface {
	// OwnedBySender ensures that the UTXO is owned by the sender (which is default behavior of this fixture).
	OwnedBySender() UserUtxoFixture
	// OwnedByRecipient ensures that the UTXO is owned by the recipient
	OwnedByRecipient() UserUtxoFixture
	// P2PKH ensures that the UTXO is with P2PKH locking script (which is default behavior of this fixture).
	P2PKH() UserUtxoFixture
	// WithSatoshis sets the satoshis value of the UTXO.
	WithSatoshis(satoshis bsv.Satoshis) UserUtxoFixture

	Storable[database.UserUTXO]
}

Jump to

Keyboard shortcuts

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