Documentation ¶
Index ¶
- type Suite
- func (suite *Suite) AccountBalanceDelta(acc authexported.Account, coins sdk.Coins, delta float64)
- func (suite *Suite) AccountBalanceEqual(acc authexported.Account, coins sdk.Coins)
- func (suite *Suite) AddCoinsToModule(amount sdk.Coins)
- func (suite *Suite) CreateAccount(initialBalance sdk.Coins) authexported.Account
- func (suite *Suite) CreatePool(reserves sdk.Coins) error
- func (suite *Suite) CreateVestingAccount(initialBalance sdk.Coins, vestingBalance sdk.Coins) authexported.Account
- func (suite *Suite) EventsContains(events sdk.Events, expectedEvent sdk.Event)
- func (suite *Suite) GetAccount(addr sdk.AccAddress) authexported.Account
- func (suite *Suite) ModuleAccountBalanceDelta(coins sdk.Coins, delta float64)
- func (suite *Suite) ModuleAccountBalanceEqual(coins sdk.Coins)
- func (suite *Suite) NewAccountFromAddr(addr sdk.AccAddress, balance sdk.Coins) authexported.Account
- func (suite *Suite) PoolDeleted(denomA, denomB string)
- func (suite *Suite) PoolDepositorSharesEqual(depositor sdk.AccAddress, poolID string, shares sdk.Int)
- func (suite *Suite) PoolLiquidityDelta(coins sdk.Coins, delta float64)
- func (suite *Suite) PoolLiquidityEqual(coins sdk.Coins)
- func (suite *Suite) PoolReservesEqual(poolID string, reserves sdk.Coins)
- func (suite *Suite) PoolShareTotalEqual(poolID string, totalShares sdk.Int)
- func (suite *Suite) PoolShareValueDelta(depositor authexported.Account, pool swap.AllowedPool, coins sdk.Coins, ...)
- func (suite *Suite) PoolShareValueEqual(depositor authexported.Account, pool swap.AllowedPool, coins sdk.Coins)
- func (suite *Suite) PoolSharesDeleted(depositor sdk.AccAddress, denomA, denomB string)
- func (suite *Suite) RemoveCoinsFromModule(amount sdk.Coins)
- func (suite *Suite) SetupTest()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Suite ¶
type Suite struct { suite.Suite Keeper swap.Keeper App app.TestApp Ctx sdk.Context // contains filtered or unexported fields }
Suite implements a test suite for the swap module integration tests
func (*Suite) AccountBalanceDelta ¶
AccountBalanceDelta asserts that the coins are within delta of the account balance
func (*Suite) AccountBalanceEqual ¶
func (suite *Suite) AccountBalanceEqual(acc authexported.Account, coins sdk.Coins)
AccountBalanceEqual asserts that the coins match the account balance
func (*Suite) AddCoinsToModule ¶
AddCoinsToModule adds coins to the swap module account
func (*Suite) CreateAccount ¶
func (suite *Suite) CreateAccount(initialBalance sdk.Coins) authexported.Account
CreateAccount creates a new account from the provided balance
func (*Suite) CreatePool ¶
CreatePool creates a pool and stores it in state with the provided reserves
func (*Suite) CreateVestingAccount ¶
func (suite *Suite) CreateVestingAccount(initialBalance sdk.Coins, vestingBalance sdk.Coins) authexported.Account
CreateVestingAccount creats a new vesting account from the provided balance and vesting balance
func (*Suite) EventsContains ¶
EventsContains asserts that the expected event is in the provided events
func (*Suite) GetAccount ¶
func (suite *Suite) GetAccount(addr sdk.AccAddress) authexported.Account
GetAccount gets an existing account
func (*Suite) ModuleAccountBalanceDelta ¶
ModuleAccountBalanceDelta asserts that the swap module account balance is within acceptable delta of the provided coins
func (*Suite) ModuleAccountBalanceEqual ¶
ModuleAccountBalanceEqual asserts that the swap module account balance matches the provided coins
func (*Suite) NewAccountFromAddr ¶
func (suite *Suite) NewAccountFromAddr(addr sdk.AccAddress, balance sdk.Coins) authexported.Account
NewAccountFromAddr creates a new account from the provided address with the provided balance
func (*Suite) PoolDeleted ¶
PoolDeleted asserts that the pool does not exist
func (*Suite) PoolDepositorSharesEqual ¶
func (suite *Suite) PoolDepositorSharesEqual(depositor sdk.AccAddress, poolID string, shares sdk.Int)
PoolDepositorSharesEqual asserts the depositor owns the shares for the provided pool
func (*Suite) PoolLiquidityDelta ¶
PoolLiquidityDelta asserts that the pool matching the provided coins has those reserves within delta
func (*Suite) PoolLiquidityEqual ¶
PoolLiquidityEqual asserts that the pool matching the provided coins has those reserves
func (*Suite) PoolReservesEqual ¶
PoolReservesEqual assets the stored pool reserves are equal to the provided reserves
func (*Suite) PoolShareTotalEqual ¶
PoolShareTotalEqual asserts the total shares match the stored pool
func (*Suite) PoolShareValueDelta ¶
func (suite *Suite) PoolShareValueDelta(depositor authexported.Account, pool swap.AllowedPool, coins sdk.Coins, delta float64)
PoolShareValueDelta asserts that the depositor shares are in state and the value is within delta of the expected coins
func (*Suite) PoolShareValueEqual ¶
func (suite *Suite) PoolShareValueEqual(depositor authexported.Account, pool swap.AllowedPool, coins sdk.Coins)
PoolShareValueEqual asserts that the depositor shares are in state and the value matches the expected coins
func (*Suite) PoolSharesDeleted ¶
func (suite *Suite) PoolSharesDeleted(depositor sdk.AccAddress, denomA, denomB string)
PoolSharesDeleted asserts that the pool shares have been removed
func (*Suite) RemoveCoinsFromModule ¶
RemoveCoinsFromModule adds coins to the swap module account