Documentation ¶
Index ¶
- type Suite
- func (suite *Suite) AccountBalanceEqual(addr sdk.AccAddress, coins sdk.Coins)
- func (suite *Suite) AddCoinsToModule(amount sdk.Coins)
- func (suite *Suite) CreateAccount(initialBalance sdk.Coins) authtypes.AccountI
- func (suite *Suite) CreatePool(reserves sdk.Coins) error
- func (suite *Suite) CreateVestingAccount(initialBalance sdk.Coins, vestingBalance sdk.Coins) authtypes.AccountI
- func (suite *Suite) EventsContains(events sdk.Events, expectedEvent sdk.Event)
- func (suite *Suite) GetEvents() sdk.Events
- func (suite *Suite) ModuleAccountBalanceEqual(coins sdk.Coins)
- func (suite *Suite) NewAccountFromAddr(addr sdk.AccAddress, balance sdk.Coins) authtypes.AccountI
- func (suite *Suite) PoolDeleted(denomA, denomB string)
- func (suite *Suite) PoolDepositorSharesEqual(depositor sdk.AccAddress, poolID string, shares sdkmath.Int)
- func (suite *Suite) PoolLiquidityEqual(coins sdk.Coins)
- func (suite *Suite) PoolReservesEqual(poolID string, reserves sdk.Coins)
- func (suite *Suite) PoolShareTotalEqual(poolID string, totalShares sdkmath.Int)
- func (suite *Suite) PoolShareValueEqual(depositor authtypes.AccountI, pool types.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 keeper.Keeper App app.TestApp Ctx sdk.Context BankKeeper BankKeeper.Keeper AccountKeeper authkeeper.AccountKeeper }
Suite implements a test suite for the swap module integration tests
func (*Suite) AccountBalanceEqual ¶
func (suite *Suite) AccountBalanceEqual(addr sdk.AccAddress, 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 ¶
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) authtypes.AccountI
CreateVestingAccount creates 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) ModuleAccountBalanceEqual ¶
ModuleAccountBalanceEqual asserts that the swap module account balance matches the provided coins
func (*Suite) NewAccountFromAddr ¶
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 sdkmath.Int)
PoolDepositorSharesEqual asserts the depositor owns the shares for the provided pool
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) PoolShareValueEqual ¶
func (suite *Suite) PoolShareValueEqual(depositor authtypes.AccountI, pool types.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 removes coins to the swap module account