Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analysis tests #37065

Merged
merged 6 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using Azure.Core;
using Azure.Core.TestFramework;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.TestFramework;
using NUnit.Framework;
using System.Threading.Tasks;

namespace Azure.ResourceManager.Analysis.Tests
{
public class AnalysisManagementTestBase : ManagementRecordedTestBase<AnalysisManagementTestEnvironment>
{
protected ArmClient Client { get; private set; }
protected AzureLocation DefaultLocation => TestEnvironment.Location;
protected SubscriptionResource DefaultSubscription { get; private set; }

protected AnalysisManagementTestBase(bool isAsync, RecordedTestMode mode)
: base(isAsync, mode)
{
}

protected AnalysisManagementTestBase(bool isAsync)
: base(isAsync)
{
}

[SetUp]
public async Task CreateCommonClient()
{
Client = GetArmClient();
DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false);
}

protected async Task<ResourceGroupResource> CreateResourceGroupAsync()
{
var resourceGroupName = Recording.GenerateAssetName("testRG-");
var rgOp = await DefaultSubscription.GetResourceGroups().CreateOrUpdateAsync(
WaitUntil.Completed,
resourceGroupName,
new ResourceGroupData(DefaultLocation)
{
Tags =
{
{ "test", "env" }
}
});
return rgOp.Value;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Azure.ResourceManager.Analysis.Tests
{
public class AnaltsisManagementTestEnvironment : TestEnvironment
public class AnalysisManagementTestEnvironment : TestEnvironment
{
}
}
Loading