本文整理了Java中com.github.robozonky.common.remote.Zonky.getBlockedAmounts()
方法的一些代码示例,展示了Zonky.getBlockedAmounts()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Zonky.getBlockedAmounts()
方法的具体详情如下:
包路径:com.github.robozonky.common.remote.Zonky
类名称: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();
});
}
内容来源于网络,如有侵权,请联系作者删除!