Fix tests

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
This commit is contained in:
HenrikJannsen 2024-06-07 22:57:51 +07:00
parent ddf073a6ff
commit 15a68ec70c
No known key found for this signature in database
GPG Key ID: 02AA2BAE387C8307
3 changed files with 6 additions and 2 deletions

View File

@ -39,7 +39,7 @@ public class BtcNodesSetupPreferencesTest {
Preferences delegate = mock(Preferences.class); Preferences delegate = mock(Preferences.class);
when(delegate.getBitcoinNodesOptionOrdinal()).thenReturn(PUBLIC.ordinal()); when(delegate.getBitcoinNodesOptionOrdinal()).thenReturn(PUBLIC.ordinal());
BtcNodesSetupPreferences preferences = new BtcNodesSetupPreferences(delegate, Config.DEFAULT_NUM_CONNECTIONS_FOR_BTC_PUBLIC); BtcNodesSetupPreferences preferences = new BtcNodesSetupPreferences(delegate, Config.DEFAULT_NUM_CONNECTIONS_FOR_BTC_PUBLIC, null);
List<BtcNode> nodes = preferences.selectPreferredNodes(mock(BtcNodes.class)); List<BtcNode> nodes = preferences.selectPreferredNodes(mock(BtcNodes.class));
assertTrue(nodes.isEmpty()); assertTrue(nodes.isEmpty());
@ -51,7 +51,7 @@ public class BtcNodesSetupPreferencesTest {
when(delegate.getBitcoinNodesOptionOrdinal()).thenReturn(CUSTOM.ordinal()); when(delegate.getBitcoinNodesOptionOrdinal()).thenReturn(CUSTOM.ordinal());
when(delegate.getBitcoinNodes()).thenReturn("aaa.onion,bbb.onion"); when(delegate.getBitcoinNodes()).thenReturn("aaa.onion,bbb.onion");
BtcNodesSetupPreferences preferences = new BtcNodesSetupPreferences(delegate, Config.DEFAULT_NUM_CONNECTIONS_FOR_BTC_PUBLIC); BtcNodesSetupPreferences preferences = new BtcNodesSetupPreferences(delegate, Config.DEFAULT_NUM_CONNECTIONS_FOR_BTC_PUBLIC, null);
List<BtcNode> nodes = preferences.selectPreferredNodes(mock(BtcNodes.class)); List<BtcNode> nodes = preferences.selectPreferredNodes(mock(BtcNodes.class));
assertEquals(2, nodes.size()); assertEquals(2, nodes.size());

View File

@ -102,6 +102,8 @@ public class TestFilter {
1, 1,
1, 1,
1, 1,
Collections.emptyList(),
Collections.emptyList(),
Collections.emptyList() Collections.emptyList()
); );
} }

View File

@ -77,6 +77,8 @@ public class UserPayloadModelVOTest {
0, 0,
0, 0,
0, 0,
Lists.newArrayList(),
Lists.newArrayList(),
Lists.newArrayList())); Lists.newArrayList()));
vo.setRegisteredArbitrator(ArbitratorTest.getArbitratorMock()); vo.setRegisteredArbitrator(ArbitratorTest.getArbitratorMock());