testabilities

package
v1.0.0-beta.43 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserFundsTransactionCustomInstructions = bsv.CustomInstructions{
	{Type: "type42", Instruction: "1-paymail_pki-0"},
	{Type: "type42", Instruction: "1-destination-0123"},
}
View Source
var UserFundsTransactionOutpoint = bsv.Outpoint{
	TxID: "a0000000001e1b81dd2c9c0c6cd67f9bdf832e9c2bb12a1d57f30cb6ebbe78d9",
	Vout: 0,
}

Functions

Types

type CreatedTransactionOutlineAssertion

type CreatedTransactionOutlineAssertion interface {
	WithNoError(err error) SuccessfullyCreatedTransactionOutlineAssertion
	WithError(err error) ErrorCreationTransactionOutlineAssertion
}

type ErrorCreationTransactionOutlineAssertion

type ErrorCreationTransactionOutlineAssertion interface {
	ThatIs(expectedError error)
}

type InputAssertion

type InputAssertion interface {
	HasOutpoint(outpoint bsv.Outpoint) InputAssertion
	HasSourceTxID(id string) InputAssertion
	HasSourceVout(index int) InputAssertion
	HasCustomInstructions(instructions bsv.CustomInstructions)
}

type OutputAssertion

type OutputAssertion interface {
	HasBucket(bucket bucket.Name) OutputAssertion
	HasSatoshis(satoshis bsv.Satoshis) OutputAssertion
	HasLockingScript(lockingScript string) OutputAssertion
	IsDataOnly() OutputAssertion
	IsPaymail() TransactionOutlinePaymailOutputAssertion
}

type SuccessfullyCreatedTransactionOutlineAssertion

type SuccessfullyCreatedTransactionOutlineAssertion interface {
	WithParseableBEEFHex() WithParseableBEEFTransactionOutlineAssertion
	WithParseableRawHex() WithParseableBEEFTransactionOutlineAssertion
}

type TransactionOutlineAssertion

type TransactionOutlineAssertion interface {
	Created(transaction *outlines.Transaction) CreatedTransactionOutlineAssertion
}

type TransactionOutlineFixture

type TransactionOutlineFixture interface {
	MinimumValidTransactionSpec() *outlines.TransactionSpec
	NewTransactionOutlinesService() outlines.Service
	ExternalRecipientHost() tpaymail.PaymailHostFixture
	UserHasNotEnoughFunds()
	UTXOSelector() UTXOSelectorFixture
}

TransactionOutlineFixture is a test fixture - used for establishing environment for test.

func Given

func Given(t testing.TB) (given TransactionOutlineFixture)

Given creates a new test fixture.

type TransactionOutlinePaymailOutputAssertion

type TransactionOutlinePaymailOutputAssertion interface {
	HasReceiver(receiver string) TransactionOutlinePaymailOutputAssertion
	HasSender(sender string) TransactionOutlinePaymailOutputAssertion
	HasReference(reference string) TransactionOutlinePaymailOutputAssertion
}

type UTXOSelectorFixture

type UTXOSelectorFixture interface {
	WillReturnNoUTXOs()
	WillReturnError()
}

type WithParseableBEEFTransactionOutlineAssertion

type WithParseableBEEFTransactionOutlineAssertion interface {
	HasInputs(count int) WithParseableBEEFTransactionOutlineAssertion
	Input(index int) InputAssertion
	HasOutputs(count int) WithParseableBEEFTransactionOutlineAssertion
	Output(index int) OutputAssertion
}

Jump to

Keyboard shortcuts

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