Skip to content

Commit a3ca5dc

Browse files
committed
Moving model classes and updating scenario tests
1 parent b2adc4f commit a3ca5dc

22 files changed

+55
-80
lines changed

src/ResourceManager/Common/Commands.ResourceManager.Common/Commands.ResourceManager.Common.csproj

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,18 +185,12 @@
185185
<Compile Include="AccessTokenExtensions.cs" />
186186
<Compile Include="AzureRmCmdlet.cs" />
187187
<Compile Include="ModelExtensions.cs" />
188-
<Compile Include="Models\PSAzureAccount.cs" />
189-
<Compile Include="Models\PSAzureProfile.cs" />
190-
<Compile Include="Models\PSAzureContext.cs" />
191-
<Compile Include="Models\PSAzureEnvironment.cs" />
192-
<Compile Include="Models\PSAzureTenant.cs" />
193188
<Compile Include="Properties\AssemblyInfo.cs" />
194189
<Compile Include="Properties\Resources.Designer.cs">
195190
<AutoGen>True</AutoGen>
196191
<DesignTime>True</DesignTime>
197192
<DependentUpon>Resources.resx</DependentUpon>
198193
</Compile>
199-
<Compile Include="Models\PSAzureSubscription.cs" />
200194
<Compile Include="RMProfileClient.cs" />
201195
<None Include="packages.config">
202196
<SubType>Designer</SubType>

src/ResourceManager/Profile/Commands.Profile.Test/Commands.Profile.Test.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="..\..\..\packages\xunit.runner.visualstudio.2.0.1\build\net20\xunit.runner.visualstudio.props" Condition="Exists('..\..\..\packages\xunit.runner.visualstudio.2.0.1\build\net20\xunit.runner.visualstudio.props')" />
4-
<Import Project="..\..\..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props" Condition="Exists('..\..\..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props')" />
54
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
65
<PropertyGroup>
76
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>

src/ResourceManager/Profile/Commands.Profile.Test/EnvironmentCmdletTests.cs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,19 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Microsoft.WindowsAzure.Commands.Utilities.Common;
16-
using Microsoft.Azure.Commands.Profile;
17-
using Microsoft.Azure.Commands.ResourceManager.Common;
15+
using System;
16+
using System.Management.Automation;
17+
using System.Collections.Generic;
1818
using Microsoft.Azure.Common.Authentication;
1919
using Microsoft.Azure.Common.Authentication.Models;
20-
using Microsoft.WindowsAzure.Commands.Common.Test.Mocks;
20+
using Microsoft.Azure.Commands.Profile;
21+
using Microsoft.Azure.Commands.Profile.Models;
22+
using Microsoft.Azure.Commands.ResourceManager.Common;
2123
using Microsoft.WindowsAzure.Commands.ScenarioTest;
22-
using System.Linq;
23-
using Xunit;
24-
using System;
2524
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
25+
using Microsoft.WindowsAzure.Commands.Utilities.Common;
2626
using Moq;
27-
using System.Management.Automation;
28-
using System.Collections.Generic;
29-
using Microsoft.Azure.Commands.ResourceManager.Common.Models;
27+
using Xunit;
3028

3129
namespace Microsoft.Azure.Commands.ResourceManager.Profile.Test
3230
{

src/ResourceManager/Profile/Commands.Profile.Test/SubscriptionCmdletTests.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,9 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Microsoft.WindowsAzure.Commands.Utilities.Common;
16-
using Microsoft.Azure.Commands.Profile;
17-
using Microsoft.Azure.Commands.ResourceManager.Common;
18-
using Microsoft.Azure.Common.Authentication;
19-
using Microsoft.Azure.Common.Authentication.Models;
20-
using Microsoft.WindowsAzure.Commands.Common.Test.Mocks;
15+
using Microsoft.Azure.Commands.Resources.Test.ScenarioTests;
2116
using Microsoft.WindowsAzure.Commands.ScenarioTest;
22-
using System.Linq;
2317
using Xunit;
24-
using System;
25-
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
26-
using Hyak.Common;
27-
using System.Management.Automation;
28-
using Microsoft.Azure.Commands.Resources.Test.ScenarioTests;
2918

3019
namespace Microsoft.Azure.Commands.Profile.Test
3120
{

src/ResourceManager/Profile/Commands.Profile.Test/SubscriptionCmdletTests.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ function Test-GetSubscriptionsEndToEnd
2020
{
2121
$allSubscriptions = Get-AzureRmSubscription -All
2222
$firstSubscription = $allSubscriptions[0]
23-
$id = $firstSubscription.Id
24-
$tenant = $firstSubscription.GetProperty([Microsoft.Azure.Common.Authentication.Models.AzureSubscription+Property]::Tenants)
25-
$subscription = Get-AzureRmSubscription -SubscriptionId $id -Tenant $tenant
23+
$id = $firstSubscription.SubscriptionId
24+
$tenant = $firstSubscription.TenantId
25+
$subscription = $firstSubscription | Get-AzureRmSubscription
2626
Assert-True { $subscription -ne $null }
27-
Assert-AreEqual $id $subscription.Id
27+
Assert-AreEqual $id $subscription.SubscriptionId
2828
$subscription = Get-AzureRmSubscription -SubscriptionId $id
2929
Assert-True { $subscription -ne $null }
30-
Assert-AreEqual $id $subscription.Id
30+
Assert-AreEqual $id $subscription.SubscriptionId
3131
$mostSubscriptions = Get-AzureRmSubscription
3232
Assert-True {$mostSubscriptions.Count -gt 0}
3333
$tenantSubscriptions = Get-AzureRmSubscription -Tenant $tenant

src/ResourceManager/Profile/Commands.Profile/Account/LoginAzureRMAccount.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Microsoft.Azure.Commands.ResourceManager.Common;
1615
using System.Management.Automation;
17-
using Microsoft.Azure.Common.Authentication.Models;
1816
using System.Security;
19-
using Microsoft.Azure.Commands.ResourceManager.Common.Models;
20-
using Microsoft.WindowsAzure.Commands.Utilities.Common;
21-
using Microsoft.IdentityModel.Clients.ActiveDirectory;
17+
using Microsoft.Azure.Common.Authentication.Models;
18+
using Microsoft.Azure.Commands.Profile.Models;
19+
using Microsoft.Azure.Commands.ResourceManager.Common;
2220

2321
namespace Microsoft.Azure.Commands.Profile
2422
{

src/ResourceManager/Profile/Commands.Profile/Commands.Profile.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,12 @@
136136
<Compile Include="Environment\GetAzureRMEnvironment.cs" />
137137
<Compile Include="Environment\SetAzureRMEnvironment.cs" />
138138
<Compile Include="Environment\AddAzureRMEnvironment.cs" />
139+
<Compile Include="Models\PSAzureAccount.cs" />
140+
<Compile Include="Models\PSAzureContext.cs" />
141+
<Compile Include="Models\PSAzureEnvironment.cs" />
142+
<Compile Include="Models\PSAzureProfile.cs" />
143+
<Compile Include="Models\PSAzureSubscription.cs" />
144+
<Compile Include="Models\PSAzureTenant.cs" />
139145
<Compile Include="Subscription\GetAzureRMSubscription.cs" />
140146
<Compile Include="Account\LoginAzureRMAccount.cs" />
141147
<Compile Include="Context\GetAzureRMContext.cs" />

src/ResourceManager/Profile/Commands.Profile/Context/GetAzureRMContext.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Microsoft.Azure.Commands.ResourceManager.Common;
16-
using Microsoft.Azure.Common.Authentication.Models;
1715
using System.Management.Automation;
18-
using Microsoft.Azure.Commands.ResourceManager.Common.Models;
16+
using Microsoft.Azure.Commands.Profile.Models;
17+
using Microsoft.Azure.Commands.ResourceManager.Common;
1918

2019
namespace Microsoft.Azure.Commands.Profile
2120
{

src/ResourceManager/Profile/Commands.Profile/Context/SetAzureRMContext.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Microsoft.Azure.Commands.ResourceManager.Common;
16-
using Microsoft.Azure.Common.Authentication.Models;
1715
using System.Management.Automation;
18-
using Microsoft.Azure.Commands.ResourceManager.Common.Models;
16+
using Microsoft.Azure.Common.Authentication.Models;
17+
using Microsoft.Azure.Commands.Profile.Models;
18+
using Microsoft.Azure.Commands.ResourceManager.Common;
1919

2020
namespace Microsoft.Azure.Commands.Profile
2121
{

src/ResourceManager/Profile/Commands.Profile/Environment/AddAzureRMEnvironment.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Microsoft.Azure.Commands.ResourceManager.Common;
16-
using Microsoft.Azure.Common.Authentication.Models;
1715
using System.Management.Automation;
18-
using Microsoft.Azure.Commands.ResourceManager.Common.Models;
16+
using Microsoft.Azure.Common.Authentication.Models;
17+
using Microsoft.Azure.Commands.Profile.Models;
18+
using Microsoft.Azure.Commands.ResourceManager.Common;
1919

2020
namespace Microsoft.Azure.Commands.Profile
2121
{

src/ResourceManager/Profile/Commands.Profile/Environment/GetAzureRMEnvironment.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,10 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Microsoft.Azure.Commands.ResourceManager.Common;
16-
using Microsoft.Azure.Commands.ResourceManager.Common.Models;
17-
using Microsoft.Azure.Common.Authentication.Models;
18-
using System;
1915
using System.Linq;
20-
using System.Collections.Generic;
21-
using System.Globalization;
2216
using System.Management.Automation;
17+
using Microsoft.Azure.Commands.Profile.Models;
18+
using Microsoft.Azure.Commands.ResourceManager.Common;
2319

2420
namespace Microsoft.Azure.Commands.Profile
2521
{

src/ResourceManager/Profile/Commands.Profile/Environment/RemoveAzureRMEnvironment.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,9 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Microsoft.Azure.Commands.ResourceManager.Common;
16-
using Microsoft.Azure.Common.Authentication.Models;
17-
using System;
18-
using System.Collections.Generic;
19-
using System.Globalization;
2015
using System.Management.Automation;
21-
using Microsoft.Azure.Commands.ResourceManager.Common.Models;
16+
using Microsoft.Azure.Commands.Profile.Models;
17+
using Microsoft.Azure.Commands.ResourceManager.Common;
2218

2319
namespace Microsoft.Azure.Commands.Profile
2420
{

src/ResourceManager/Profile/Commands.Profile/Environment/SetAzureRMEnvironment.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Microsoft.Azure.Commands.ResourceManager.Common;
16-
using Microsoft.Azure.Common.Authentication.Models;
1715
using System;
1816
using System.Globalization;
1917
using System.Management.Automation;
20-
using Microsoft.Azure.Commands.ResourceManager.Common.Models;
18+
using Microsoft.Azure.Common.Authentication.Models;
19+
using Microsoft.Azure.Commands.Profile.Models;
20+
using Microsoft.Azure.Commands.ResourceManager.Common;
2121

2222
namespace Microsoft.Azure.Commands.Profile
2323
{

src/ResourceManager/Common/Commands.ResourceManager.Common/Models/PSAzureAccount.cs renamed to src/ResourceManager/Profile/Commands.Profile/Models/PSAzureAccount.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
using Microsoft.Azure.Common.Authentication.Models;
1818
using Microsoft.Azure.Common.Authentication.Utilities;
1919

20-
namespace Microsoft.Azure.Commands.ResourceManager.Common.Models
20+
namespace Microsoft.Azure.Commands.Profile.Models
2121
{
2222
/// <summary>
2323
/// Azure account details.

src/ResourceManager/Common/Commands.ResourceManager.Common/Models/PSAzureContext.cs renamed to src/ResourceManager/Profile/Commands.Profile/Models/PSAzureContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using System.Threading.Tasks;
77
using Microsoft.Azure.Common.Authentication.Models;
88

9-
namespace Microsoft.Azure.Commands.ResourceManager.Common.Models
9+
namespace Microsoft.Azure.Commands.Profile.Models
1010
{
1111
/// <summary>
1212
/// The context for connecting cmdlets in the current session to Azure.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
using Microsoft.Azure.Common.Authentication.Models;
1616

17-
namespace Microsoft.Azure.Commands.ResourceManager.Common.Models
17+
namespace Microsoft.Azure.Commands.Profile.Models
1818
{
1919
/// <summary>
2020
/// Settings and endpoints for management of Azure or Azure Stack services.

src/ResourceManager/Common/Commands.ResourceManager.Common/Models/PSAzureProfile.cs renamed to src/ResourceManager/Profile/Commands.Profile/Models/PSAzureProfile.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using Microsoft.Azure.Common.Authentication.Models;
88
using Microsoft.WindowsAzure.Commands.Utilities.Common;
99

10-
namespace Microsoft.Azure.Commands.ResourceManager.Common.Models
10+
namespace Microsoft.Azure.Commands.Profile.Models
1111
{
1212
/// <summary>
1313
/// Credential and environment data for connecting with an Azure instance in the current session.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
using Microsoft.Azure.Common.Authentication.Models;
1818
using Microsoft.Azure.Common.Authentication.Utilities;
1919

20-
namespace Microsoft.Azure.Commands.ResourceManager.Common.Models
20+
namespace Microsoft.Azure.Commands.Profile.Models
2121
{
2222
/// <summary>
2323
/// Azure subscription details.

src/ResourceManager/Common/Commands.ResourceManager.Common/Models/PSAzureTenant.cs renamed to src/ResourceManager/Profile/Commands.Profile/Models/PSAzureTenant.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
using Microsoft.Azure.Common.Authentication.Models;
1818
using Microsoft.Azure.Common.Authentication.Utilities;
1919

20-
namespace Microsoft.Azure.Commands.ResourceManager.Common.Models
20+
namespace Microsoft.Azure.Commands.Profile.Models
2121
{
2222
/// <summary>
2323
/// Azure subscription details.

src/ResourceManager/Profile/Commands.Profile/Profile/SaveAzureRMProfile.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Microsoft.Azure.Commands.Profile.Properties;
16-
using Microsoft.Azure.Commands.ResourceManager.Common;
17-
using Microsoft.Azure.Common.Authentication.Models;
1815
using System;
1916
using System.Management.Automation;
20-
using Microsoft.Azure.Commands.ResourceManager.Common.Models;
17+
using Microsoft.Azure.Common.Authentication.Models;
18+
using Microsoft.Azure.Commands.Profile.Models;
19+
using Microsoft.Azure.Commands.Profile.Properties;
20+
using Microsoft.Azure.Commands.ResourceManager.Common;
2121

2222
namespace Microsoft.Azure.Commands.Profile
2323
{

src/ResourceManager/Profile/Commands.Profile/Profile/SelectAzureRMProfile.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Microsoft.Azure.Commands.Profile.Properties;
16-
using Microsoft.Azure.Commands.ResourceManager.Common;
17-
using Microsoft.Azure.Common.Authentication.Models;
1815
using System;
1916
using System.Management.Automation;
20-
using Microsoft.Azure.Commands.ResourceManager.Common.Models;
17+
using Microsoft.Azure.Common.Authentication.Models;
18+
using Microsoft.Azure.Commands.Profile.Models;
19+
using Microsoft.Azure.Commands.Profile.Properties;
20+
using Microsoft.Azure.Commands.ResourceManager.Common;
2121

2222
namespace Microsoft.Azure.Commands.Profile
2323
{

src/ResourceManager/Profile/Commands.Profile/Subscription/GetAzureRMSubscription.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
// ----------------------------------------------------------------------------------
1313

1414
using System.Linq;
15-
using Microsoft.Azure.Commands.ResourceManager.Common;
1615
using System.Management.Automation;
17-
using Microsoft.Azure.Commands.Profile.Properties;
18-
using Microsoft.Azure.Commands.ResourceManager.Common.Models;
1916
using Microsoft.Azure.Common.Authentication;
2017
using Microsoft.Azure.Common.Authentication.Models;
18+
using Microsoft.Azure.Commands.Profile.Models;
19+
using Microsoft.Azure.Commands.Profile.Properties;
20+
using Microsoft.Azure.Commands.ResourceManager.Common;
2121

2222
namespace Microsoft.Azure.Commands.Profile
2323
{

0 commit comments

Comments
 (0)