generated from arcus-azure/arcus.github.template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d1c4139
commit db9c4c5
Showing
10 changed files
with
150 additions
and
110 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
src/Arcus.Testing.Tests.Integration/Configuration/AzureEnvironment.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
namespace Arcus.Testing.Tests.Integration.Configuration | ||
{ | ||
/// <summary> | ||
/// Represents the environment on Azure where a set of test resources are located. | ||
/// </summary> | ||
public class AzureEnvironment | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="AzureEnvironment" /> class. | ||
/// </summary> | ||
public AzureEnvironment( | ||
string subscriptionId, | ||
string resourceGroupName) | ||
{ | ||
SubscriptionId = subscriptionId; | ||
ResourceGroupName = resourceGroupName; | ||
} | ||
|
||
/// <summary> | ||
/// Gets the subscription ID for the set of test resources. | ||
/// </summary> | ||
public string SubscriptionId { get; } | ||
|
||
/// <summary> | ||
/// Gets the resource group name for the set of test resources. | ||
/// </summary> | ||
public string ResourceGroupName { get; } | ||
} | ||
|
||
/// <summary> | ||
/// Extensions on the <see cref="TestConfig"/> for more test-friendly interaction. | ||
/// </summary> | ||
public static partial class TestConfigExtensions | ||
{ | ||
/// <summary> | ||
/// Loads the <see cref="AzureEnvironment"/> from the current test <paramref name="config"/>. | ||
/// </summary> | ||
public static AzureEnvironment GetAzureEnvironment(this TestConfig config) | ||
{ | ||
return new AzureEnvironment( | ||
config["Arcus:SubscriptionId"], | ||
config["Arcus:ResourceGroup:Name"]); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.