use of com.github.robozonky.api.remote.ControlApi in project robozonky by RoboZonky.
the class ZonkyTest method cancel.
@Test
void cancel() {
final ControlApi control = mock(ControlApi.class);
final Api<ControlApi> ca = mockApi(control);
final PaginatedApi<RawLoan, LoanApi> la = mockApi();
final PaginatedApi<BlockedAmount, WalletApi> wa = mockApi();
final PaginatedApi<RawInvestment, PortfolioApi> pa = mockApi();
final PaginatedApi<Participation, ParticipationApi> sa = mockApi();
final PaginatedApi<RawDevelopment, CollectionsApi> caa = mockApi();
final Zonky z = new Zonky(ca, la, sa, pa, wa, caa);
final Investment i = mock(Investment.class);
when(i.getId()).thenReturn(1);
z.cancel(i);
verify(control).cancel(eq(i.getId()));
}
Aggregations