coverage tests at engine

This commit is contained in:
gezimbll
2022-11-11 19:09:13 -05:00
committed by Dan Christian Bogos
parent 4305c505a8
commit e7520002eb
7 changed files with 393 additions and 1 deletions

View File

@@ -184,6 +184,24 @@ func TestSharedPopBalanceByStrategyMineHigh(t *testing.T) {
}
}
func TestSortBalancesByStrategyRandom(t *testing.T) {
bc := Balances{
&Balance{Uuid: "uuuu", Value: 2.0, account: &Account{ID: "test"}},
&Balance{Value: 1.0},
&Balance{Value: 3.0},
}
sg := &SharedGroup{AccountParameters: map[string]*SharingParameters{
"test": {Strategy: "default"}},
}
sbc := sg.SortBalancesByStrategy(bc[0], bc)
if len(sbc) != 3 {
t.Error("Error sorting balance chain: ", sbc)
}
}
/*func TestSharedPopBalanceByStrategyRandomHigh(t *testing.T) {
bc := Balances{
&Balance{Uuid: "uuuu", Value: 2.0, account: &Account{Id: "test"}},