test

package
v0.0.0-...-8619d99 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupClientTest

func SetupClientTest(t *testing.T, name [2]string, chDuration uint64) ([]*chtest.Session, [2]clienttest.RoleSetup, [2]*big.Int)

SetupClientTest prepares necessary objects for end-2-end testing. Per client a channel test session, a client role setup and the initial asset balance is returned.

Types

type BalanceReader

type BalanceReader struct {
	// contains filtered or unexported fields
}

BalanceReader wraps the bindings TokenBalance functionality to be used in the client end-2-end tests.

func NewBalanceReader

func NewBalanceReader(binding *binding.Adjudicator, id adj.AccountID) *BalanceReader

NewBalanceReader takes the clients binding and its fabric id to create a new BalanceReader.

func (BalanceReader) Balance

func (b BalanceReader) Balance(_ pchannel.Asset) pchannel.Bal

Balance returns the on-chain balance. We do not need a specific Asset here because we only got a single one.

Jump to

Keyboard shortcuts

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