MCPcopy Create free account
hub / github.com/Sifchain/sifnode / TestKeeper_SetPool_ValidatePool

Function TestKeeper_SetPool_ValidatePool

x/clp/keeper/pool_test.go:12–24  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestKeeper_SetPool_ValidatePool(t *testing.T) {
13 pool := test.GenerateRandomPool(1)[0]
14 ctx, app := test.CreateTestAppClp(false)
15 clpKeeper := app.ClpKeeper
16 err := clpKeeper.SetPool(ctx, &pool)
17 assert.NoError(t, err)
18 getpool, err := clpKeeper.GetPool(ctx, pool.ExternalAsset.Symbol)
19 assert.NoError(t, err, "Error in get pool")
20 assert.Equal(t, getpool, pool)
21 assert.Equal(t, clpKeeper.ExistsPool(ctx, pool.ExternalAsset.Symbol), true)
22 boolean := clpKeeper.ValidatePool(pool)
23 assert.True(t, boolean)
24}
25
26func TestKeeper_GetPools(t *testing.T) {
27 pools := test.GenerateRandomPool(10)

Callers

nothing calls this directly

Calls 7

GenerateRandomPoolFunction · 0.92
CreateTestAppClpFunction · 0.92
ExistsPoolMethod · 0.80
ValidatePoolMethod · 0.80
SetPoolMethod · 0.65
GetPoolMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected