Skip to content

Commit 076807f

Browse files
committed
addressed comments and ensured tests are updated to latest changes
1 parent 6dbf8f0 commit 076807f

File tree

18 files changed

+83
-303
lines changed

18 files changed

+83
-303
lines changed

src/Common/Commands.ScenarioTests.Common/Commands.ScenarioTests.Common.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@
120120
<Compile Include="Properties\AssemblyInfo.cs" />
121121
</ItemGroup>
122122
<ItemGroup>
123-
<None Include="app.config" />
124123
<None Include="Assert.ps1">
125124
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
126125
</None>

src/ResourceManager/Websites/Commands.Websites.Test/Commands.Websites.Test.csproj

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
</Reference>
4747
<Reference Include="Microsoft.Azure.Common.Authentication">
4848
<SpecificVersion>False</SpecificVersion>
49-
<HintPath>..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.8-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
49+
<HintPath>..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.13-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
5050
</Reference>
5151
<Reference Include="Microsoft.Azure.Common.NetFramework">
5252
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.0.2\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
@@ -72,9 +72,8 @@
7272
<SpecificVersion>False</SpecificVersion>
7373
<HintPath>..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5513.27084-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll</HintPath>
7474
</Reference>
75-
<Reference Include="Microsoft.Azure.Test.HttpRecorder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
76-
<SpecificVersion>False</SpecificVersion>
77-
<HintPath>..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5486.28526-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
75+
<Reference Include="Microsoft.Azure.Test.HttpRecorder">
76+
<HintPath>..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5513.27084-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
7877
</Reference>
7978
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory">
8079
<SpecificVersion>False</SpecificVersion>
@@ -100,13 +99,11 @@
10099
</Reference>
101100
<Reference Include="System.Net" />
102101
<Reference Include="System.Net.Http" />
103-
<Reference Include="System.Net.Http.Extensions, Version=2.2.28.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
104-
<SpecificVersion>False</SpecificVersion>
105-
<HintPath>..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll</HintPath>
102+
<Reference Include="System.Net.Http.Extensions">
103+
<HintPath>..\..\..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll</HintPath>
106104
</Reference>
107-
<Reference Include="System.Net.Http.Primitives, Version=4.2.28.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
108-
<SpecificVersion>False</SpecificVersion>
109-
<HintPath>..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll</HintPath>
105+
<Reference Include="System.Net.Http.Primitives">
106+
<HintPath>..\..\..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll</HintPath>
110107
</Reference>
111108
<Reference Include="System.Net.Http.WebRequest" />
112109
<Reference Include="xunit">
@@ -125,7 +122,6 @@
125122
<Compile Include="Properties\AssemblyInfo.cs" />
126123
</ItemGroup>
127124
<ItemGroup>
128-
<None Include="app.config" />
129125
<None Include="MSSharedLibKey.snk" />
130126
<None Include="packages.config">
131127
<SubType>Designer</SubType>

src/ResourceManager/Websites/Commands.Websites.Test/NewAzureWebsitesCommandTests.cs

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@
2020
using Microsoft.WindowsAzure.Commands.Common;
2121
using Microsoft.Azure.Commands.Websites.Cmdlets;
2222
using Microsoft.Azure.Commands.Websites;
23-
using Microsoft.Azure.Management.WebSites.Models;
23+
using Microsoft.Azure.Commands.Websites.Models;
2424
using Moq;
2525
using Xunit;
2626

27+
28+
2729
namespace Microsoft.Azure.Commands.Websites.Test
2830
{
2931
public class NewAzureWebsiteCommandTests
@@ -62,34 +64,5 @@ public NewAzureWebsiteCommandTests()
6264
};
6365
}
6466

65-
[Fact]
66-
[Trait(Category.AcceptanceType, Category.CheckIn)]
67-
public void CreatesNewPSResourceGroupWithUserTemplate()
68-
{
69-
WebsiteBaseCmdlet expectedParameters = new WebsiteBaseCmdlet()
70-
{
71-
72-
ResourceGroupName = resourceGroupName,
73-
WebsiteName = websiteName
74-
};
75-
WebsiteBaseCmdlet actualParameters = new WebsiteBaseCmdlet();
76-
WebSite expected = new WebSite()
77-
{
78-
Name = expectedParameters.WebsiteName,
79-
Location = location
80-
};
81-
websitesClientMock.Setup(f => f.CreateWebsite(It.IsAny<WebsiteBaseCmdlet>().ResourceGroupName,websiteName,slotName,location,webHostingPlan))
82-
.Returns(expected)
83-
.Callback((WebsiteBaseCmdlet p) => { actualParameters = p; });
84-
85-
cmdlet.WebsiteName = expectedParameters.WebsiteName;
86-
cmdlet.ResourceGroupName = expectedParameters.ResourceGroupName;
87-
cmdlet.ExecuteCmdlet();
88-
89-
Assert.Equal(expectedParameters.WebsiteName, actualParameters.WebsiteName);
90-
Assert.Equal(expectedParameters.ResourceGroupName, actualParameters.ResourceGroupName);
91-
92-
commandRuntimeMock.Verify(f => f.WriteObject(expected), Times.Once());
93-
}
9467
}
9568
}

src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/Common.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ function Get-Location
3232
if ($location -eq $null)
3333
{
3434
return "West US"
35-
}
35+
}
3636
else
3737
{
3838
$location.Locations[0]
39-
}
39+
}
4040
}
4141

4242
<#

src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/WebsitesTests.ps1

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ function Test-CreatesNewSimpleWebsite
2525
$webHostingPlan = "NGoliStandard"
2626
$apiversion = "2014-04-01"
2727
$resourceType = "Microsoft.Web/sites"
28-
29-
3028
try
3129
{
3230
# Test
@@ -55,14 +53,11 @@ function Test-CreatesNewWebHostingPlan
5553
$rgname = "Default-Web-WestUS"
5654
$whpName = "ngoliPSWHP"
5755
$location = "West US"
58-
59-
60-
6156
try
6257
{
6358
# Test
64-
$actual = New-AzureWebHostingPlan -ResourceGroupName $rgname -WHPName $whpName -location $location
65-
$result = Get-AzureWebHostingPlan -ResourceGroupName $rgname -WHPName $whpName
59+
$actual = New-AzureWebHostingPlan -ResourceGroupName $rgname -WebHostingPlanName $whpName -location $location
60+
$result = Get-AzureWebHostingPlan -ResourceGroupName $rgname -WebHostingPlanName $whpName
6661
# Assert
6762
Assert-AreEqual $whpName $result.WebHostingPlan.Name
6863
Assert-AreEqual 1 $result.WebHostingPlan.Properties.NumberOfWorkers
@@ -72,6 +67,6 @@ function Test-CreatesNewWebHostingPlan
7267
finally
7368
{
7469
# Cleanup
75-
Remove-AzureWebHostingPlan -ResourceGroupName $rgname -WHPName $whpName -Force
70+
Remove-AzureWebHostingPlan -ResourceGroupName $rgname -WebHostingPlanName $whpName -Force
7671
}
7772
}

src/ResourceManager/Websites/Commands.Websites.Test/SessionRecords/Microsoft.Azure.Commands.Websites.Test.ScenarioTests.WebHostingPlanTests/TestCreatesNewWebHostingPlan.json

Lines changed: 0 additions & 182 deletions
This file was deleted.

0 commit comments

Comments
 (0)