Skip to content

Commit e8e41b5

Browse files
authored
Merge pull request Azure#10085 from madsd/websites_access_restriction_cmds
Added commands for working with Access Restrictions
2 parents 3b131a3 + e472f5c commit e8e41b5

26 files changed

+23635
-7
lines changed
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
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.Azure.ServiceManagement.Common.Models;
17+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
18+
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
19+
using Xunit;
20+
using Xunit.Abstractions;
21+
22+
namespace Microsoft.Azure.Commands.Websites.Test.ScenarioTests
23+
{
24+
public class AccessRestrictionTests : RMTestBase
25+
{
26+
public XunitTracingInterceptor _logger;
27+
28+
public AccessRestrictionTests(ITestOutputHelper output)
29+
{
30+
_logger = new XunitTracingInterceptor(output);
31+
XunitTracingInterceptor.AddToContext(_logger);
32+
}
33+
34+
[Fact]
35+
[Trait(Category.AcceptanceType, Category.CheckIn)]
36+
public void TestGetWebAppAccessRestriction()
37+
{
38+
WebsitesController.NewInstance.RunPsTest(_logger, "Test-GetWebAppAccessRestriction");
39+
}
40+
41+
[Fact]
42+
[Trait(Category.AcceptanceType, Category.CheckIn)]
43+
public void TestUpdateWebAppAccessRestrictionSimple()
44+
{
45+
WebsitesController.NewInstance.RunPsTest(_logger, "Test-UpdateWebAppAccessRestrictionSimple");
46+
}
47+
48+
[Fact]
49+
[Trait(Category.AcceptanceType, Category.CheckIn)]
50+
public void TestUpdateWebAppAccessRestrictionComplex()
51+
{
52+
WebsitesController.NewInstance.RunPsTest(_logger, "Test-UpdateWebAppAccessRestrictionComplex");
53+
}
54+
55+
[Fact]
56+
[Trait(Category.AcceptanceType, Category.CheckIn)]
57+
public void TestAddWebAppAccessRestriction()
58+
{
59+
WebsitesController.NewInstance.RunPsTest(_logger, "Test-AddWebAppAccessRestriction");
60+
}
61+
62+
// Currently no mock for Network exists in the Test Framework
63+
//[Fact]
64+
//[Trait(Category.AcceptanceType, Category.CheckIn)]
65+
//public void TestAddWebAppAccessRestrictionServiceEndpoint()
66+
//{
67+
// WebsitesController.NewInstance.RunPsTest(_logger, "Test-AddWebAppAccessRestrictionServiceEndpoint");
68+
//}
69+
70+
[Fact]
71+
[Trait(Category.AcceptanceType, Category.CheckIn)]
72+
public void TestRemoveWebAppAccessRestriction()
73+
{
74+
WebsitesController.NewInstance.RunPsTest(_logger, "Test-RemoveWebAppAccessRestriction");
75+
}
76+
77+
[Fact]
78+
[Trait(Category.AcceptanceType, Category.CheckIn)]
79+
public void TestAddWebAppAccessRestrictionScm()
80+
{
81+
WebsitesController.NewInstance.RunPsTest(_logger, "Test-AddWebAppAccessRestrictionScm");
82+
}
83+
84+
[Fact]
85+
[Trait(Category.AcceptanceType, Category.CheckIn)]
86+
public void TestRemoveWebAppAccessRestrictionScm()
87+
{
88+
WebsitesController.NewInstance.RunPsTest(_logger, "Test-RemoveWebAppAccessRestrictionScm");
89+
}
90+
91+
[Fact]
92+
[Trait(Category.AcceptanceType, Category.CheckIn)]
93+
public void TestAddWebAppAccessRestrictionSlot()
94+
{
95+
WebsitesController.NewInstance.RunPsTest(_logger, "Test-AddWebAppAccessRestrictionSlot");
96+
}
97+
}
98+
}

0 commit comments

Comments
 (0)