Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
69fad2a
Number lookup ga (#37719)
ericasp16 Jan 29, 2024
460abbe
Merge branch 'main' into ericasp/number-lookup-ga-staging
ericasp16 Feb 2, 2024
5ab2972
update generated code
ericasp16 Feb 15, 2024
2e5bae7
update test recordings
ericasp16 Feb 22, 2024
c6dcf56
update package to beta version
ericasp16 Feb 22, 2024
4742713
update service version
ericasp16 Feb 22, 2024
5486811
fix build issues
ericasp16 Feb 22, 2024
688ed2f
Merge branch 'main' into convert-number-lookup-ga-to-preview
ericasp16 Feb 22, 2024
b0c5ef8
fix linting issue
ericasp16 Feb 22, 2024
fa64221
t statusMerge branch 'convert-number-lookup-ga-to-preview' of https:/…
ericasp16 Feb 22, 2024
6b6674d
update to address comments, restore unintentionally modified tests
ericasp16 Mar 7, 2024
05a84ea
restore unintentionally modified tests
ericasp16 Mar 7, 2024
c3e3c7a
Merge branch 'main' into convert-number-lookup-ga-to-preview
ericasp16 Mar 7, 2024
26fc884
restore unintentionally modified tests
ericasp16 Mar 7, 2024
8168d9f
Merge brt status
ericasp16 Mar 7, 2024
8b796fb
fix version_client
ericasp16 Mar 7, 2024
5b25f95
fix import statements
ericasp16 Mar 11, 2024
69cdcf3
update test files
ericasp16 Mar 11, 2024
fe45ae2
update test files
ericasp16 Mar 11, 2024
99fc1b8
update test files
ericasp16 Mar 11, 2024
7d83d13
update searchOperatorInformation tests to redact phone number
ericasp16 Mar 12, 2024
45aac94
update with latest tests
ericasp16 Mar 12, 2024
4118d60
update tests and recordings
ericasp16 Mar 12, 2024
0d54adc
update test files to redact phoneNumbers in request body for searchOp…
ericasp16 Mar 13, 2024
0c9c76c
remove setters on return type fields
ericasp16 Mar 13, 2024
6c257f3
update based on API view comments
ericasp16 Mar 13, 2024
1027aba
fix build errors
ericasp16 Mar 13, 2024
c2938f9
fix sanitizers, update test recordings
ericasp16 Mar 14, 2024
b8e617e
update based on PR comments
ericasp16 Mar 14, 2024
90982e9
fix errors
ericasp16 Mar 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
restore unintentionally modified tests
  • Loading branch information
ericasp16 committed Mar 7, 2024
commit 05a84ea0d4c1538377062d6e1740fb631efb5333
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,7 @@ public void getTollFreeAreaCodesWithAAD(HttpClient httpClient) {
StepVerifier.create(
this.getClientWithManagedIdentity(httpClient, "listAvailableTollFreeAreaCodes")
.listAvailableTollFreeAreaCodes("US", PhoneNumberAssignmentType.APPLICATION).next())
.assertNext((PhoneNumberAreaCode areaCodes) -> {
assertNotNull(areaCodes.getAreaCode());
})
.verifyComplete();
.expectAccessibleContext();
}

@ParameterizedTest
Expand All @@ -282,6 +279,7 @@ public void getGeographicAreaCodesWithAAD(HttpClient httpClient) {
.next())
.assertNext((PhoneNumberAreaCode areaCodes) -> {
assertNotNull(areaCodes);
assertNotNull(areaCodes.getAreaCode());
})
.verifyComplete();
}
Expand Down Expand Up @@ -320,6 +318,7 @@ public void getLocalitiesAdministrativeDivisionWithAAD(HttpClient httpClient) {
.assertNext((PhoneNumberLocality localityWithAD) -> {
assertNotNull(localityWithAD);
assertEquals(localityWithAD.getAdministrativeDivision().getAbbreviatedName(), locality.getAdministrativeDivision().getAbbreviatedName());
assertEquals(localityWithAD.getAdministrativeDivision().getLocalizedName(), locality.getAdministrativeDivision().getLocalizedName());
})
.verifyComplete();
}
Expand All @@ -332,7 +331,10 @@ public void getOfferingsWithAAD(HttpClient httpClient) {
.listAvailableOfferings("US", null, null).next())
.assertNext((PhoneNumberOffering offering) -> {
assertNotNull(offering);
})
offering.getCost().getBillingFrequency();
assertNotNull(BillingFrequency.values());
assertNotNull(offering.getCost().getCurrencyCode());
assertNotNull(offering.getCost().getAmount()); })
.verifyComplete();
}

Expand All @@ -342,26 +344,37 @@ public void getTollFreeAreaCodes(HttpClient httpClient) {
StepVerifier.create(
this.getClientWithConnectionString(httpClient, "listAvailableTollFreeAreaCodes")
.listAvailableTollFreeAreaCodes("US", PhoneNumberAssignmentType.APPLICATION).next())
.expectAccessibleContext();
}

@ParameterizedTest
@MethodSource("com.azure.core.test.TestBase#getHttpClients")
public void getTollFreeAreaCodesWrongCountryCode(HttpClient httpClient) {
StepVerifier.create(
this.getClientWithConnectionString(httpClient, "listAvailableTollFreeAreaCodes")
.listAvailableTollFreeAreaCodes("XX", PhoneNumberAssignmentType.APPLICATION).next())
.expectError();
}

@ParameterizedTest
public void getGeographicAreaCodes(HttpClient httpClient) {
.next())
.assertNext((PhoneNumberAreaCode areaCodes) -> {
assertNotNull(areaCodes);
assertNotNull(areaCodes.getAreaCode());
})
.verifyComplete();
}

@ParameterizedTest
@MethodSource("com.azure.core.test.TestBase#getHttpClients")
public void getGeographicAreaCodes(HttpClient httpClient) {
PhoneNumberLocality locality = this.getClientWithConnectionString(httpClient, "listAvailableLocalities")
.listAvailableLocalities("US", null).blockFirst();
public void getGeographicAreaCodesWronglocality(HttpClient httpClient) {
StepVerifier.create(
this.getClientWithConnectionString(httpClient, "listAvailableGeographicAreaCodes")
.listAvailableGeographicAreaCodes("US", PhoneNumberAssignmentType.PERSON,
locality.getLocalizedName(), locality.getAdministrativeDivision().getAbbreviatedName())
"XX", "XX")
.next())
.assertNext((PhoneNumberAreaCode areaCodes) -> {
assertNotNull(areaCodes);
})
.verifyComplete();
.expectError();
}

@ParameterizedTest
Expand Down Expand Up @@ -391,19 +404,30 @@ public void getLocalities(HttpClient httpClient) {
@ParameterizedTest
@MethodSource("com.azure.core.test.TestBase#getHttpClients")
public void getLocalitiesAdministrativeDivision(HttpClient httpClient) {
String localityAdministraiveDivision = this.getClientWithConnectionString(httpClient, "listAvailableLocalities")
.listAvailableLocalities("US", null).blockFirst().getAdministrativeDivision().getAbbreviatedName();
PhoneNumberAdministrativeDivision localityAdministraiveDivision = this.getClientWithConnectionString(httpClient, "listAvailableLocalities")
.listAvailableLocalities("US", null).blockFirst().getAdministrativeDivision();
StepVerifier.create(
this.getClientWithConnectionString(httpClient, "listAvailableLocalities")
.listAvailableLocalities("US", localityAdministraiveDivision).next())
.listAvailableLocalities("US", localityAdministraiveDivision.getAbbreviatedName()).next())
.assertNext((PhoneNumberLocality locality) -> {
assertNotNull(locality);
assertEquals(locality.getAdministrativeDivision().getAbbreviatedName(),
localityAdministraiveDivision);
localityAdministraiveDivision.getAbbreviatedName());
assertEquals(locality.getAdministrativeDivision().getLocalizedName(),
localityAdministraiveDivision.getLocalizedName());
})
.verifyComplete();
}

@ParameterizedTest
@MethodSource("com.azure.core.test.TestBase#getHttpClients")
public void getLocalitiesInvalidAdministrativeDivision(HttpClient httpClient) {
StepVerifier.create(
this.getClientWithConnectionString(httpClient, "listAvailableLocalities")
.listAvailableLocalities("US", "null").next())
.expectError();
}

@ParameterizedTest
@MethodSource("com.azure.core.test.TestBase#getHttpClients")
public void getOfferings(HttpClient httpClient) {
Expand All @@ -412,6 +436,10 @@ public void getOfferings(HttpClient httpClient) {
.listAvailableOfferings("US", null, null).next())
.assertNext((PhoneNumberOffering offering) -> {
assertNotNull(offering);
offering.getCost().getBillingFrequency();
assertNotNull(BillingFrequency.values());
assertNotNull(offering.getCost().getCurrencyCode());
assertNotNull(offering.getCost().getAmount());
})
.verifyComplete();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,20 @@ public void getTollFreeAreaCodesWrongCountryCode(HttpClient httpClient) {
"Unable to parse country code.");
}

@ParameterizedTest
@MethodSource("com.azure.core.test.TestBase#getHttpClients")
public void getGeographicAreaCodesWithoutContext(HttpClient httpClient) {
PhoneNumberLocality locality = this.getClientWithConnectionString(httpClient, "listAvailableLocalities")
.listAvailableLocalities("US", null).iterator().next();
PagedIterable<PhoneNumberAreaCode> areaCodesResult = this
.getClientWithConnectionString(httpClient, "listAvailableGeographicAreaCodes")
.listAvailableGeographicAreaCodes("US", PhoneNumberAssignmentType.PERSON, locality.getLocalizedName(),
locality.getAdministrativeDivision().getAbbreviatedName());
PhoneNumberAreaCode areaCodes = areaCodesResult.iterator().next();
assertNotNull(areaCodes);
assertNotNull(areaCodes.getAreaCode());
}

@ParameterizedTest
@MethodSource("com.azure.core.test.TestBase#getHttpClients")
public void getGeographicAreaCodes(HttpClient httpClient) {
Expand Down Expand Up @@ -270,7 +284,7 @@ public void getCountries(HttpClient httpClient) {
public void getLocalitiesWithoutContext(HttpClient httpClient) {
PagedIterable<PhoneNumberLocality> localitiesResult = this
.getClientWithConnectionString(httpClient, "listAvailableLocalities")
.listAvailableLocalities("US", null, Context.NONE);
.listAvailableLocalities("US", null);
PhoneNumberLocality locality = localitiesResult.iterator().next();
assertNotNull(locality);
}
Expand All @@ -280,7 +294,7 @@ public void getLocalitiesWithoutContext(HttpClient httpClient) {
public void getLocalities(HttpClient httpClient) {
PagedIterable<PhoneNumberLocality> localitiesResult = this
.getClientWithConnectionString(httpClient, "listAvailableLocalities")
.listAvailableLocalities("US", null);
.listAvailableLocalities("US", null, Context.NONE);
PhoneNumberLocality locality = localitiesResult.iterator().next();
assertNotNull(locality);
}
Expand Down Expand Up @@ -328,7 +342,10 @@ public void getOfferings(HttpClient httpClient) {
PhoneNumberOffering offering = offeringsResult.iterator().next();
assertNotNull(offering);
}
@@ -353,11 +252,8 @@ public void getTollFreeAreaCodesWithAAD(HttpClient httpClient) {

@ParameterizedTest
@MethodSource("com.azure.core.test.TestBase#getHttpClients")
public void getTollFreeAreaCodesWithAAD(HttpClient httpClient) {
PagedIterable<PhoneNumberAreaCode> areaCodesResult = this
.getClientWithManagedIdentity(httpClient, "listAvailableTollFreeAreaCodes")
.listAvailableTollFreeAreaCodes("US");
Expand All @@ -340,15 +357,23 @@ public void getOfferings(HttpClient httpClient) {
}

@ParameterizedTest
@@ -371,7 +267,6 @@ public void getGeographicAreaCodesWithAAD(HttpClient httpClient) {
@MethodSource("com.azure.core.test.TestBase#getHttpClients")
public void getGeographicAreaCodesWithAAD(HttpClient httpClient) {
PhoneNumberLocality locality = this.getClientWithConnectionString(httpClient, "listAvailableLocalities")
.listAvailableLocalities("US", null).iterator().next();
PagedIterable<PhoneNumberAreaCode> areaCodesResult = this
.getClientWithManagedIdentity(httpClient, "listAvailableGeographicAreaCodes")
.listAvailableGeographicAreaCodes("US", PhoneNumberAssignmentType.PERSON, locality.getLocalizedName(),
locality.getAdministrativeDivision().getAbbreviatedName());
PhoneNumberAreaCode areaCodes = areaCodesResult.iterator().next();
assertNotNull(areaCodes);
assertNotNull(areaCodes.getAreaCode());
}

@ParameterizedTest
@@ -381,8 +276,6 @@ public void getCountriesWithAAD(HttpClient httpClient) {
@MethodSource("com.azure.core.test.TestBase#getHttpClients")
public void getCountriesWithAAD(HttpClient httpClient) {
PagedIterable<PhoneNumberCountry> countriesResult = this
.getClientWithManagedIdentity(httpClient, "listAvailableCountries").listAvailableCountries();
PhoneNumberCountry country = countriesResult.iterator().next();
assertNotNull(country);
Expand All @@ -357,7 +382,26 @@ public void getOfferings(HttpClient httpClient) {
}

@ParameterizedTest
@@ -409,7 +302,6 @@ public void getLocalitiesWithAdministrativeDivisionWithAAD(HttpClient httpClient
@MethodSource("com.azure.core.test.TestBase#getHttpClients")
public void getLocalitiesWithAAD(HttpClient httpClient) {
PagedIterable<PhoneNumberLocality> localitiesResult = this
.getClientWithManagedIdentity(httpClient, "listAvailableLocalities")
.listAvailableLocalities("US", null);
PhoneNumberLocality locality = localitiesResult.iterator().next();
assertNotNull(locality);
}

@ParameterizedTest
@MethodSource("com.azure.core.test.TestBase#getHttpClients")
public void getLocalitiesWithAdministrativeDivisionWithAAD(HttpClient httpClient) {
PagedIterable<PhoneNumberLocality> localities = this
.getClientWithManagedIdentity(httpClient, "listAvailableLocalities")
.listAvailableLocalities("US", null);
PhoneNumberLocality localityWithAD = localities.iterator().next();

PagedIterable<PhoneNumberLocality> localitiesResult = this
.getClientWithManagedIdentity(httpClient, "listAvailableLocalities")
.listAvailableLocalities("US", localityWithAD.getAdministrativeDivision().getAbbreviatedName());
PhoneNumberLocality locality = localitiesResult.iterator().next();
assertNotNull(locality);
assertEquals(locality.getAdministrativeDivision().getAbbreviatedName(), localityWithAD.getAdministrativeDivision().getAbbreviatedName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ protected PhoneNumbersClientBuilder getClientBuilderWithConnectionString(HttpCli
private void addTestProxyMatchers() {
interceptorManager.addMatchers(Arrays.asList(
new CustomMatcher().setHeadersKeyOnlyMatch(Arrays.asList("x-ms-hmac-string-to-sign-base64"))));

}

private void addTestProxySanitizer() {
Expand Down