@@ -39,21 +39,22 @@ public static AzureRMProfile CreateAzureRMProfile(string storageAccount)
39
39
AccountType = "User"
40
40
} ,
41
41
Environment = ( PSAzureEnvironment ) AzureEnvironment . PublicEnvironments [ EnvironmentName . AzureCloud ] ,
42
- Subscription =
43
- new PSAzureSubscription {
42
+ Subscription =
43
+ new PSAzureSubscription
44
+ {
44
45
CurrentStorageAccount = storageAccount ,
45
- CurrentStorageAccountName = PSAzureSubscription . GetAccountName ( storageAccount ) ,
46
+ CurrentStorageAccountName = PSAzureSubscription . GetAccountName ( storageAccount ) ,
46
47
SubscriptionId = subscriptionId . ToString ( ) ,
47
48
SubscriptionName = "Test Subscription 1" ,
48
49
TenantId = tenantId . ToString ( )
49
50
} ,
50
51
Tenant = new PSAzureTenant
51
52
{
52
- Domain = domain ,
53
+ Domain = domain ,
53
54
TenantId = tenantId . ToString ( )
54
55
}
55
56
} ;
56
- return new AzureRMProfile ( ) { Context = context } ;
57
+ return new AzureRMProfile ( ) { Context = context } ;
57
58
}
58
59
59
60
public static AzureSMProfile CreateAzureSMProfile ( string storageAccount )
@@ -99,13 +100,14 @@ public static void RunDataProfileTest(AzureRMProfile rmProfile, AzureSMProfile s
99
100
AzureRmProfileProvider . Instance . Profile = savedRmProfile ;
100
101
AzureSMProfileProvider . Instance . Profile = savedSmProfile ;
101
102
}
102
- }
103
+ }
104
+
103
105
[ Theory ,
104
106
InlineData ( null , null ) ,
105
107
InlineData ( "" , null ) ,
106
108
InlineData ( "AccountName=myAccount" , "AccountName=myAccount" ) ]
107
109
[ Trait ( Category . AcceptanceType , Category . CheckIn ) ]
108
- public void CanClearStorageAccountForSMProfile ( string connectionString , string expected )
110
+ public void CanClearStorageAccountForSMProfile ( string connectionString , string expected )
109
111
{
110
112
RunDataProfileTest (
111
113
CreateAzureRMProfile ( null ) ,
@@ -121,9 +123,9 @@ public void CanClearStorageAccountForSMProfile(string connectionString, string e
121
123
[ Theory ,
122
124
InlineData ( null , null ) ,
123
125
InlineData ( "" , null ) ,
124
- InlineData ( "AccountName=myAccount" , "AccountName=myAccount" ) ]
126
+ InlineData ( "AccountName=myAccount" , "AccountName=myAccount" ) ]
125
127
[ Trait ( Category . AcceptanceType , Category . CheckIn ) ]
126
- public void CanClearStorageAccountForRMProfile ( string connectionString , string expected )
128
+ public void CanClearStorageAccountForRMProfile ( string connectionString , string expected )
127
129
{
128
130
RunDataProfileTest (
129
131
CreateAzureRMProfile ( connectionString ) ,
@@ -138,18 +140,18 @@ public void CanClearStorageAccountForRMProfile(string connectionString, string e
138
140
139
141
[ Fact ]
140
142
[ Trait ( Category . AcceptanceType , Category . CheckIn ) ]
141
- public void CanClearStorageAccountForEmptyProfile ( )
143
+ public void CanClearStorageAccountForEmptyProfile ( )
142
144
{
143
145
var rmProfile = new AzureRMProfile ( ) ;
144
146
rmProfile . Context = new AzureContext ( null , null , null , null ) ;
145
- RunDataProfileTest (
146
- rmProfile ,
147
- new AzureSMProfile ( ) ,
148
- ( ) =>
149
- {
150
- GeneralUtilities . ClearCurrentStorageAccount ( true ) ;
151
- Assert . True ( string . IsNullOrEmpty ( AzureSMProfileProvider . Instance . Profile . Context . GetCurrentStorageAccountName ( ) ) ) ;
152
- } ) ;
147
+ RunDataProfileTest (
148
+ rmProfile ,
149
+ new AzureSMProfile ( ) ,
150
+ ( ) =>
151
+ {
152
+ GeneralUtilities . ClearCurrentStorageAccount ( true ) ;
153
+ Assert . True ( string . IsNullOrEmpty ( AzureSMProfileProvider . Instance . Profile . Context . GetCurrentStorageAccountName ( ) ) ) ;
154
+ } ) ;
153
155
}
154
- }
156
+ }
155
157
}
0 commit comments