本文整理了Java中com.github.robozonky.common.remote.Zonky.getAvailableLoans()
方法的一些代码示例,展示了Zonky.getAvailableLoans()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Zonky.getAvailableLoans()
方法的具体详情如下:
包路径:com.github.robozonky.common.remote.Zonky
类名称:Zonky
方法名:getAvailableLoans
[英]Retrieve loans from marketplace via LoanApi.
[中]通过LoanApi从市场获取贷款。
代码示例来源:origin: com.github.robozonky/robozonky-app
@Override
public Collection<LoanDescriptor> getMarketplace() {
return tenant.call(zonky -> zonky.getAvailableLoans(SELECT))
.filter(l -> !l.getMyInvestment().isPresent()) // re-investing would fail
.map(LoanDescriptor::new)
.filter(PrimaryMarketplaceAccessor::isActionable)
.collect(Collectors.toList());
}
代码示例来源:origin: RoboZonky/robozonky
@Override
public Stream<LoanDescriptor> readMarketplace(final Tenant tenant) {
return tenant.call(zonky -> zonky.getAvailableLoans(SELECT))
.filter(l -> !l.getMyInvestment().isPresent()) // re-investing would fail
.map(LoanDescriptor::new)
.filter(InvestingOperationDescriptor::isActionable);
}
代码示例来源: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();
});
}
内容来源于网络,如有侵权,请联系作者删除!