testutils

package
v1.0.0-beta.228 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deps

type Deps struct {
	AccountService   ledgeraccount.Service
	ResolversService *resolvers.AccountResolver
	HistoricalLedger *historical.Ledger
}

func InitDeps

func InitDeps(db *entdb.Client, logger *slog.Logger) (Deps, error)

type IntegrationEnv

type IntegrationEnv struct {
	Namespace        string
	CustomerID       customer.CustomerID
	Currency         currencyx.Code
	DB               *entdb.Client
	CustomerAccounts ledger.CustomerAccounts
	BusinessAccounts ledger.BusinessAccounts
	Deps             Deps
}

func NewIntegrationEnv

func NewIntegrationEnv(t *testing.T, namespacePrefix string) *IntegrationEnv

func (*IntegrationEnv) AccruedSubAccount

func (e *IntegrationEnv) AccruedSubAccount(t *testing.T) ledger.SubAccount

func (*IntegrationEnv) AccruedSubAccountWithCostBasis

func (e *IntegrationEnv) AccruedSubAccountWithCostBasis(t *testing.T, costBasis *alpacadecimal.Decimal) ledger.SubAccount

func (*IntegrationEnv) BrokerageSubAccount

func (e *IntegrationEnv) BrokerageSubAccount(t *testing.T) ledger.SubAccount

func (*IntegrationEnv) EarningsSubAccount

func (e *IntegrationEnv) EarningsSubAccount(t *testing.T) ledger.SubAccount

func (*IntegrationEnv) EarningsSubAccountWithCostBasis

func (e *IntegrationEnv) EarningsSubAccountWithCostBasis(t *testing.T, costBasis *alpacadecimal.Decimal) ledger.SubAccount

func (*IntegrationEnv) FBOSubAccount

func (e *IntegrationEnv) FBOSubAccount(t *testing.T, priority int) ledger.SubAccount

func (*IntegrationEnv) Now

func (e *IntegrationEnv) Now() time.Time

func (*IntegrationEnv) ReceivableSubAccount

func (e *IntegrationEnv) ReceivableSubAccount(t *testing.T) ledger.SubAccount

func (*IntegrationEnv) ReceivableSubAccountWithCostBasis

func (e *IntegrationEnv) ReceivableSubAccountWithCostBasis(t *testing.T, costBasis *alpacadecimal.Decimal) ledger.SubAccount

func (*IntegrationEnv) ReceivableSubAccountWithCostBasisAndStatus

func (e *IntegrationEnv) ReceivableSubAccountWithCostBasisAndStatus(t *testing.T, costBasis *alpacadecimal.Decimal, status ledger.TransactionAuthorizationStatus) ledger.SubAccount

func (*IntegrationEnv) ReceivableSubAccountWithStatus

func (e *IntegrationEnv) ReceivableSubAccountWithStatus(t *testing.T, status ledger.TransactionAuthorizationStatus) ledger.SubAccount

func (*IntegrationEnv) SumBalance

func (e *IntegrationEnv) SumBalance(t *testing.T, subAccount ledger.SubAccount) alpacadecimal.Decimal

func (*IntegrationEnv) WashSubAccount

func (e *IntegrationEnv) WashSubAccount(t *testing.T) ledger.SubAccount

func (*IntegrationEnv) WashSubAccountWithCostBasis

func (e *IntegrationEnv) WashSubAccountWithCostBasis(t *testing.T, costBasis *alpacadecimal.Decimal) ledger.SubAccount

Jump to

Keyboard shortcuts

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