Skip to content

Commit

Permalink
- Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
nwithan8 committed Nov 15, 2023
1 parent 3757a88 commit 713dbb7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/test/java/com/easypost/AddressTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.easypost.exception.General.EndOfPaginationError;
import com.easypost.model.Address;
import com.easypost.model.AddressCollection;
import com.easypost.model.Error;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

Expand All @@ -14,6 +15,7 @@
import java.util.Map;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
Expand Down Expand Up @@ -81,8 +83,14 @@ public void testCreateVerify() throws EasyPostException {
assertEquals("417 MONTGOMERY ST FL 5", address.getStreet1());

assertNotNull(address.getVerifications());
assertNotNull(address.getVerifications().getZip4().getErrors()); // Should have a error due to second line
assertNotNull(address.getVerifications().getDelivery().getErrors());

assertFalse(address.getVerifications().getDelivery().getErrors().isEmpty()); // should have at least one error
Error error = address.getVerifications().getDelivery().getErrors().get(0);
assertEquals("E.SECONDARY_INFORMATION.INVALID", error.getCode());

assertFalse(address.getVerifications().getZip4().getErrors().isEmpty()); // should have at least one error
error = address.getVerifications().getZip4().getErrors().get(0);
assertEquals("E.SECONDARY_INFORMATION.INVALID", error.getCode());
}

/**
Expand Down

0 comments on commit 713dbb7

Please sign in to comment.