Skip to content

Commit 2dbabd7

Browse files
committed
Document utility functions
1 parent cca02f3 commit 2dbabd7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/test/java/org/openapitools/client/api/PhoneNumberLookupApiTest.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ public class PhoneNumberLookupApiTest {
3131
private final PhoneNumberLookupApi api = new PhoneNumberLookupApi(defaultClient);
3232
LookupRequest lookupRequest = new LookupRequest();
3333

34+
/**
35+
* Validate a LookupResult object
36+
*
37+
* @param result A LookupResult object
38+
* @param phoneNumber A String phone number in E164 format to check against the
39+
* E164 format value in the result
40+
*/
3441
private void validateResult(LookupResult result, String phoneNumber) {
3542
if (result.getMobileCountryCode() != null || result.getMobileNetworkCode() != null) {
3643
assertThat(result.getMobileCountryCode(), instanceOf(String.class));
@@ -50,6 +57,13 @@ private void validateResult(LookupResult result, String phoneNumber) {
5057
assertThat(result.getE164Format(), is(phoneNumber));
5158
}
5259

60+
/**
61+
* Poll for a completed TN Lookup order
62+
*
63+
* @param requestId String requestId to poll for
64+
* @return the completed lookup status
65+
* @throws Exception If status was not complete after 5 attempts
66+
*/
5367
private LookupStatus pollLookupStatus(String requestId) throws Exception {
5468
int attempt = 1;
5569
LookupStatus lookupStatus = this.api.getLookupStatus(BW_ACCOUNT_ID, requestId);

0 commit comments

Comments
 (0)