gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-14 00:49:31 26 4
gpt4 key购买 nike

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

Zonky.downloadInvestmentsExport介绍

暂无

代码示例

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

@Test
  void fails() throws ExecutionException, InterruptedException {
    final Tenant tenant = mockTenant(zonky);
    doThrow(IllegalStateException.class).when(zonky).downloadInvestmentsExport();
    final CompletableFuture<Optional<File>> c = Export.INVESTMENTS.download(tenant, Duration.ofSeconds(2));
    assertThat(c.get()).isEmpty();
  }
}

代码示例来源: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 triggersInvestmentsDownload() throws ExecutionException, InterruptedException {
  final Tenant tenant = mockTenant(zonky);
  final CompletableFuture<Optional<File>> c = Export.INVESTMENTS.download(tenant);
  assertThat(c.get()).isPresent();
  verify(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();
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com