mirror of
https://github.com/aljazceru/lnd-manageJ.git
synced 2026-01-28 18:34:30 +01:00
add test
This commit is contained in:
@@ -15,7 +15,9 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import static de.cotto.lndmanagej.model.LocalOpenChannelFixtures.LOCAL_OPEN_CHANNEL;
|
||||
import static de.cotto.lndmanagej.model.LocalOpenChannelFixtures.LOCAL_OPEN_CHANNEL_2;
|
||||
import static de.cotto.lndmanagej.model.LocalOpenChannelFixtures.LOCAL_OPEN_CHANNEL_TO_NODE_3;
|
||||
import static de.cotto.lndmanagej.model.PubkeyFixtures.PUBKEY_2;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.ArgumentMatchers.argThat;
|
||||
import static org.mockito.Mockito.verify;
|
||||
@@ -57,4 +59,10 @@ class StatusControllerTest {
|
||||
assertThat(statusController.getPubkeysForOpenChannels()).isEqualTo(new PubkeysDto(expectedPubkeys));
|
||||
verify(metrics).mark(argThat(name -> name.endsWith(".getPubkeysForOpenChannels")));
|
||||
}
|
||||
|
||||
@Test
|
||||
void getPeerPubkeys_without_no_duplicates() {
|
||||
when(channelService.getOpenChannels()).thenReturn(Set.of(LOCAL_OPEN_CHANNEL, LOCAL_OPEN_CHANNEL_2));
|
||||
assertThat(statusController.getPubkeysForOpenChannels().pubkeys()).containsExactly(PUBKEY_2.toString());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user