Skip to content

Commit

Permalink
- Add docstring
Browse files Browse the repository at this point in the history
- Remove dead code from unit test
  • Loading branch information
nwithan8 committed Jul 24, 2024
1 parent 6b3992f commit aad4a3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/test/java/com/easypost/CarrierAccountTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,6 @@ public void testCreateWithCustomWorkflow() throws EasyPostException {
public void testCreateWithUPS() throws EasyPostException {
vcr.setUpTest("create_with_ups");

Map<String, Object> data = new HashMap<>();
data.put("type", "UpsAccount");
data.put("account_number", "123456789");

CarrierAccount upsAccount = createUpsCarrierAccount();

assertInstanceOf(CarrierAccount.class, upsAccount);
Expand Down
6 changes: 6 additions & 0 deletions src/test/java/com/easypost/HookTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ public static Object testRequestHooks(RequestHookResponses data) {
return true;
}

/**
* Test subscribing a response hook when an HTTP error occurs.
*
* @param data The ResponseHookResponses object representing the hook data.
* @return The result of the test.
*/
public static Object testResponseHookOnHttpError(ResponseHookResponses data) {
assertEquals("https://api.easypost.com/v2/parcels/par_123", data.getPath());
assertEquals("GET", data.getMethod());
Expand Down

0 comments on commit aad4a3f

Please sign in to comment.