com.github.robozonky.common.remote.Zonky.getBlockedAmounts()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(139)

本文整理了Java中com.github.robozonky.common.remote.Zonky.getBlockedAmounts()方法的一些代码示例,展示了Zonky.getBlockedAmounts()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Zonky.getBlockedAmounts()方法的具体详情如下:
包路径:com.github.robozonky.common.remote.Zonky
类名称:Zonky
方法名:getBlockedAmounts

Zonky.getBlockedAmounts介绍

[英]Retrieve blocked amounts from user's wallet via WalletApi.
[中]通过WalletApi从用户的钱包中检索阻止的金额。

代码示例

代码示例来源:origin: com.github.robozonky/robozonky-test

protected static Zonky harmlessZonky(final int availableBalance) {
  final Zonky zonky = mock(Zonky.class);
  final BigDecimal balance = BigDecimal.valueOf(availableBalance);
  when(zonky.getWallet()).thenReturn(new Wallet(1, 2, balance, balance));
  when(zonky.getRestrictions()).thenReturn(new Restrictions(true));
  when(zonky.getBlockedAmounts()).thenAnswer(i -> Stream.empty());
  when(zonky.getStatistics()).thenReturn(Statistics.empty());
  when(zonky.getDevelopments(anyInt())).thenAnswer(i -> Stream.empty());
  return zonky;
}

代码示例来源:origin: RoboZonky/robozonky

protected static Zonky harmlessZonky(final int availableBalance) {
  final Zonky zonky = mock(Zonky.class);
  final BigDecimal balance = BigDecimal.valueOf(availableBalance);
  when(zonky.getWallet()).thenReturn(new Wallet(1, 2, balance, balance));
  when(zonky.getRestrictions()).thenReturn(new Restrictions(true));
  when(zonky.getBlockedAmounts()).thenAnswer(i -> Stream.empty());
  when(zonky.getStatistics()).thenReturn(Statistics.empty());
  when(zonky.getDevelopments(anyInt())).thenAnswer(i -> Stream.empty());
  return zonky;
}

代码示例来源:origin: RoboZonky/robozonky

@Test
void getters() {
  final Zonky z = mockZonky();
  assertSoftly(softly -> {
    softly.assertThat(z.getAvailableLoans(Select.unrestricted())).isEmpty();
    softly.assertThat(z.getBlockedAmounts()).isEmpty();
    softly.assertThat(z.getInvestments(Select.unrestricted())).isEmpty();
    softly.assertThat(z.getInvestment(1)).isEmpty();
    softly.assertThat(z.getDelinquentInvestments()).isEmpty();
    softly.assertThat(z.getAvailableParticipations(Select.unrestricted())).isEmpty();
    softly.assertThat(z.getTransactions(Select.unrestricted())).isEmpty();
    softly.assertThat(z.getDevelopments(1)).isEmpty();
  });
}

相关文章