Skip to content

Commit

Permalink
Changed V3 endpoints to V4
Browse files Browse the repository at this point in the history
  • Loading branch information
arao6 committed Sep 1, 2020
1 parent fb5baaa commit b8d2e1f
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/test/java/com/hyperwallet/clientsdk/HyperwalletTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void testConstructor_withCustomServer() throws Exception {

@Test
public void testLisUser_noTLSIssues() {
Hyperwallet client = new Hyperwallet("test-username", "test-password","test-program-token","https://api.sandbox.hyperwallet.com/rest/v4" );
Hyperwallet client = new Hyperwallet("test-username", "test-password");
try {
client.listUsers();
fail("Expect HyperwalletException");
Expand All @@ -71,7 +71,7 @@ public void testLisUser_noTLSIssues() {
// Users
//--------------------------------------

// @Test
@Test
public void testCreateUser_noUser() {
Hyperwallet client = new Hyperwallet("test-username", "test-password");
try {
Expand Down Expand Up @@ -289,9 +289,8 @@ public void testUpdateUser_successful() throws Exception {
@Test
public void testListUsers_noParameters() throws Exception {
HyperwalletList<HyperwalletUser> response = new HyperwalletList<HyperwalletUser>();
String program_token = "test-program-token";
String custom_server = "https://api.sandbox.hyperwallet.com/rest/v4";
Hyperwallet client = new Hyperwallet("test-username", "test-password", program_token, custom_server);

Hyperwallet client = new Hyperwallet("test-username", "test-password");
HyperwalletApiClient mockApiClient = createAndInjectHyperwalletApiClientMock(client);

Mockito.when(mockApiClient.get(Mockito.anyString(), Mockito.any(TypeReference.class))).thenReturn(response);
Expand All @@ -305,8 +304,8 @@ public void testListUsers_noParameters() throws Exception {
@Test
public void testListUsers_withParameters() throws Exception {
HyperwalletList<HyperwalletUser> response = new HyperwalletList<HyperwalletUser>();
String custom_server = "https://api.sandbox.hyperwallet.com/rest/v4";
Hyperwallet client = new Hyperwallet("test-username", "test-password", custom_server);

Hyperwallet client = new Hyperwallet("test-username", "test-password");
HyperwalletApiClient mockApiClient = createAndInjectHyperwalletApiClientMock(client);

HyperwalletPaginationOptions options = new HyperwalletPaginationOptions();
Expand Down

0 comments on commit b8d2e1f

Please sign in to comment.