Skip to content

Commit b10d7b9

Browse files
author
Hovsep
committed
Merge pull request #2 from jianghaolu/clu
WebApp cmdlets dnx50
2 parents e036729 + 2e6895d commit b10d7b9

File tree

75 files changed

+67132
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+67132
-1
lines changed

src/CLU/CLUCoreCLR.sln

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 14
4-
VisualStudioVersion = 14.0.24711.0
4+
VisualStudioVersion = 14.0.23107.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Commands.Common", "Commands.Common\Commands.Common.xproj", "{5F567ACA-595E-436D-83DB-A21E08F82DF6}"
77
EndProject
@@ -20,6 +20,7 @@ EndProject
2020
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Azure.Commands.Resources", "Microsoft.Azure.Commands.Resources\Microsoft.Azure.Commands.Resources.xproj", "{99B1290D-A073-4907-8018-51C714431778}"
2121
EndProject
2222
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Azure.Commands.Resources.Test", "Microsoft.Azure.Commands.Resources.Test\Microsoft.Azure.Commands.Resources.Test.xproj", "{A9CC2879-D45D-4DCB-A405-6EEDB749B15F}"
23+
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Azure.Commands.Websites", "Microsoft.Azure.Commands.Websites\Microsoft.Azure.Commands.Websites.xproj", "{E6F9ACF0-5BF3-423E-B9EB-983504B3FDCC}"
2324
EndProject
2425
Global
2526
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -63,6 +64,10 @@ Global
6364
{A9CC2879-D45D-4DCB-A405-6EEDB749B15F}.Debug|Any CPU.Build.0 = Debug|Any CPU
6465
{A9CC2879-D45D-4DCB-A405-6EEDB749B15F}.Release|Any CPU.ActiveCfg = Release|Any CPU
6566
{A9CC2879-D45D-4DCB-A405-6EEDB749B15F}.Release|Any CPU.Build.0 = Release|Any CPU
67+
{E6F9ACF0-5BF3-423E-B9EB-983504B3FDCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
68+
{E6F9ACF0-5BF3-423E-B9EB-983504B3FDCC}.Debug|Any CPU.Build.0 = Debug|Any CPU
69+
{E6F9ACF0-5BF3-423E-B9EB-983504B3FDCC}.Release|Any CPU.ActiveCfg = Release|Any CPU
70+
{E6F9ACF0-5BF3-423E-B9EB-983504B3FDCC}.Release|Any CPU.Build.0 = Release|Any CPU
6671
EndGlobalSection
6772
GlobalSection(SolutionProperties) = preSolution
6873
HideSolutionNode = FALSE
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using System.Collections;
16+
using System.Collections.Generic;
17+
using System.Management.Automation;
18+
using Microsoft.Azure.Commands.WebApps.Utilities;
19+
using Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps;
20+
using Moq;
21+
22+
23+
namespace Microsoft.Azure.Commands.Websites.Test
24+
{
25+
public class NewAzureWebAppCommandTests
26+
{
27+
private NewAzureWebAppCmdlet cmdlet;
28+
29+
private Mock<WebsitesClient> websitesClientMock;
30+
31+
private Mock<ICommandRuntime> commandRuntimeMock;
32+
33+
// ResourceGroupName, WebsiteName, SlotName, Location, WebHostingPlan
34+
35+
36+
private string resourceGroupName = "Default-Web-WestUS";
37+
38+
private string websiteName = "ngoliPSWebsite";
39+
40+
private string slotName = null;
41+
42+
private string webHostingPlan = "myWHP";
43+
44+
private string location = "West US";
45+
46+
private Dictionary<string, object> properties;
47+
48+
private Hashtable[] tags;
49+
50+
public NewAzureWebAppCommandTests()
51+
{
52+
websitesClientMock = new Mock<WebsitesClient>();
53+
commandRuntimeMock = new Mock<ICommandRuntime>();
54+
cmdlet = new NewAzureWebAppCmdlet()
55+
{
56+
CommandRuntime = commandRuntimeMock.Object,
57+
WebsitesClient = websitesClientMock.Object
58+
};
59+
}
60+
61+
}
62+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
using Xunit;
5+
6+
// General Information about an assembly is controlled through the following
7+
// set of attributes. Change these attribute values to modify the information
8+
// associated with an assembly.
9+
[assembly: AssemblyTitle("Commands.Websites.Test")]
10+
[assembly: AssemblyDescription("")]
11+
[assembly: AssemblyConfiguration("")]
12+
[assembly: AssemblyCompany("Microsoft")]
13+
[assembly: AssemblyProduct("Commands.Websites.Test")]
14+
[assembly: AssemblyCopyright("Copyright © Microsoft 2014")]
15+
[assembly: AssemblyTrademark("")]
16+
[assembly: AssemblyCulture("")]
17+
18+
// Setting ComVisible to false makes the types in this assembly not visible
19+
// to COM components. If you need to access a type in this assembly from
20+
// COM, set the ComVisible attribute to true on that type.
21+
[assembly: ComVisible(false)]
22+
23+
// The following GUID is for the ID of the typelib if this project is exposed to COM
24+
[assembly: Guid("a893f297-3311-4224-8086-a4bb3c5e478a")]
25+
26+
// Version information for an assembly consists of the following four values:
27+
//
28+
// Major Version
29+
// Minor Version
30+
// Build Number
31+
// Revision
32+
//
33+
// You can specify all the values or you can default the Build and Revision Numbers
34+
// by using the '*' as shown below:
35+
// [assembly: AssemblyVersion("1.0.*")]
36+
[assembly: AssemblyVersion("1.0.0.0")]
37+
[assembly: AssemblyFileVersion("1.0.0.0")]
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
16+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
17+
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
18+
using Xunit;
19+
20+
namespace Microsoft.Azure.Commands.Websites.Test.ScenarioTests
21+
{
22+
public class AppServicePlanTests : RMTestBase
23+
{
24+
[Fact(Skip = "TODO, [#108248038]: Enable scenario tests")]
25+
[Trait(Category.AcceptanceType, Category.CheckIn)]
26+
public void TestCreateNewAppServicePlan()
27+
{
28+
WebsitesController.NewInstance.RunPsTest("Test-CreateNewAppServicePlan");
29+
}
30+
31+
[Fact(Skip = "TODO, [#108248038]: Enable scenario tests")]
32+
[Trait(Category.AcceptanceType, Category.CheckIn)]
33+
public void TestSetAppServicePlan()
34+
{
35+
WebsitesController.NewInstance.RunPsTest("Test-SetAppServicePlan");
36+
}
37+
38+
[Fact(Skip="Needs investigation. Fails running playback")]
39+
[Trait(Category.AcceptanceType, Category.CheckIn)]
40+
public void TestGetAppServicePlan()
41+
{
42+
WebsitesController.NewInstance.RunPsTest("Test-GetAppServicePlan");
43+
}
44+
45+
[Fact(Skip = "TODO, [#108248038]: Enable scenario tests")]
46+
[Trait(Category.AcceptanceType, Category.CheckIn)]
47+
public void TestRemoveAppServicePlan()
48+
{
49+
WebsitesController.NewInstance.RunPsTest("Test-RemoveAppServicePlan");
50+
}
51+
52+
[Fact(Skip = "Needs investigation. Fails running playback")]
53+
[Trait(Category.AcceptanceType, Category.CheckIn)]
54+
public void TestGetAppServicePlanMetrics()
55+
{
56+
WebsitesController.NewInstance.RunPsTest("Test-GetAppServicePlanMetrics");
57+
}
58+
}
59+
}

0 commit comments

Comments
 (0)