Search in sources :

Example 11 with BtcNode

use of bisq.core.btc.BitcoinNodes.BtcNode in project bisq-core by bisq-network.

the class WalletSetupPreferencesTest method testSelectPreferredNodesWhenPublicOption.

@Test
public void testSelectPreferredNodesWhenPublicOption() {
    Preferences delegate = mock(Preferences.class);
    when(delegate.getBitcoinNodesOptionOrdinal()).thenReturn(PUBLIC.ordinal());
    WalletSetupPreferences preferences = new WalletSetupPreferences(delegate);
    List<BtcNode> nodes = preferences.selectPreferredNodes(mock(BitcoinNodes.class));
    assertTrue(nodes.isEmpty());
}
Also used : BtcNode(bisq.core.btc.BitcoinNodes.BtcNode) Preferences(bisq.core.user.Preferences) BitcoinNodes(bisq.core.btc.BitcoinNodes) Test(org.junit.Test) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest)

Aggregations

BtcNode (bisq.core.btc.BitcoinNodes.BtcNode)11 Test (org.junit.Test)10 PeerAddress (org.bitcoinj.core.PeerAddress)8 Facade (bisq.core.btc.wallet.BtcNodeConverter.Facade)3 Socks5Proxy (com.runjva.sourceforge.jsocks.protocol.Socks5Proxy)3 InetAddress (java.net.InetAddress)3 BitcoinNodes (bisq.core.btc.BitcoinNodes)2 Preferences (bisq.core.user.Preferences)2 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)2 BitcoinNodesOption (bisq.core.btc.BitcoinNodes.BitcoinNodesOption)1 Ignore (org.junit.Ignore)1 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)1