testabilities

package
v1.0.0-beta.40 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FirstCreatedAt = time.Date(2006, 02, 01, 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
	// 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