Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public abstract class ManagementRecordedTestBase<TEnvironment> : RecordedTestBas

private ArmClient _cleanupClient;

protected abstract Type OperationInternalsType { get; }

protected ManagementRecordedTestBase(bool isAsync) : base(isAsync)
{
SessionEnvironment = new TEnvironment();
Expand All @@ -51,8 +53,7 @@ private void Initialize()
{
if (Mode == RecordedTestMode.Playback)
{
var opInternalType = typeof(OperationInternals);
var pollField = opInternalType.GetField("<DefaultPollingInterval>k__BackingField", BindingFlags.Static | BindingFlags.NonPublic);
var pollField = OperationInternalsType.GetField("<DefaultPollingInterval>k__BackingField", BindingFlags.Static | BindingFlags.NonPublic);
pollField.SetValue(null, TimeSpan.Zero);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,13 +310,12 @@ internal Location(string name, string displayName, string regionalDisplayName)
public static ref readonly Location Default => ref WestUS;

/// <summary>
/// Gets the display name of a location object.
/// Gets the name of a location object.
/// </summary>
/// <returns> Display name. </returns>
/// <returns> The name. </returns>
public override string ToString()
{
return DisplayName;
//return Name; //TODO: change to return Name - TEST FAILURES CAUSED HERE
return Name;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ArmClientTests : ResourceManagerTestBase
private readonly string _location = "southcentralus";

public ArmClientTests(bool isAsync)
: base(isAsync) //, RecordedTestMode.Record)
: base(isAsync)//, RecordedTestMode.Record)
{
}

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

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

namespace Azure.ResourceManager.Core.Tests
{
[Parallelizable]
public class ResourceManagerTestBase : ManagementRecordedTestBase<ResourceManagerTestEnvironment>
{
protected ArmClient Client { get; private set; }

protected override Type OperationInternalsType => typeof(OperationInternals);

protected ResourceManagerTestBase(bool isAsync, RecordedTestMode mode)
: base(isAsync, mode)
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading