diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ArmClientOptions.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ArmClientOptions.cs
index 5395936139d3..e38ce1dcf167 100644
--- a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ArmClientOptions.cs
+++ b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ArmClientOptions.cs
@@ -24,28 +24,10 @@ public sealed class ArmClientOptions : ClientOptions
/// Initializes a new instance of the class.
///
public ArmClientOptions()
- : this(Location.Default)
{
- }
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// The default location to use if can't be inherited from parent.
- public ArmClientOptions(Location defaultLocation)
- {
- if (defaultLocation is null)
- throw new ArgumentNullException(nameof(defaultLocation));
-
- DefaultLocation = defaultLocation;
ApiVersions = new ApiVersions(this);
}
- ///
- /// Gets the default location to use if can't be inherited from parent.
- ///
- public Location DefaultLocation { get; }
-
///
/// Gets override object.
///
@@ -63,7 +45,7 @@ public object GetOverrideObject(Func objectConstructor)
internal ArmClientOptions Clone()
{
- ArmClientOptions copy = new ArmClientOptions(DefaultLocation);
+ ArmClientOptions copy = new ArmClientOptions();
copy.ApiVersions = ApiVersions.Clone();
copy.Transport = Transport;
diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ClientContextTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ClientContextTests.cs
index c459a8146e62..aef599a74970 100644
--- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ClientContextTests.cs
+++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ClientContextTests.cs
@@ -58,15 +58,6 @@ public override void OnReceivedResponse(HttpMessage message)
}
}
- [TestCase]
- [RecordedTest]
- public void ValidateOptionsTestLocation()
- {
- var x = new ArmClientOptions();
- var y = x.Clone();
- Assert.IsTrue(ReferenceEquals(x.DefaultLocation, y.DefaultLocation));
- }
-
[TestCase]
[RecordedTest]
public void ValidateOptionsTestApiVersions()
diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmClientOptionsTests/TestClientOptionsParamCheck().json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmClientOptionsTests/TestClientOptionsParamCheck().json
deleted file mode 100644
index 387b3d6719eb..000000000000
--- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmClientOptionsTests/TestClientOptionsParamCheck().json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
- "Entries": [
- {
- "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?api-version=2019-11-01",
- "RequestMethod": "GET",
- "RequestHeaders": {
- "Accept": "application/json",
- "Authorization": "Sanitized",
- "Request-Id": "|852fdfd3-4c97a68acea18ff5.",
- "User-Agent": [
- "azsdk-net-ResourceManager.Resources/1.0.0-preview.2",
- "(.NET Core 4.6.29812.02; Microsoft Windows 10.0.19042 )"
- ],
- "x-ms-client-request-id": "a632fe16e604e1afe3a72e944145efec",
- "x-ms-return-client-request-id": "true"
- },
- "RequestBody": null,
- "StatusCode": 200,
- "ResponseHeaders": {
- "Cache-Control": "no-cache",
- "Content-Length": "397",
- "Content-Type": "application/json; charset=utf-8",
- "Date": "Fri, 09 Apr 2021 20:34:25 GMT",
- "Expires": "-1",
- "Pragma": "no-cache",
- "Strict-Transport-Security": "max-age=31536000; includeSubDomains",
- "X-Content-Type-Options": "nosniff",
- "x-ms-correlation-request-id": "be780178-1313-4692-a54e-a633d8592622",
- "x-ms-ratelimit-remaining-subscription-reads": "11996",
- "x-ms-request-id": "be780178-1313-4692-a54e-a633d8592622",
- "x-ms-routing-request-id": "WESTUS:20210409T203425Z:be780178-1313-4692-a54e-a633d8592622"
- },
- "ResponseBody": {
- "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c",
- "authorizationSource": "RoleBased",
- "managedByTenants": [],
- "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c",
- "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
- "displayName": "Azure SDK sandbox",
- "state": "Enabled",
- "subscriptionPolicies": {
- "locationPlacementId": "Internal_2014-09-01",
- "quotaId": "Internal_2014-09-01",
- "spendingLimit": "Off"
- }
- }
- }
- ],
- "Variables": {
- "RandomSeed": "1093016711",
- "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c"
- }
-}
\ No newline at end of file
diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmClientOptionsTests/TestClientOptionsParamCheck()Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmClientOptionsTests/TestClientOptionsParamCheck()Async.json
deleted file mode 100644
index b85a1112f6a9..000000000000
--- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmClientOptionsTests/TestClientOptionsParamCheck()Async.json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
- "Entries": [
- {
- "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?api-version=2019-11-01",
- "RequestMethod": "GET",
- "RequestHeaders": {
- "Accept": "application/json",
- "Authorization": "Sanitized",
- "Request-Id": "|852fdfd4-4c97a68acea18ff5.",
- "User-Agent": [
- "azsdk-net-ResourceManager.Resources/1.0.0-preview.2",
- "(.NET Core 4.6.29812.02; Microsoft Windows 10.0.19042 )"
- ],
- "x-ms-client-request-id": "a632fe16e604e1afe3a72e944145efec",
- "x-ms-return-client-request-id": "true"
- },
- "RequestBody": null,
- "StatusCode": 200,
- "ResponseHeaders": {
- "Cache-Control": "no-cache",
- "Content-Length": "397",
- "Content-Type": "application/json; charset=utf-8",
- "Date": "Fri, 09 Apr 2021 20:34:24 GMT",
- "Expires": "-1",
- "Pragma": "no-cache",
- "Strict-Transport-Security": "max-age=31536000; includeSubDomains",
- "X-Content-Type-Options": "nosniff",
- "x-ms-correlation-request-id": "9974c9c1-dd06-4f61-81fc-84e6feceff95",
- "x-ms-ratelimit-remaining-subscription-reads": "11948",
- "x-ms-request-id": "9974c9c1-dd06-4f61-81fc-84e6feceff95",
- "x-ms-routing-request-id": "WESTUS:20210409T203425Z:9974c9c1-dd06-4f61-81fc-84e6feceff95"
- },
- "ResponseBody": {
- "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c",
- "authorizationSource": "RoleBased",
- "managedByTenants": [],
- "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c",
- "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
- "displayName": "Azure SDK sandbox",
- "state": "Enabled",
- "subscriptionPolicies": {
- "locationPlacementId": "Internal_2014-09-01",
- "quotaId": "Internal_2014-09-01",
- "spendingLimit": "Off"
- }
- }
- }
- ],
- "Variables": {
- "RandomSeed": "1093016711",
- "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c"
- }
-}
\ No newline at end of file
diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ClientContextTests/ValidateOptionsTestLocation().json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ClientContextTests/ValidateOptionsTestLocation().json
deleted file mode 100644
index 43f102157c6f..000000000000
--- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ClientContextTests/ValidateOptionsTestLocation().json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
- "Entries": [
- {
- "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?api-version=2019-11-01",
- "RequestMethod": "GET",
- "RequestHeaders": {
- "Accept": "application/json",
- "Authorization": "Sanitized",
- "traceparent": "00-9cfd40bedae19f4f8d2fc55b00218075-8149bd5041f1614a-00",
- "User-Agent": [
- "azsdk-net-ResourceManager.Resources/1.0.0-preview.2",
- "(.NET Core 4.6.29812.02; Microsoft Windows 10.0.19042 )"
- ],
- "x-ms-client-request-id": "4bb393657d397335bd9b0f05293c29c0",
- "x-ms-return-client-request-id": "true"
- },
- "RequestBody": null,
- "StatusCode": 200,
- "ResponseHeaders": {
- "Cache-Control": "no-cache",
- "Content-Length": "397",
- "Content-Type": "application/json; charset=utf-8",
- "Date": "Fri, 09 Apr 2021 19:42:09 GMT",
- "Expires": "-1",
- "Pragma": "no-cache",
- "Strict-Transport-Security": "max-age=31536000; includeSubDomains",
- "X-Content-Type-Options": "nosniff",
- "x-ms-correlation-request-id": "b77e0172-1a21-4711-9621-9f2c81c556aa",
- "x-ms-ratelimit-remaining-subscription-reads": "11997",
- "x-ms-request-id": "b77e0172-1a21-4711-9621-9f2c81c556aa",
- "x-ms-routing-request-id": "WESTUS:20210409T194210Z:b77e0172-1a21-4711-9621-9f2c81c556aa"
- },
- "ResponseBody": {
- "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c",
- "authorizationSource": "RoleBased",
- "managedByTenants": [],
- "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c",
- "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
- "displayName": "Azure SDK sandbox",
- "state": "Enabled",
- "subscriptionPolicies": {
- "locationPlacementId": "Internal_2014-09-01",
- "quotaId": "Internal_2014-09-01",
- "spendingLimit": "Off"
- }
- }
- }
- ],
- "Variables": {
- "RandomSeed": "884501139",
- "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c"
- }
-}
\ No newline at end of file
diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ClientContextTests/ValidateOptionsTestLocation()Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ClientContextTests/ValidateOptionsTestLocation()Async.json
deleted file mode 100644
index 9a63c5c9815b..000000000000
--- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ClientContextTests/ValidateOptionsTestLocation()Async.json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
- "Entries": [
- {
- "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?api-version=2019-11-01",
- "RequestMethod": "GET",
- "RequestHeaders": {
- "Accept": "application/json",
- "Authorization": "Sanitized",
- "traceparent": "00-b7a52e143f5eed4c87304ab0a70ee8bb-f5e4adf9a9ee1344-00",
- "User-Agent": [
- "azsdk-net-ResourceManager.Resources/1.0.0-preview.2",
- "(.NET Core 4.6.29812.02; Microsoft Windows 10.0.19042 )"
- ],
- "x-ms-client-request-id": "3d456fe91ea2401371c61533de037790",
- "x-ms-return-client-request-id": "true"
- },
- "RequestBody": null,
- "StatusCode": 200,
- "ResponseHeaders": {
- "Cache-Control": "no-cache",
- "Content-Length": "397",
- "Content-Type": "application/json; charset=utf-8",
- "Date": "Fri, 09 Apr 2021 19:42:09 GMT",
- "Expires": "-1",
- "Pragma": "no-cache",
- "Strict-Transport-Security": "max-age=31536000; includeSubDomains",
- "X-Content-Type-Options": "nosniff",
- "x-ms-correlation-request-id": "a6477bcf-2da1-48bf-9cc0-474c125441d1",
- "x-ms-ratelimit-remaining-subscription-reads": "11987",
- "x-ms-request-id": "a6477bcf-2da1-48bf-9cc0-474c125441d1",
- "x-ms-routing-request-id": "WESTUS:20210409T194210Z:a6477bcf-2da1-48bf-9cc0-474c125441d1"
- },
- "ResponseBody": {
- "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c",
- "authorizationSource": "RoleBased",
- "managedByTenants": [],
- "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c",
- "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
- "displayName": "Azure SDK sandbox",
- "state": "Enabled",
- "subscriptionPolicies": {
- "locationPlacementId": "Internal_2014-09-01",
- "quotaId": "Internal_2014-09-01",
- "spendingLimit": "Off"
- }
- }
- }
- ],
- "Variables": {
- "RandomSeed": "270982415",
- "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c"
- }
-}
\ No newline at end of file
diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ArmClientOptionsTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ArmClientOptionsTests.cs
index 8631e38546a4..6b78215b9dd2 100644
--- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ArmClientOptionsTests.cs
+++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ArmClientOptionsTests.cs
@@ -71,12 +71,6 @@ public void MultiClientSeparateVersions()
Assert.AreEqual(FakeResourceApiVersions.V2019_12_01, options2.FakeRestApiVersions().FakeResourceVersion);
}
- [TestCase]
- public void TestClientOptionsParamCheck()
- {
- Assert.Throws(() => { new ArmClientOptions(null); });
- }
-
[TestCase]
public void VersionExist()
{