mirror of
https://github.com/aljazceru/lnd-manageJ.git
synced 2026-01-22 23:44:21 +01:00
add "is active" to channel details
This commit is contained in:
@@ -8,6 +8,7 @@ import static de.cotto.lndmanagej.model.ChannelFixtures.CAPACITY;
|
||||
import static de.cotto.lndmanagej.model.ChannelIdFixtures.CHANNEL_ID;
|
||||
import static de.cotto.lndmanagej.model.ChannelPointFixtures.CHANNEL_POINT;
|
||||
import static de.cotto.lndmanagej.model.CoopClosedChannelFixtures.CLOSED_CHANNEL;
|
||||
import static de.cotto.lndmanagej.model.LocalOpenChannelFixtures.LOCAL_OPEN_CHANNEL;
|
||||
import static de.cotto.lndmanagej.model.LocalOpenChannelFixtures.LOCAL_OPEN_CHANNEL_PRIVATE;
|
||||
import static de.cotto.lndmanagej.model.NodeFixtures.ALIAS;
|
||||
import static de.cotto.lndmanagej.model.PubkeyFixtures.PUBKEY_2;
|
||||
@@ -71,6 +72,18 @@ class ChannelDetailsDtoTest {
|
||||
assertThat(dto.privateChannel()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
void active_true() {
|
||||
ChannelDetailsDto dto =
|
||||
new ChannelDetailsDto(LOCAL_OPEN_CHANNEL, ALIAS, BALANCE_INFORMATION, ON_CHAIN_COSTS);
|
||||
assertThat(dto.active()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
void active_false() {
|
||||
assertThat(CHANNEL_DETAILS_DTO.active()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
void balance() {
|
||||
assertThat(CHANNEL_DETAILS_DTO.balance()).isEqualTo(BalanceInformationDto.createFrom(BALANCE_INFORMATION));
|
||||
|
||||
Reference in New Issue
Block a user