Skip to content

Commit ac0c5a3

Browse files
authored
Merge pull request Azure#9741 from solankisamir/removeidrestrictions
Update nuget to 4.11 and implemented GetProducts by ApiId
2 parents eca2124 + 16a7e65 commit ac0c5a3

39 files changed

+4264
-4135
lines changed

src/ApiManagement/ApiManagement.ServiceManagement.Test/ApiManagement.ServiceManagement.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Microsoft.Azure.Management.ApiManagement" Version="4.10.0-preview" />
14+
<PackageReference Include="Microsoft.Azure.Management.ApiManagement" Version="4.11.0-preview" />
1515
</ItemGroup>
1616

1717
<ItemGroup>

src/ApiManagement/ApiManagement.ServiceManagement.Test/ScenarioTests/ApiManagementTests.ps1

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,6 +1048,33 @@ function Product-CrudTest {
10481048
Assert-NotNull $newProduct
10491049
Assert-AreEqual $productName $newProduct.Title
10501050

1051+
# get the product by apiId
1052+
$products = Get-AzApiManagementProduct -Context $context -ApiId $apis[0].ApiId
1053+
Assert-NotNull $products
1054+
1055+
# there should be 3 products
1056+
Assert-AreEqual 3 $products.Count
1057+
1058+
$found = 0
1059+
for ($i = 0; $i -lt $products.Count; $i++) {
1060+
Assert-NotNull $products[$i].ProductId
1061+
Assert-NotNull $products[$i].Description
1062+
Assert-AreEqual Published $products[$i].State
1063+
1064+
if ($products[$i].Title -eq 'Starter') {
1065+
$found += 1;
1066+
}
1067+
1068+
if ($products[$i].Title -eq 'Unlimited') {
1069+
$found += 1;
1070+
}
1071+
1072+
if ($products[$i].Title -eq $productName) {
1073+
$found += 1;
1074+
}
1075+
}
1076+
Assert-AreEqual 3 $found
1077+
10511078
#remove api from product
10521079
Get-AzApiManagementApi -Context $context | Remove-AzApiManagementApiFromProduct -Context $context -ProductId $productId
10531080

src/ApiManagement/ApiManagement.ServiceManagement.Test/SessionRecords/Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Test.ScenarioTests.ApiManagementTests/ApiCloneCrudTest.json

Lines changed: 213 additions & 213 deletions
Large diffs are not rendered by default.

src/ApiManagement/ApiManagement.ServiceManagement.Test/SessionRecords/Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Test.ScenarioTests.ApiManagementTests/ApiCrudTest.json

Lines changed: 141 additions & 141 deletions
Large diffs are not rendered by default.

src/ApiManagement/ApiManagement.ServiceManagement.Test/SessionRecords/Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Test.ScenarioTests.ApiManagementTests/ApiDiagnosticCrudTest.json

Lines changed: 122 additions & 122 deletions
Large diffs are not rendered by default.

src/ApiManagement/ApiManagement.ServiceManagement.Test/SessionRecords/Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Test.ScenarioTests.ApiManagementTests/ApiImportExportOpenApiTest.json

Lines changed: 104 additions & 104 deletions
Large diffs are not rendered by default.

src/ApiManagement/ApiManagement.ServiceManagement.Test/SessionRecords/Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Test.ScenarioTests.ApiManagementTests/ApiImportExportSwaggerTest.json

Lines changed: 104 additions & 104 deletions
Large diffs are not rendered by default.

src/ApiManagement/ApiManagement.ServiceManagement.Test/SessionRecords/Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Test.ScenarioTests.ApiManagementTests/ApiImportExportWadlTest.json

Lines changed: 47 additions & 47 deletions
Large diffs are not rendered by default.

src/ApiManagement/ApiManagement.ServiceManagement.Test/SessionRecords/Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Test.ScenarioTests.ApiManagementTests/ApiImportExportWsdlTest.json

Lines changed: 102 additions & 102 deletions
Large diffs are not rendered by default.

src/ApiManagement/ApiManagement.ServiceManagement.Test/SessionRecords/Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Test.ScenarioTests.ApiManagementTests/ApiRevisionCrudTest.json

Lines changed: 236 additions & 236 deletions
Large diffs are not rendered by default.

src/ApiManagement/ApiManagement.ServiceManagement.Test/SessionRecords/Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Test.ScenarioTests.ApiManagementTests/ApiSchemaCrudOnSwaggerApiTest.json

Lines changed: 121 additions & 121 deletions
Large diffs are not rendered by default.

src/ApiManagement/ApiManagement.ServiceManagement.Test/SessionRecords/Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Test.ScenarioTests.ApiManagementTests/ApiSchemaCrudOnWsdlApiTest.json

Lines changed: 100 additions & 100 deletions
Large diffs are not rendered by default.

src/ApiManagement/ApiManagement.ServiceManagement.Test/SessionRecords/Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Test.ScenarioTests.ApiManagementTests/ApiVersionSetCrudTest.json

Lines changed: 122 additions & 122 deletions
Large diffs are not rendered by default.

src/ApiManagement/ApiManagement.ServiceManagement.Test/SessionRecords/Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Test.ScenarioTests.ApiManagementTests/AuthorizationServerCrudTest.json

Lines changed: 101 additions & 101 deletions
Large diffs are not rendered by default.

src/ApiManagement/ApiManagement.ServiceManagement.Test/SessionRecords/Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Test.ScenarioTests.ApiManagementTests/BackendCrudTest.json

Lines changed: 99 additions & 99 deletions
Large diffs are not rendered by default.

src/ApiManagement/ApiManagement.ServiceManagement.Test/SessionRecords/Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Test.ScenarioTests.ApiManagementTests/BackendServiceFabricCrudTest.json

Lines changed: 132 additions & 132 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)