mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 01:41:11 +01:00
Add FederatedBtcNodeProviderTest.onlyHardcodedNodes test
This commit is contained in:
parent
c4e82d59ec
commit
f7d80ee1a8
@ -0,0 +1,32 @@
|
||||
package bisq.core.btc.nodes;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertIterableEquals;
|
||||
|
||||
public class FederatedBtcNodeProviderTest {
|
||||
@Test
|
||||
void onlyHardcodedNodes() {
|
||||
var hardcodedNodes = List.of(
|
||||
new BtcNodes.BtcNode(null, "alice.onion", null,
|
||||
BtcNodes.BtcNode.DEFAULT_PORT, "@alice"),
|
||||
new BtcNodes.BtcNode(null, "bob.onion", null,
|
||||
BtcNodes.BtcNode.DEFAULT_PORT, "@bob"),
|
||||
new BtcNodes.BtcNode(null, "charlie.onion", null,
|
||||
BtcNodes.BtcNode.DEFAULT_PORT, "@charlie")
|
||||
);
|
||||
|
||||
List<BtcNodes.BtcNode> mutableHardcodedList = new ArrayList<>(hardcodedNodes);
|
||||
List<String> filterProvidedBtcNodes = Collections.emptyList();
|
||||
List<String> bannedBtcNodes = Collections.emptyList();
|
||||
|
||||
List<BtcNodes.BtcNode> selectedNodes = FederatedBtcNodeProvider
|
||||
.getNodes(mutableHardcodedList, filterProvidedBtcNodes, bannedBtcNodes);
|
||||
|
||||
assertIterableEquals(hardcodedNodes, selectedNodes);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user