Skip to content

Commit

Permalink
Adding in extra exception handling so error messages from retrieving …
Browse files Browse the repository at this point in the history
…auth code are surfaced to the API consumer
  • Loading branch information
johnsully83 committed Mar 6, 2024
1 parent b16960c commit 7bbf6a1
Showing 1 changed file with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import org.junit.jupiter.api.Test;

import com.bullhornsdk.data.BaseTest;
import com.bullhornsdk.data.api.BullhornRestCredentials;
import com.bullhornsdk.data.api.StandardBullhornData;

public class TestAuthorizationCodeException extends BaseTest {

Expand All @@ -23,20 +21,6 @@ public void testInvalidCredentials() {
Assert.assertEquals("Invalid credentials.", exception.getDetailMessage());
}

@Test
public void testBullhornDataInvalidCredentials() {
BullhornRestCredentials restCredentials = new BullhornRestCredentials();
restCredentials.setUsername("octopus.api.user");
restCredentials.setPassword("invalidPassword");
restCredentials.setRestClientId("b627302e-e971-4a8b-b122-91c622f6bf39");

try {
new StandardBullhornData(restCredentials);
} catch (RestApiException e) {
Assert.assertEquals("Invalid credentials.", e.getDetailMessage());
}
}

private static final String ACCOUNT_LOCKED_OUT_HTML = "\n" +
"\n" +
"\n" +
Expand Down

0 comments on commit 7bbf6a1

Please sign in to comment.