Skip to content

Commit

Permalink
Checking the default Charset value and the explicitly set one in the …
Browse files Browse the repository at this point in the history
…unit tests.
  • Loading branch information
byarger-ebay committed Aug 16, 2023
1 parent fb078e1 commit 9818c77
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import static org.hamcrest.Matchers.*;
import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.contains;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.*;
import static org.testng.AssertJUnit.fail;

Expand Down Expand Up @@ -641,7 +642,7 @@ public void sendRequest() throws Exception {
processor = new NSTServiceWrapperProcessor(client);
processor.sendRequest(request);

verify(client, times(1)).sendRequest(Mockito.any(NSTHttpRequest.class), Mockito.any(Charset.class));
verify(client, times(1)).sendRequest(Mockito.any(NSTHttpRequest.class), eq(StandardCharsets.UTF_8));
}

@Test
Expand All @@ -656,7 +657,7 @@ public void sendRequestWithAlternateCharacterSetUsedToParseResponse() throws Exc
processor.setResponseParsingCharset(StandardCharsets.ISO_8859_1);
processor.sendRequest(request);

verify(client, times(1)).sendRequest(Mockito.any(NSTHttpRequest.class), Mockito.any(Charset.class));
verify(client, times(1)).sendRequest(Mockito.any(NSTHttpRequest.class), eq(StandardCharsets.ISO_8859_1));
}

@Test
Expand Down

0 comments on commit 9818c77

Please sign in to comment.