From 6696d67de6e3e7f8b7045896b17fcf267052f612 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 17 Nov 2025 05:39:00 +0000 Subject: [PATCH 1/2] Initial plan From fc2b73b8aefb38119c783e55e74ffc02e214e766 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 17 Nov 2025 05:55:58 +0000 Subject: [PATCH 2/2] Add mocking documentation to extension methods in Azure Management Generator Co-authored-by: ArcturusZhang <10554446+ArcturusZhang@users.noreply.github.com> --- .../src/Providers/ExtensionProvider.cs | 49 +- ...ureGeneratorMgmtTypeSpecTestsExtensions.cs | 432 +++++++++++++++--- 2 files changed, 424 insertions(+), 57 deletions(-) diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ExtensionProvider.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ExtensionProvider.cs index df0951499102..facb49fdcfc4 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ExtensionProvider.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ExtensionProvider.cs @@ -51,7 +51,7 @@ protected override MethodProvider[] BuildMethods() { var getCachedClientMethod = getCachedClientMethods[mockableResource.ArmCoreType]; redirectedMethods.AddRange( - mockableResource.Methods.Select(m => BuildRedirectMethod(mockableResource.ArmCoreType, m, getCachedClientMethod)) + mockableResource.Methods.Select(m => BuildRedirectMethod(mockableResource, m, getCachedClientMethod)) ); } @@ -83,10 +83,10 @@ private MethodProvider BuildGetCachedClientMethod(MockableResourceProvider mocka return new MethodProvider(methodSignature, statements, this); } - private MethodProvider BuildRedirectMethod(CSharpType coreType, MethodProvider targetMethod, MethodProvider getCachedClientMethod) + private MethodProvider BuildRedirectMethod(MockableResourceProvider mockableResource, MethodProvider targetMethod, MethodProvider getCachedClientMethod) { + var coreType = mockableResource.ArmCoreType; var target = targetMethod.Signature; - // TODO -- add mocking information in method description var extensionParameter = new ParameterProvider( GetArmCoreTypeVariableName(coreType), $"The {coreType:C} the method will execute against.", @@ -121,7 +121,12 @@ private MethodProvider BuildRedirectMethod(CSharpType coreType, MethodProvider t } } - return new MethodProvider(methodSignature, body, this); + var method = new MethodProvider(methodSignature, body, this); + + // Add mocking documentation + AddMockingDocumentation(method, mockableResource, targetMethod); + + return method; static ParameterProvider DuplicateParameter(ParameterProvider original) { @@ -140,6 +145,42 @@ static ParameterProvider DuplicateParameter(ParameterProvider original) } } + private void AddMockingDocumentation(MethodProvider method, MockableResourceProvider mockableResource, MethodProvider targetMethod) + { + if (method.XmlDocs == null) + { + return; + } + + // Build the mocking documentation item + // Format: To mock this method, please mock instead. + var mockingDescription = BuildMockingDescription(mockableResource.Type, targetMethod.Signature); + var mockingItem = new XmlDocStatement("item", [], + new XmlDocStatement("term", [$"Mocking"]), + new XmlDocStatement("description", [mockingDescription])); + + // Create a new summary with the existing description and the mocking item + // The targetMethod already has the description we want to keep + var descriptionText = targetMethod.Signature.Description ?? $""; + var updatedSummary = new XmlDocSummaryStatement([descriptionText], mockingItem); + method.XmlDocs.Update(summary: updatedSummary); + } + + private FormattableString BuildMockingDescription(CSharpType mockableType, MethodSignature targetSignature) + { + // Build description: "To mock this method, please mock instead." + // We need to construct a method reference that includes parameter types + // In C# XML docs, method references look like: MethodName(TypeName1, TypeName2) + + // Build parameter type list as a simple string since XML doc cref attributes use simple type names + var parameterTypeNames = string.Join(", ", targetSignature.Parameters.Select(p => p.Type.Name)); + var methodRef = $"{mockableType.Name}.{targetSignature.Name}({parameterTypeNames})"; + + // Return a FormattableString that will be converted to: To mock this method, please mock instead. + // The :C formatter on mockableType will create the tag + return $"To mock this method, please mock instead."; + } + private string GetArmCoreTypeVariableName(CSharpType armCoreType) { if (armCoreType.Equals(typeof(ArmClient))) diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/AzureGeneratorMgmtTypeSpecTestsExtensions.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/AzureGeneratorMgmtTypeSpecTestsExtensions.cs index 652da105b602..8db408f8272b 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/AzureGeneratorMgmtTypeSpecTestsExtensions.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/AzureGeneratorMgmtTypeSpecTestsExtensions.cs @@ -51,7 +51,13 @@ private static MockableAzureGeneratorMgmtTypeSpecTestsManagementGroupResource Ge return managementGroupResource.GetCachedClient(client => new MockableAzureGeneratorMgmtTypeSpecTestsManagementGroupResource(client, managementGroupResource.Id)); } - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The resource ID of the resource to get. /// is null. @@ -63,7 +69,13 @@ public static FooResource GetFooResource(this ArmClient client, ResourceIdentifi return GetMockableAzureGeneratorMgmtTypeSpecTestsArmClient(client).GetFooResource(id); } - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The resource ID of the resource to get. /// is null. @@ -75,7 +87,13 @@ public static FooSettingsResource GetFooSettingsResource(this ArmClient client, return GetMockableAzureGeneratorMgmtTypeSpecTestsArmClient(client).GetFooSettingsResource(id); } - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The resource ID of the resource to get. /// is null. @@ -87,7 +105,13 @@ public static BarResource GetBarResource(this ArmClient client, ResourceIdentifi return GetMockableAzureGeneratorMgmtTypeSpecTestsArmClient(client).GetBarResource(id); } - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The resource ID of the resource to get. /// is null. @@ -99,7 +123,13 @@ public static BarSettingsResource GetBarSettingsResource(this ArmClient client, return GetMockableAzureGeneratorMgmtTypeSpecTestsArmClient(client).GetBarSettingsResource(id); } - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The resource ID of the resource to get. /// is null. @@ -111,7 +141,13 @@ public static BarQuotaResource GetBarQuotaResource(this ArmClient client, Resour return GetMockableAzureGeneratorMgmtTypeSpecTestsArmClient(client).GetBarQuotaResource(id); } - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The resource ID of the resource to get. /// is null. @@ -123,7 +159,13 @@ public static BazResource GetBazResource(this ArmClient client, ResourceIdentifi return GetMockableAzureGeneratorMgmtTypeSpecTestsArmClient(client).GetBazResource(id); } - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The resource ID of the resource to get. /// is null. @@ -135,7 +177,13 @@ public static ZooResource GetZooResource(this ArmClient client, ResourceIdentifi return GetMockableAzureGeneratorMgmtTypeSpecTestsArmClient(client).GetZooResource(id); } - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The resource ID of the resource to get. /// is null. @@ -147,7 +195,13 @@ public static EndpointResource GetEndpointResource(this ArmClient client, Resour return GetMockableAzureGeneratorMgmtTypeSpecTestsArmClient(client).GetEndpointResource(id); } - /// Gets a collection of objects within the specified scope. + /// + /// Gets a collection of objects within the specified scope. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The scope of the resource collection to get. /// is null. @@ -159,7 +213,13 @@ public static EndpointResourceCollection GetEndpointResources(this ArmClient cli return GetMockableAzureGeneratorMgmtTypeSpecTestsArmClient(client).GetEndpointResources(scope); } - /// Gets the endpoint to the resource. + /// + /// Gets the endpoint to the resource. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The scope of the resource collection to get. /// The name of the EndpointResource. @@ -173,7 +233,13 @@ public static Response GetEndpointResource(this ArmClient clie return GetMockableAzureGeneratorMgmtTypeSpecTestsArmClient(client).GetEndpointResource(scope, endpointName, cancellationToken); } - /// Gets the endpoint to the resource. + /// + /// Gets the endpoint to the resource. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The scope of the resource collection to get. /// The name of the EndpointResource. @@ -187,7 +253,13 @@ public static async Task> GetEndpointResourceAsync(th return await GetMockableAzureGeneratorMgmtTypeSpecTestsArmClient(client).GetEndpointResourceAsync(scope, endpointName, cancellationToken).ConfigureAwait(false); } - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The resource ID of the resource to get. /// is null. @@ -199,7 +271,13 @@ public static SelfHelpResource GetSelfHelpResource(this ArmClient client, Resour return GetMockableAzureGeneratorMgmtTypeSpecTestsArmClient(client).GetSelfHelpResource(id); } - /// Gets a collection of objects within the specified scope. + /// + /// Gets a collection of objects within the specified scope. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The scope of the resource collection to get. /// is null. @@ -211,7 +289,13 @@ public static SelfHelpResourceCollection GetSelfHelpResources(this ArmClient cli return GetMockableAzureGeneratorMgmtTypeSpecTestsArmClient(client).GetSelfHelpResources(scope); } - /// Get a SelfHelpResource. + /// + /// Get a SelfHelpResource + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The scope of the resource collection to get. /// The name of the SelfHelpResource. @@ -225,7 +309,13 @@ public static Response GetSelfHelpResource(this ArmClient clie return GetMockableAzureGeneratorMgmtTypeSpecTestsArmClient(client).GetSelfHelpResource(scope, selfHelpName, cancellationToken); } - /// Get a SelfHelpResource. + /// + /// Get a SelfHelpResource + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The scope of the resource collection to get. /// The name of the SelfHelpResource. @@ -239,7 +329,13 @@ public static async Task> GetSelfHelpResourceAsync(th return await GetMockableAzureGeneratorMgmtTypeSpecTestsArmClient(client).GetSelfHelpResourceAsync(scope, selfHelpName, cancellationToken).ConfigureAwait(false); } - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The resource ID of the resource to get. /// is null. @@ -251,7 +347,13 @@ public static PlaywrightQuotaResource GetPlaywrightQuotaResource(this ArmClient return GetMockableAzureGeneratorMgmtTypeSpecTestsArmClient(client).GetPlaywrightQuotaResource(id); } - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The resource ID of the resource to get. /// is null. @@ -263,7 +365,13 @@ public static JobResource GetJobResource(this ArmClient client, ResourceIdentifi return GetMockableAzureGeneratorMgmtTypeSpecTestsArmClient(client).GetJobResource(id); } - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The resource ID of the resource to get. /// is null. @@ -275,7 +383,13 @@ public static HciVmInstanceResource GetHciVmInstanceResource(this ArmClient clie return GetMockableAzureGeneratorMgmtTypeSpecTestsArmClient(client).GetHciVmInstanceResource(id); } - /// Gets an object representing a along with the instance operations that can be performed on it in the ArmClient. + /// + /// Gets an object representing a along with the instance operations that can be performed on it in the ArmClient + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The scope that the resource will apply against. /// is null. @@ -287,7 +401,13 @@ public static HciVmInstanceResource GetHciVmInstance(this ArmClient client, Reso return GetMockableAzureGeneratorMgmtTypeSpecTestsArmClient(client).GetHciVmInstance(scope); } - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The resource ID of the resource to get. /// is null. @@ -299,7 +419,13 @@ public static GroupQuotaSubscriptionRequestStatusResource GetGroupQuotaSubscript return GetMockableAzureGeneratorMgmtTypeSpecTestsArmClient(client).GetGroupQuotaSubscriptionRequestStatusResource(id); } - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The resource ID of the resource to get. /// is null. @@ -311,7 +437,13 @@ public static JooResource GetJooResource(this ArmClient client, ResourceIdentifi return GetMockableAzureGeneratorMgmtTypeSpecTestsArmClient(client).GetJooResource(id); } - /// Gets a collection of Foos in the . + /// + /// Gets a collection of Foos in the + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// is null. /// An object representing collection of Foos and their operations over a FooResource. @@ -322,7 +454,13 @@ public static FooCollection GetFoos(this ResourceGroupResource resourceGroupReso return GetMockableAzureGeneratorMgmtTypeSpecTestsResourceGroupResource(resourceGroupResource).GetFoos(); } - /// Get a Foo. + /// + /// Get a Foo + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The name of the Foo. /// The cancellation token to use. @@ -335,7 +473,13 @@ public static async Task> GetFooAsync(this ResourceGroupRe return await GetMockableAzureGeneratorMgmtTypeSpecTestsResourceGroupResource(resourceGroupResource).GetFooAsync(fooName, cancellationToken).ConfigureAwait(false); } - /// Get a Foo. + /// + /// Get a Foo + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The name of the Foo. /// The cancellation token to use. @@ -348,7 +492,13 @@ public static Response GetFoo(this ResourceGroupResource resourceGr return GetMockableAzureGeneratorMgmtTypeSpecTestsResourceGroupResource(resourceGroupResource).GetFoo(fooName, cancellationToken); } - /// Gets an object representing a along with the instance operations that can be performed on it in the . + /// + /// Gets an object representing a along with the instance operations that can be performed on it in the . + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// is null. /// Returns a object. @@ -359,7 +509,13 @@ public static FooSettingsResource GetFooSettings(this ResourceGroupResource reso return GetMockableAzureGeneratorMgmtTypeSpecTestsResourceGroupResource(resourceGroupResource).GetFooSettings(); } - /// Gets a collection of Bazs in the . + /// + /// Gets a collection of Bazs in the + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// is null. /// An object representing collection of Bazs and their operations over a BazResource. @@ -370,7 +526,13 @@ public static BazCollection GetBazs(this ResourceGroupResource resourceGroupReso return GetMockableAzureGeneratorMgmtTypeSpecTestsResourceGroupResource(resourceGroupResource).GetBazs(); } - /// Get a Baz. + /// + /// Get a Baz + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The name of the Baz. /// The cancellation token to use. @@ -383,7 +545,13 @@ public static async Task> GetBazAsync(this ResourceGroupRe return await GetMockableAzureGeneratorMgmtTypeSpecTestsResourceGroupResource(resourceGroupResource).GetBazAsync(bazName, cancellationToken).ConfigureAwait(false); } - /// Get a Baz. + /// + /// Get a Baz + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The name of the Baz. /// The cancellation token to use. @@ -396,7 +564,13 @@ public static Response GetBaz(this ResourceGroupResource resourceGr return GetMockableAzureGeneratorMgmtTypeSpecTestsResourceGroupResource(resourceGroupResource).GetBaz(bazName, cancellationToken); } - /// Gets a collection of Zoos in the . + /// + /// Gets a collection of Zoos in the + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// is null. /// An object representing collection of Zoos and their operations over a ZooResource. @@ -407,7 +581,13 @@ public static ZooCollection GetZoos(this ResourceGroupResource resourceGroupReso return GetMockableAzureGeneratorMgmtTypeSpecTestsResourceGroupResource(resourceGroupResource).GetZoos(); } - /// Get a Zoo. + /// + /// Get a Zoo + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The name of the Zoo. /// The cancellation token to use. @@ -420,7 +600,13 @@ public static async Task> GetZooAsync(this ResourceGroupRe return await GetMockableAzureGeneratorMgmtTypeSpecTestsResourceGroupResource(resourceGroupResource).GetZooAsync(zooName, cancellationToken).ConfigureAwait(false); } - /// Get a Zoo. + /// + /// Get a Zoo + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The name of the Zoo. /// The cancellation token to use. @@ -433,7 +619,13 @@ public static Response GetZoo(this ResourceGroupResource resourceGr return GetMockableAzureGeneratorMgmtTypeSpecTestsResourceGroupResource(resourceGroupResource).GetZoo(zooName, cancellationToken); } - /// Gets a collection of JobResources in the . + /// + /// Gets a collection of JobResources in the + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// is null. /// An object representing collection of JobResources and their operations over a JobResource. @@ -444,7 +636,13 @@ public static JobResourceCollection GetJobResources(this ResourceGroupResource r return GetMockableAzureGeneratorMgmtTypeSpecTestsResourceGroupResource(resourceGroupResource).GetJobResources(); } - /// Gets information about the specified job. + /// + /// Gets information about the specified job. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The name of the JobResource. /// $expand is supported on details parameter for job, which provides details on the job stages. @@ -458,7 +656,13 @@ public static async Task> GetJobResourceAsync(this Resourc return await GetMockableAzureGeneratorMgmtTypeSpecTestsResourceGroupResource(resourceGroupResource).GetJobResourceAsync(jobName, expand, cancellationToken).ConfigureAwait(false); } - /// Gets information about the specified job. + /// + /// Gets information about the specified job. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The name of the JobResource. /// $expand is supported on details parameter for job, which provides details on the job stages. @@ -472,7 +676,13 @@ public static Response GetJobResource(this ResourceGroupResource re return GetMockableAzureGeneratorMgmtTypeSpecTestsResourceGroupResource(resourceGroupResource).GetJobResource(jobName, expand, cancellationToken); } - /// Gets a collection of Joos in the . + /// + /// Gets a collection of Joos in the + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// is null. /// An object representing collection of Joos and their operations over a JooResource. @@ -483,7 +693,13 @@ public static JooCollection GetJoos(this ResourceGroupResource resourceGroupReso return GetMockableAzureGeneratorMgmtTypeSpecTestsResourceGroupResource(resourceGroupResource).GetJoos(); } - /// Get a Joo. + /// + /// Get a Joo + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The name of the Joo. /// The cancellation token to use. @@ -496,7 +712,13 @@ public static async Task> GetJooAsync(this ResourceGroupRe return await GetMockableAzureGeneratorMgmtTypeSpecTestsResourceGroupResource(resourceGroupResource).GetJooAsync(jooName, cancellationToken).ConfigureAwait(false); } - /// Get a Joo. + /// + /// Get a Joo + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The name of the Joo. /// The cancellation token to use. @@ -509,7 +731,13 @@ public static Response GetJoo(this ResourceGroupResource resourceGr return GetMockableAzureGeneratorMgmtTypeSpecTestsResourceGroupResource(resourceGroupResource).GetJoo(jooName, cancellationToken); } - /// Gets a collection of PlaywrightQuotas in the . + /// + /// Gets a collection of PlaywrightQuotas in the + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The location for the resource. /// is null. @@ -521,7 +749,13 @@ public static PlaywrightQuotaCollection GetAllPlaywrightQuota(this SubscriptionR return GetMockableAzureGeneratorMgmtTypeSpecTestsSubscriptionResource(subscriptionResource).GetAllPlaywrightQuota(location); } - /// Get subscription-level location-based Playwright quota resource by name. + /// + /// Get subscription-level location-based Playwright quota resource by name. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The location for the resource. /// The name of the PlaywrightQuota. @@ -535,7 +769,13 @@ public static async Task> GetPlaywrightQuotaAs return await GetMockableAzureGeneratorMgmtTypeSpecTestsSubscriptionResource(subscriptionResource).GetPlaywrightQuotaAsync(location, playwrightQuotaName, cancellationToken).ConfigureAwait(false); } - /// Get subscription-level location-based Playwright quota resource by name. + /// + /// Get subscription-level location-based Playwright quota resource by name. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The location for the resource. /// The name of the PlaywrightQuota. @@ -549,7 +789,13 @@ public static Response GetPlaywrightQuota(this Subscrip return GetMockableAzureGeneratorMgmtTypeSpecTestsSubscriptionResource(subscriptionResource).GetPlaywrightQuota(location, playwrightQuotaName, cancellationToken); } - /// List Foo resources by subscription ID. + /// + /// List Foo resources by subscription ID + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The cancellation token to use. /// is null. @@ -561,7 +807,13 @@ public static AsyncPageable GetFoosAsync(this SubscriptionResource return GetMockableAzureGeneratorMgmtTypeSpecTestsSubscriptionResource(subscriptionResource).GetFoosAsync(cancellationToken); } - /// List Foo resources by subscription ID. + /// + /// List Foo resources by subscription ID + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The cancellation token to use. /// is null. @@ -573,7 +825,13 @@ public static Pageable GetFoos(this SubscriptionResource subscripti return GetMockableAzureGeneratorMgmtTypeSpecTestsSubscriptionResource(subscriptionResource).GetFoos(cancellationToken); } - /// List Baz resources by subscription ID. + /// + /// List Baz resources by subscription ID + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The cancellation token to use. /// is null. @@ -585,7 +843,13 @@ public static AsyncPageable GetBazsAsync(this SubscriptionResource return GetMockableAzureGeneratorMgmtTypeSpecTestsSubscriptionResource(subscriptionResource).GetBazsAsync(cancellationToken); } - /// List Baz resources by subscription ID. + /// + /// List Baz resources by subscription ID + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The cancellation token to use. /// is null. @@ -597,7 +861,13 @@ public static Pageable GetBazs(this SubscriptionResource subscripti return GetMockableAzureGeneratorMgmtTypeSpecTestsSubscriptionResource(subscriptionResource).GetBazs(cancellationToken); } - /// List Zoo resources by subscription ID. + /// + /// List Zoo resources by subscription ID + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The cancellation token to use. /// is null. @@ -609,7 +879,13 @@ public static AsyncPageable GetZoosAsync(this SubscriptionResource return GetMockableAzureGeneratorMgmtTypeSpecTestsSubscriptionResource(subscriptionResource).GetZoosAsync(cancellationToken); } - /// List Zoo resources by subscription ID. + /// + /// List Zoo resources by subscription ID + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The cancellation token to use. /// is null. @@ -621,7 +897,13 @@ public static Pageable GetZoos(this SubscriptionResource subscripti return GetMockableAzureGeneratorMgmtTypeSpecTestsSubscriptionResource(subscriptionResource).GetZoos(cancellationToken); } - /// Runs the input conditions against input object metadata properties and designates matched objects in response. + /// + /// Runs the input conditions against input object metadata properties and designates matched objects in response. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// /// The request body. @@ -634,7 +916,13 @@ public static async Task> PreviewActionsAsync(this Su return await GetMockableAzureGeneratorMgmtTypeSpecTestsSubscriptionResource(subscriptionResource).PreviewActionsAsync(location, body, cancellationToken).ConfigureAwait(false); } - /// Runs the input conditions against input object metadata properties and designates matched objects in response. + /// + /// Runs the input conditions against input object metadata properties and designates matched objects in response. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// /// The request body. @@ -647,7 +935,13 @@ public static Response PreviewActions(this SubscriptionResourc return GetMockableAzureGeneratorMgmtTypeSpecTestsSubscriptionResource(subscriptionResource).PreviewActions(location, body, cancellationToken); } - /// Starts a failed runtime resource. + /// + /// Starts a failed runtime resource + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The cancellation token to use. /// is null. @@ -658,7 +952,13 @@ public static async Task StartFailedServerlessRuntimeAsync(this Tenant return await GetMockableAzureGeneratorMgmtTypeSpecTestsTenantResource(tenantResource).StartFailedServerlessRuntimeAsync(cancellationToken).ConfigureAwait(false); } - /// Starts a failed runtime resource. + /// + /// Starts a failed runtime resource + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The cancellation token to use. /// is null. @@ -672,6 +972,10 @@ public static Response StartFailedServerlessRuntime(this TenantResource tenantRe /// /// Query network sibling set - a provider-level async action. /// This is a non-resource LRO operation that returns NetworkSiblingSet. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// /// /// The the method will execute against. /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. @@ -688,6 +992,10 @@ public static async Task> QueryNetworkSiblingSet /// /// Query network sibling set - a provider-level async action. /// This is a non-resource LRO operation that returns NetworkSiblingSet. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// /// /// The the method will execute against. /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. @@ -701,7 +1009,13 @@ public static ArmOperation QueryNetworkSiblingSet(this Tenant return GetMockableAzureGeneratorMgmtTypeSpecTestsTenantResource(tenantResource).QueryNetworkSiblingSet(waitUntil, content, cancellationToken); } - /// Gets a collection of GroupQuotaSubscriptionRequestStatuses in the . + /// + /// Gets a collection of GroupQuotaSubscriptionRequestStatuses in the + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// is null. /// An object representing collection of GroupQuotaSubscriptionRequestStatuses and their operations over a GroupQuotaSubscriptionRequestStatusResource. @@ -712,7 +1026,13 @@ public static GroupQuotaSubscriptionRequestStatusCollection GetGroupQuotaSubscri return GetMockableAzureGeneratorMgmtTypeSpecTestsManagementGroupResource(managementGroupResource).GetGroupQuotaSubscriptionRequestStatuses(); } - /// Get API to check the status of a subscriptionIds request by requestId. Use the polling API - OperationsStatus URI specified in Azure-AsyncOperation header field, with retry-after duration in seconds to check the intermediate status. This API provides the finals status with the request details and status. + /// + /// Get API to check the status of a subscriptionIds request by requestId. Use the polling API - OperationsStatus URI specified in Azure-AsyncOperation header field, with retry-after duration in seconds to check the intermediate status. This API provides the finals status with the request details and status. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The name of the GroupQuotaSubscriptionRequestStatus. /// The cancellation token to use. @@ -725,7 +1045,13 @@ public static async Task> return await GetMockableAzureGeneratorMgmtTypeSpecTestsManagementGroupResource(managementGroupResource).GetGroupQuotaSubscriptionRequestStatusAsync(requestId, cancellationToken).ConfigureAwait(false); } - /// Get API to check the status of a subscriptionIds request by requestId. Use the polling API - OperationsStatus URI specified in Azure-AsyncOperation header field, with retry-after duration in seconds to check the intermediate status. This API provides the finals status with the request details and status. + /// + /// Get API to check the status of a subscriptionIds request by requestId. Use the polling API - OperationsStatus URI specified in Azure-AsyncOperation header field, with retry-after duration in seconds to check the intermediate status. This API provides the finals status with the request details and status. + /// + /// Mocking. + /// To mock this method, please mock instead. + /// + /// /// The the method will execute against. /// The name of the GroupQuotaSubscriptionRequestStatus. /// The cancellation token to use.