rename "policies" to "policies for local channel"

This commit is contained in:
Carsten Otto
2022-03-22 20:16:02 +01:00
parent 60f09236c5
commit aaf4cc9b37
20 changed files with 106 additions and 96 deletions

View File

@@ -37,7 +37,7 @@ import static de.cotto.lndmanagej.model.LocalOpenChannelFixtures.TOTAL_SENT;
import static de.cotto.lndmanagej.model.LocalOpenChannelFixtures.TOTAL_SENT_2;
import static de.cotto.lndmanagej.model.NodeFixtures.ALIAS;
import static de.cotto.lndmanagej.model.NodeFixtures.ALIAS_2;
import static de.cotto.lndmanagej.model.PolicyFixtures.POLICIES;
import static de.cotto.lndmanagej.model.PolicyFixtures.POLICIES_FOR_LOCAL_CHANNEL;
import static de.cotto.lndmanagej.model.PubkeyFixtures.PUBKEY_2;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.core.Is.is;
@@ -227,7 +227,7 @@ class ChannelControllerIT {
@Test
void getPolicies() throws Exception {
when(channelService.getLocalChannel(CHANNEL_ID)).thenReturn(Optional.of(LOCAL_OPEN_CHANNEL));
when(policyService.getPolicies(CHANNEL_ID)).thenReturn(POLICIES);
when(policyService.getPolicies(LOCAL_OPEN_CHANNEL)).thenReturn(POLICIES_FOR_LOCAL_CHANNEL);
mockMvc.perform(get(CHANNEL_PREFIX + "/policies"))
.andExpect(jsonPath("$.local.feeRatePpm", is(100)))
.andExpect(jsonPath("$.local.baseFeeMilliSat", is(10)))
@@ -274,4 +274,4 @@ class ChannelControllerIT {
.andExpect(jsonPath("$.earnedMilliSat", is("1234")))
.andExpect(jsonPath("$.sourcedMilliSat", is("567")));
}
}
}