Skip to content

Commit

Permalink
100% coverage on ProactiveConnect
Browse files Browse the repository at this point in the history
  • Loading branch information
SMadani committed Oct 20, 2023
1 parent 13669dc commit b442d5b
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.vonage.client.ClientTest;
import com.vonage.client.RestEndpoint;
import com.vonage.client.VonageClientException;
import com.vonage.client.VonageUnexpectedException;
import com.vonage.client.common.HalLinks;
import com.vonage.client.common.HalPageResponse;
import com.vonage.client.common.HttpMethod;
Expand Down Expand Up @@ -432,8 +433,7 @@ public void testDeleteListItem() throws Exception {
@Test
public void testDownloadListItems() throws Exception {
String stub = "<BINARY>";
String parsed = stubResponseAndGet(stub, () -> client.downloadListItems(SAMPLE_LIST_ID));
assertEquals(stub, parsed);
assertEquals(stub, stubResponseAndGet(stub, () -> client.downloadListItems(SAMPLE_LIST_ID)));
stubResponseAndAssertThrows(stub, () ->
client.downloadListItems(null), NullPointerException.class
);
Expand All @@ -445,6 +445,9 @@ public void testDownloadListItems() throws Exception {
fileContents = Files.readAllBytes(SAMPLE_CSV_PATH);
assertEquals(stub, new String(fileContents));

stubResponseAndAssertThrows(stub, () ->
client.downloadListItems(SAMPLE_LIST_ID, Paths.get("/")), VonageUnexpectedException.class
);
stubResponseAndAssertThrows(stub, () ->
client.downloadListItems(SAMPLE_LIST_ID, null), NullPointerException.class
);
Expand Down

0 comments on commit b442d5b

Please sign in to comment.