本文整理了Java中com.github.robozonky.common.remote.Zonky.downloadWalletExport()
方法的一些代码示例,展示了Zonky.downloadWalletExport()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Zonky.downloadWalletExport()
方法的具体详情如下:
包路径:com.github.robozonky.common.remote.Zonky
类名称:Zonky
方法名:downloadWalletExport
暂无
代码示例来源:origin: RoboZonky/robozonky
@Test
void triggersWalletDownload() throws ExecutionException, InterruptedException {
final Tenant tenant = mockTenant(zonky);
final CompletableFuture<Optional<File>> c = Export.WALLET.download(tenant);
c.get();
assertThat(c.get()).isPresent();
verify(zonky).downloadWalletExport();
}
代码示例来源:origin: RoboZonky/robozonky
@BeforeEach
void emptyExports() {
server.when(new HttpRequest()).respond(new HttpResponse()); // just return something to be downloaded
final Response response = mock(Response.class);
when(response.getStatus()).thenReturn(302);
when(response.getHeaderString(any())).thenReturn("http://" + serverUrl + "/file");
doReturn(response).when(zonky).downloadWalletExport();
doReturn(response).when(zonky).downloadInvestmentsExport();
}
代码示例来源:origin: RoboZonky/robozonky
@BeforeEach
void emptyExports() {
server.when(new HttpRequest()).respond(new HttpResponse().withBody("")); // just return something to be downloaded
final Response response = mock(Response.class);
when(response.getStatus()).thenReturn(302);
when(response.getHeaderString(any())).thenReturn("http://" + serverUrl + "/file");
doReturn(response).when(zonky).downloadWalletExport();
doReturn(response).when(zonky).downloadInvestmentsExport();
}
代码示例来源:origin: RoboZonky/robozonky
@Test
void passes() {
final Stonky stonky = new Stonky(transport, credential);
final Optional<String> result = stonky.apply(mockTenant(zonky));
assertThat(result).contains(copyOfStonkyMaster.getId());
verify(zonky).downloadInvestmentsExport();
verify(zonky).downloadWalletExport();
}
}
代码示例来源:origin: RoboZonky/robozonky
@Test
void exports() {
final ExportApi api = mock(ExportApi.class);
when(api.downloadInvestmentsExport()).thenReturn(mock(Response.class));
when(api.downloadWalletExport()).thenReturn(mock(Response.class));
final Api<ExportApi> ea = mockApi(api);
final Zonky z = mockZonkyExports(ea);
assertSoftly(softly -> {
softly.assertThat(z.downloadInvestmentsExport()).isNotNull();
softly.assertThat(z.downloadWalletExport()).isNotNull();
});
z.requestInvestmentsExport();
verify(api).requestInvestmentsExport();
z.requestWalletExport();
verify(api).requestWalletExport();
}
内容来源于网络,如有侵权,请联系作者删除!