mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Add more tests
This commit is contained in:
parent
dabe6907e1
commit
d33298d087
@ -44,6 +44,17 @@ public class ArbitratorSelectionTest {
|
||||
arbitrators = new HashSet<>(Arrays.asList("arb1", "arb2", "arb3"));
|
||||
result = ArbitratorSelection.getLeastUsedArbitrator(lastAddressesUsedInTrades, arbitrators);
|
||||
assertEquals("arb1", result);
|
||||
|
||||
lastAddressesUsedInTrades = Arrays.asList("arb1", "arb2", "arb3", "arb1");
|
||||
arbitrators = new HashSet<>(Arrays.asList("arb1", "arb2", "arb3"));
|
||||
result = ArbitratorSelection.getLeastUsedArbitrator(lastAddressesUsedInTrades, arbitrators);
|
||||
assertEquals("arb2", result);
|
||||
|
||||
lastAddressesUsedInTrades = Arrays.asList("arb1", "arb2", "arb3", "arb1", "arb2");
|
||||
arbitrators = new HashSet<>(Arrays.asList("arb1", "arb2", "arb3"));
|
||||
result = ArbitratorSelection.getLeastUsedArbitrator(lastAddressesUsedInTrades, arbitrators);
|
||||
assertEquals("arb3", result);
|
||||
|
||||
lastAddressesUsedInTrades = Arrays.asList("xxx", "ccc", "aaa");
|
||||
arbitrators = new HashSet<>(Arrays.asList("aaa", "ccc", "xxx"));
|
||||
result = ArbitratorSelection.getLeastUsedArbitrator(lastAddressesUsedInTrades, arbitrators);
|
||||
|
Loading…
Reference in New Issue
Block a user