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

Function TestKeeper_GetMTPIterator

x/margin/keeper/keeper_test.go:97–106  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

95}
96
97func TestKeeper_GetMTPIterator(t *testing.T) {
98 ctx, app, marginKeeper := initKeeper(t)
99 want := addMTPKey(t, ctx, app, marginKeeper, "ceth", "xxx", "xxx", types.Position_LONG, 1, sdk.NewDec(20))
100 iterator := marginKeeper.GetMTPIterator(ctx)
101 bytesValue := iterator.Value()
102 var got types.MTP
103 types.ModuleCdc.MustUnmarshal(bytesValue, &got)
104
105 require.Equal(t, got, want)
106}
107
108func TestKeeper_GetMTPs(t *testing.T) {
109 ctx, app, marginKeeper := initKeeper(t)

Callers

nothing calls this directly

Calls 4

initKeeperFunction · 0.85
addMTPKeyFunction · 0.85
GetMTPIteratorMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected