Skip to content

Commit 38277df

Browse files
bgskyMaddie Clayton
authored andcommitted
Consumption: introduce new cmdlets to CRUD budget, Get price sheet, marketplace, reservation summary/detail (#6276)
* Introduce PSBudget model * Introduce 4 new cmdlets on budget CRUD operations * Add .md files for 4 CRUD cmdlets on budget * Add scenario test cases for budget CRUD operations * Add session records for budget test cases * Update psd1 and csproj files for budget * Update change log on new budget cmdlets * Add PS models of price sheet and marketplace * Add cmdlets of price sheet and marketplace * Add cmdlets of price sheet and marketplace * Add test cases and session records of price sheet and marketplace * Support top and maxcount range, and internal paging for usage detail * Add models, cmdlets and help files for reservation summary and detail * Add test cases and session records for reservation summary and detail * Update psd1, csproj, package config, and consumption help files * Update session records of price sheet * Retrieve profile module version * Update price sheet reference version and output type * Update parameter attributes for cmdlets * Update .md files in help folder * Add test cases and session records in budget cmdlets * Add cmdlet online link headers in help files * Add budget notification, and return type on remove budget cmdlets * Add test session records for budget notification * Update help files with budget notification * Update change log and parameter attributes * Add extra check for PassThru in cmdlet of remove budget * Revert module version change * Resolve cmdlet comments on parameter set, validation attribute, output type, exception handle, and mandatory parameter order * Add sample output in help files * Reorganize budget test cases to be independent at test time * Revert version and fix parameter set * Update budget help files to reflect parameter set change * Add instructions and update budget test flow * Reformat help files * Update expandMeterDetail in pricesheet, write exception error, remove notification disabled * Update test cases and session records * Add piping to SetBudget cmdlet * Suppress build error on usage detail output from list to singular * Add ShouldProcess attribute and ResourceManager module to test * Keep resource group name in budget test hardcode * Test of random resoure group name * Revert "Test of random resoure group name" This reverts commit 2f7d50a. * Update test reference packages * Remove extra package references and add RMResourceModule
1 parent 95d03e5 commit 38277df

File tree

62 files changed

+7121
-53
lines changed

Some content is hidden

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

62 files changed

+7121
-53
lines changed

src/ResourceManager/Consumption/AzureRM.Consumption.Netcore.psd1

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,15 @@ NestedModules = @('.\Microsoft.Azure.Commands.Consumption.dll')
7272
FunctionsToExport = @()
7373

7474
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
75-
CmdletsToExport = 'Get-AzureRmConsumptionUsageDetail'
75+
CmdletsToExport = 'Get-AzureRmConsumptionBudget',
76+
'Get-AzureRmConsumptionMarketplace',
77+
'Get-AzureRmConsumptionPriceSheet',
78+
'Get-AzureRmConsumptionReservationDetail',
79+
'Get-AzureRmConsumptionReservationSummary',
80+
'Get-AzureRmConsumptionUsageDetail',
81+
'New-AzureRmConsumptionBudget',
82+
'Remove-AzureRmConsumptionBudget',
83+
'Set-AzureRmConsumptionBudget'
7684

7785
# Variables to export from this module
7886
# VariablesToExport = @()

src/ResourceManager/Consumption/AzureRM.Consumption.psd1

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,15 @@ NestedModules = @('.\Microsoft.Azure.Commands.Consumption.dll')
7272
FunctionsToExport = @()
7373

7474
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
75-
CmdletsToExport = 'Get-AzureRmConsumptionUsageDetail'
75+
CmdletsToExport = 'Get-AzureRmConsumptionBudget',
76+
'Get-AzureRmConsumptionMarketplace',
77+
'Get-AzureRmConsumptionPriceSheet',
78+
'Get-AzureRmConsumptionReservationDetail',
79+
'Get-AzureRmConsumptionReservationSummary',
80+
'Get-AzureRmConsumptionUsageDetail',
81+
'New-AzureRmConsumptionBudget',
82+
'Remove-AzureRmConsumptionBudget',
83+
'Set-AzureRmConsumptionBudget'
7684

7785
# Variables to export from this module
7886
# VariablesToExport = @()

src/ResourceManager/Consumption/ChangeLog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@
1919
-->
2020
## Current Release
2121

22+
## Version 0.4.0
23+
* Add new cmdlets for managing budget
24+
- Get/New/Set/Remove-AzureRmConsumptionBudget
25+
- Get-AzureRmConsumptionMarketplace
26+
- Get-AzureRmConsumptionPriceSheet
27+
- Get-AzureRmConsumptionReservationSummary
28+
- Get-AzureRmConsumptionReservationDetail
29+
2230
## Version 0.3.3
2331
* Add new parameters Expand, ResourceGroup, InstanceName, InstanceId, Tags, and Top on Cmdlet Get-AzureRmConsumptionUsageDetail
2432

src/ResourceManager/Consumption/Commands.Consumption.Test/Commands.Consumption.Test.csproj

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,12 @@
6262
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
6363
<Private>True</Private>
6464
</Reference>
65-
<Reference Include="Microsoft.Azure.Management.Consumption, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
66-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Consumption.3.0.0\lib\net452\Microsoft.Azure.Management.Consumption.dll</HintPath>
65+
<Reference Include="Microsoft.Azure.Management.Consumption, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
66+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Consumption.3.0.1\lib\net452\Microsoft.Azure.Management.Consumption.dll</HintPath>
67+
</Reference>
68+
<Reference Include="Microsoft.Azure.Management.ResourceManager, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
69+
<SpecificVersion>False</SpecificVersion>
70+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ResourceManager.1.6.0-preview\lib\net452\Microsoft.Azure.Management.ResourceManager.dll</HintPath>
6771
</Reference>
6872
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6973
<SpecificVersion>False</SpecificVersion>
@@ -73,7 +77,7 @@
7377
<HintPath>..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.6179.26854-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll</HintPath>
7478
</Reference>
7579
<Reference Include="Microsoft.Azure.Test.HttpRecorder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
76-
<HintPath>..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.6.7-preview\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
80+
<HintPath>..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.8.1\lib\net452\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
7781
<Private>True</Private>
7882
</Reference>
7983
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory, Version=2.28.3.860, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -85,13 +89,11 @@
8589
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.28.3\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll</HintPath>
8690
</Reference>
8791
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
88-
<SpecificVersion>False</SpecificVersion>
89-
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.2.2.9-preview\lib\net45\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll</HintPath>
92+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.2.3.2\lib\net452\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll</HintPath>
9093
<Private>True</Private>
9194
</Reference>
92-
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.TestFramework, Version=1.5.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
93-
<SpecificVersion>False</SpecificVersion>
94-
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.TestFramework.1.5.1-preview\lib\net45\Microsoft.Rest.ClientRuntime.Azure.TestFramework.dll</HintPath>
95+
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.TestFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
96+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.TestFramework.1.7.2\lib\net452\Microsoft.Rest.ClientRuntime.Azure.TestFramework.dll</HintPath>
9597
<Private>True</Private>
9698
</Reference>
9799
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
@@ -128,12 +130,28 @@
128130
</ItemGroup>
129131
<ItemGroup>
130132
<Compile Include="Properties\AssemblyInfo.cs" />
133+
<Compile Include="ScenarioTests\BudgetTests.cs" />
134+
<Compile Include="ScenarioTests\MarketplaceTests.cs" />
135+
<Compile Include="ScenarioTests\PriceSheetTests.cs" />
136+
<Compile Include="ScenarioTests\ReservationTests.cs" />
131137
<Compile Include="ScenarioTests\UsageDetailsTests.cs" />
132138
<Compile Include="ScenarioTests\TestController.cs" />
133139
</ItemGroup>
134140
<ItemGroup>
135141
<None Include="MSSharedLibKey.snk" />
136142
<None Include="packages.config" />
143+
<None Include="ScenarioTests\BudgetTests.ps1">
144+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
145+
</None>
146+
<None Include="ScenarioTests\ReservationTests.ps1">
147+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
148+
</None>
149+
<None Include="ScenarioTests\PriceSheetTests.ps1">
150+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
151+
</None>
152+
<None Include="ScenarioTests\MarketplaceTests.ps1">
153+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
154+
</None>
137155
<None Include="ScenarioTests\UsageDetailsTests.ps1">
138156
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
139157
</None>
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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 Microsoft.Azure.Commands.Consumption.Test.ScenarioTests.ScenarioTest;
16+
using Microsoft.Azure.Commands.ScenarioTest;
17+
using Microsoft.Azure.ServiceManagemenet.Common.Models;
18+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
19+
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
20+
using Xunit;
21+
using Xunit.Abstractions;
22+
23+
namespace Microsoft.Azure.Commands.Consumption.Test.ScenarioTests
24+
{
25+
public class BudgetTests : RMTestBase
26+
{
27+
public BudgetTests(ITestOutputHelper output)
28+
{
29+
XunitTracingInterceptor.AddToContext(new XunitTracingInterceptor(output));
30+
TestExecutionHelpers.SetUpSessionAndProfile();
31+
}
32+
33+
[Fact]
34+
[Trait(Category.AcceptanceType, Category.CheckIn)]
35+
public void TestBudgetAtSubscriptionLevel()
36+
{
37+
TestController.NewInstance.RunPowerShellTest("Test-BudgetAtSubscriptionLevel");
38+
}
39+
40+
[Fact]
41+
[Trait(Category.AcceptanceType, Category.CheckIn)]
42+
public void TestBudgetAtResourceGroupLevel()
43+
{
44+
TestController.NewInstance.RunPowerShellTest("Test-BudgetAtResourceGroupLevel");
45+
}
46+
47+
[Fact]
48+
[Trait(Category.AcceptanceType, Category.CheckIn)]
49+
public void TestGetBudgets()
50+
{
51+
TestController.NewInstance.RunPowerShellTest("Test-GetBudgets");
52+
}
53+
}
54+
}
Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
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+
# Instructions of recording tests
16+
# Recording of budget tests requires a subscription and user Id. Service principal
17+
# can support recording but a request to create, set, or remove through service
18+
# principal will be prevented by API. StartDate should be no later than the 1st
19+
# date of the current month for monthly grain. For any recording question,
20+
# please contact [email protected]
21+
22+
<#
23+
.SYNOPSIS
24+
Get Budget name
25+
#>
26+
function Get-BudgetName
27+
{
28+
return "Budget-" + (getAssetName)
29+
}
30+
31+
<#
32+
.SYNOPSIS
33+
Get Notification key
34+
#>
35+
function Get-NotificationKey
36+
{
37+
return "NotificationKey-" + (getAssetName)
38+
}
39+
40+
<#
41+
.SYNOPSIS
42+
Test budget at subscription level
43+
#>
44+
function Test-BudgetAtSubscriptionLevel
45+
{
46+
# Setup
47+
$budgetName = Get-BudgetName
48+
$notificationKey = Get-NotificationKey
49+
$startDate = Get-Date -Day 1
50+
$endDate = ($startDate).AddMonths(3).AddDays(-1)
51+
52+
Write-Debug "Create a new budget $budgetName at subscription level"
53+
$budgetNew = New-AzureRmConsumptionBudget -Amount 6000 -Name $budgetName -Category Cost -StartDate $startDate -EndDate $endDate -TimeGrain Monthly
54+
Assert-NotNull $budgetNew
55+
Assert-AreEqual 6000 $budgetNew.Amount
56+
Assert-AreEqual $budgetName $budgetNew.Name
57+
Assert-AreEqual Cost $budgetNew.Category
58+
Assert-AreEqual Monthly $budgetNew.TimeGrain
59+
60+
Write-Debug "Get the budget $budgetName"
61+
$budgetGet = Get-AzureRmConsumptionBudget -Name $budgetName
62+
Assert-NotNull $budgetGet
63+
Assert-AreEqual 6000 $budgetGet.Amount
64+
Assert-AreEqual $budgetName $budgetGet.Name
65+
Assert-AreEqual Cost $budgetGet.Category
66+
Assert-AreEqual Monthly $budgetGet.TimeGrain
67+
68+
Write-Debug "Update the budget $budgetName with amount change to 7500"
69+
$budgetSet1 = Get-AzureRmConsumptionBudget -Name $budgetName | Set-AzureRmConsumptionBudget -Amount 7500
70+
Assert-NotNull $budgetSet1
71+
Assert-AreEqual 7500 $budgetSet1.Amount
72+
73+
Write-Debug "Update the budget $budgetName with a notification $notificationKey when cost or usage reaches a threshold of 90 percent of amount"
74+
$budgetSet2 = Set-AzureRmConsumptionBudget -Name $budgetName -NotificationKey $notificationKey -NotificationEnabled -NotificationThreshold 90 -ContactEmail johndoe@contoso.com,janesmith@contoso.com -ContactRole Owner,Reader,Contributor
75+
Assert-NotNull $budgetSet2
76+
Assert-AreEqual $budgetName $budgetSet2.Name
77+
Assert-AreEqual 1 $budgetSet2.Notification.Count
78+
79+
Write-Debug "Remove the budget $budgetName"
80+
$response = Remove-AzureRmConsumptionBudget -Name $budgetName -PassThru
81+
Assert-AreEqual True $response
82+
83+
Assert-Throws {Get-AzureRmConsumptionBudget -Name $budgetName}
84+
}
85+
86+
<#
87+
.SYNOPSIS
88+
Test budget at resource group level
89+
#>
90+
function Test-BudgetAtResourceGroupLevel
91+
{
92+
# Setup
93+
$budgetName = Get-BudgetName
94+
$notificationKey1 = Get-NotificationKey
95+
$notificationKey2 = Get-NotificationKey
96+
# This resource group is created at the scope of test subscription
97+
$resourceGroupName = 'RGBudgets'
98+
$startDate = Get-Date -Day 1
99+
$endDate = ($startDate).AddMonths(3).AddDays(-1)
100+
101+
# Create budget
102+
Write-Debug "Create a new budget $budgetName at resource group level"
103+
$budgetNew = New-AzureRmConsumptionBudget -Amount 6000 -Name $budgetName -ResourceGroupName $resourceGroupName -Category Cost -StartDate $startDate -EndDate $endDate -TimeGrain Monthly
104+
Assert-NotNull $budgetNew
105+
Assert-AreEqual 6000 $budgetNew.Amount
106+
Assert-AreEqual $budgetName $budgetNew.Name
107+
Assert-AreEqual Cost $budgetNew.Category
108+
Assert-AreEqual Monthly $budgetNew.TimeGrain
109+
110+
# Get budget
111+
Write-Debug "Get the budget $budgetName"
112+
$budgetGet = Get-AzureRmConsumptionBudget -Name $budgetName -ResourceGroupName $resourceGroupName
113+
Assert-NotNull $budgetGet
114+
Assert-AreEqual 6000 $budgetGet.Amount
115+
Assert-AreEqual $budgetName $budgetGet.Name
116+
Assert-AreEqual Cost $budgetGet.Category
117+
Assert-AreEqual Monthly $budgetGet.TimeGrain
118+
119+
# Set budget
120+
Write-Debug "Update the budget $budgetName with a notification $notificationKey when cost reaches a threshold of 90 percent of amount"
121+
$budgetSet1 = Set-AzureRmConsumptionBudget -Name $budgetName -ResourceGroupName $resourceGroupName -NotificationKey $notificationKey1 -NotificationEnabled -NotificationThreshold 90 -ContactEmail johndoe@contoso.com,janesmith@contoso.com -ContactRole Owner,Reader,Contributor
122+
Assert-NotNull $budgetSet1
123+
Assert-AreEqual $budgetName $budgetSet1.Name
124+
Assert-AreEqual 1 $budgetSet1.Notification.Count
125+
126+
Write-Debug "Update the budget $budgetName with a second notificaiton $notificationKey when cost reaches a threshold of 150 percent of amount"
127+
$budgetSet2 = Set-AzureRmConsumptionBudget -Name $budgetName -ResourceGroupName $resourceGroupName -NotificationKey $notificationKey2 -NotificationEnabled -NotificationThreshold 150 -ContactEmail johndoe@contoso.com,janesmith@contoso.com -ContactRole Owner,Reader,Contributor
128+
Assert-NotNull $budgetSet2
129+
Assert-AreEqual $budgetName $budgetSet2.Name
130+
Assert-AreEqual 2 $budgetSet2.Notification.Count
131+
132+
# Remove budget
133+
Write-Debug "Remove the budget $budgetName"
134+
$response = Remove-AzureRmConsumptionBudget -Name $budgetName -ResourceGroupName $resourceGroupName -PassThru
135+
Assert-AreEqual True $response
136+
137+
Assert-Throws {Get-AzureRmConsumptionBudget -Name $budgetName -ResourceGroupName $resourceGroupName}
138+
}
139+
140+
<#
141+
.SYNOPSIS
142+
Get all budgets at subscription level
143+
#>
144+
function Test-GetBudgets
145+
{
146+
# Setup
147+
$startDate = Get-Date -Day 1
148+
$endDate = ($startDate).AddMonths(3).AddDays(-1)
149+
$budgetName = Get-BudgetName
150+
$budgetNew = New-AzureRmConsumptionBudget -Amount 6000 -Name $budgetName -Category Cost -StartDate $startDate -EndDate $endDate -TimeGrain Monthly
151+
Assert-NotNull $budgetNew
152+
153+
# Validate get all budgets
154+
$budgets = Get-AzureRmConsumptionBudget
155+
Assert-NotNull $budgets
156+
157+
# Clean up through piping
158+
$response = Get-AzureRmConsumptionBudget -Name $budgetName | Remove-AzureRmConsumptionBudget -PassThru
159+
Assert-AreEqual True $response
160+
161+
Assert-Throws {Get-AzureRmConsumptionBudget -Name $budgetName}
162+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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 Microsoft.Azure.Commands.Consumption.Test.ScenarioTests.ScenarioTest;
16+
using Microsoft.Azure.Commands.ScenarioTest;
17+
using Microsoft.Azure.ServiceManagemenet.Common.Models;
18+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
19+
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
20+
using Xunit;
21+
using Xunit.Abstractions;
22+
23+
namespace Microsoft.Azure.Commands.Consumption.Test.ScenarioTests
24+
{
25+
public class MarketplaceTests : RMTestBase
26+
{
27+
public MarketplaceTests(ITestOutputHelper output)
28+
{
29+
XunitTracingInterceptor.AddToContext(new XunitTracingInterceptor(output));
30+
TestExecutionHelpers.SetUpSessionAndProfile();
31+
}
32+
33+
[Fact]
34+
[Trait(Category.AcceptanceType, Category.CheckIn)]
35+
public void TestListMarketplaces()
36+
{
37+
TestController.NewInstance.RunPowerShellTest("Test-ListMarketplaces");
38+
}
39+
40+
[Fact]
41+
[Trait(Category.AcceptanceType, Category.CheckIn)]
42+
public void TestListMarketplacesWithDateFilter()
43+
{
44+
TestController.NewInstance.RunPowerShellTest("Test-ListMarketplacesWithDateFilter");
45+
}
46+
47+
[Fact]
48+
[Trait(Category.AcceptanceType, Category.CheckIn)]
49+
public void TestListBillingPeriodMarketplaces()
50+
{
51+
TestController.NewInstance.RunPowerShellTest("Test-ListBillingPeriodMarketplaces");
52+
}
53+
54+
[Fact]
55+
[Trait(Category.AcceptanceType, Category.CheckIn)]
56+
public void TestListMarketplacesWithFilterOnInstanceName()
57+
{
58+
TestController.NewInstance.RunPowerShellTest("Test-ListMarketplacesWithFilterOnInstanceName");
59+
}
60+
}
61+
}

0 commit comments

Comments
 (0)