File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed
src/ResourceManager/Resources
Commands.Resources/Providers
Commands.Resources.Test/ScenarioTests Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -20,11 +20,9 @@ function Test-AzureLocation
20
20
{
21
21
$providerLocations = Get-AzureRmLocation
22
22
23
- Assert-AreEqual 22 $providerLocations.Count
24
-
25
- $eastAsiaLocation = $providerLocations [0 ]
26
-
27
- Assert-AreEqual " eastasia" $eastAsiaLocation.Location
28
- Assert-AreEqual " East Asia" $eastAsiaLocation.DisplayName
29
- Assert-AreEqual 36 $eastAsiaLocation.Providers.Count
23
+ Assert-True { $providerLocations.Count -gt 0 }
24
+ foreach ($location in $providerLocations )
25
+ {
26
+ Assert-True { $location.Providers.Count -gt 0 }
27
+ }
30
28
}
Original file line number Diff line number Diff line change @@ -39,7 +39,6 @@ public override void ExecuteCmdlet()
39
39
40
40
var allLocations = this . ResourcesClient . ListLocations ( DefaultContext . Subscription . Id . ToString ( ) ) ;
41
41
var providers = this . ResourcesClient . ListResourceProviders ( providerName : null , listAvailable : true ) ;
42
-
43
42
var providerLocations = ConstructResourceProviderLocations ( allLocations , providers ) ;
44
43
45
44
this . WriteObject ( providerLocations , enumerateCollection : true ) ;
@@ -69,8 +68,7 @@ private List<PSResourceProviderLocation> ConstructResourceProviderLocations(List
69
68
70
69
private Dictionary < string , List < string > > GetLocationProviderMap ( List < Provider > providers )
71
70
{
72
- var locationMap = new Dictionary < string , List < string > > ( ) ;
73
-
71
+ var locationMap = new Dictionary < string , List < string > > ( StringComparer . InvariantCultureIgnoreCase ) ;
74
72
providers . CoalesceEnumerable ( )
75
73
. ForEach ( provider => AddResourceProvider ( provider , locationMap ) ) ;
76
74
You can’t perform that action at this time.
0 commit comments