mirror of
https://github.com/aljazceru/lnd-manageJ.git
synced 2026-01-22 07:24:23 +01:00
add online report
This commit is contained in:
@@ -13,6 +13,7 @@ import static de.cotto.lndmanagej.model.FeeReportFixtures.FEE_REPORT;
|
||||
import static de.cotto.lndmanagej.model.NodeDetailsFixtures.NODE_DETAILS;
|
||||
import static de.cotto.lndmanagej.model.NodeFixtures.ALIAS;
|
||||
import static de.cotto.lndmanagej.model.OnChainCostsFixtures.ON_CHAIN_COSTS;
|
||||
import static de.cotto.lndmanagej.model.OnlineReportFixtures.ONLINE_REPORT;
|
||||
import static de.cotto.lndmanagej.model.PubkeyFixtures.PUBKEY;
|
||||
import static de.cotto.lndmanagej.model.RebalanceReportFixtures.REBALANCE_REPORT;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
@@ -29,7 +30,7 @@ class NodeDetailsDtoTest {
|
||||
List.of(CHANNEL_ID_4),
|
||||
OnChainCostsDto.createFromModel(ON_CHAIN_COSTS),
|
||||
BalanceInformationDto.createFromModel(BALANCE_INFORMATION_2),
|
||||
true,
|
||||
OnlineReportDto.createFromModel(ONLINE_REPORT),
|
||||
FeeReportDto.createFromModel(FEE_REPORT),
|
||||
RebalanceReportDto.createFromModel(REBALANCE_REPORT)
|
||||
);
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package de.cotto.lndmanagej.controller.dto;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static de.cotto.lndmanagej.model.OnlineReportFixtures.ONLINE_REPORT;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
class OnlineReportDtoTest {
|
||||
@Test
|
||||
void createFromModel() {
|
||||
assertThat(OnlineReportDto.createFromModel(ONLINE_REPORT)).isEqualTo(
|
||||
new OnlineReportDto(ONLINE_REPORT.online(), ONLINE_REPORT.since().toString())
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
void since() {
|
||||
assertThat(OnlineReportDto.createFromModel(ONLINE_REPORT).since()).isEqualTo("2021-12-23T01:02:03Z");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user