Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.5k stars 4.82k forks source link

[BUG] ResourceManager.Network type is not mockable #32515

Closed HWouters closed 1 year ago

HWouters commented 2 years ago

Library name and version

Azure.ResourceManager.Network 1.1.0

Describe the bug

ResourceGroupResourceExtensionClient has a protected constructor for mocking, but the class itself is internal. This makes it impossible to mock some methods for unit testing.

Expected behavior

ResourceGroupResourceExtensionClient is public

Actual behavior

ResourceGroupResourceExtensionClient is internal

Reproduction Steps

https://github.com/Azure/azure-sdk-for-net/blob/923dc96a481a4234bb87dec21f052ac51f1b70e3/sdk/signalr/Azure.ResourceManager.SignalR/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs#L17

Environment

No response

jsquire commented 2 years ago

Thank you for your feedback. Tagging and routing to the team member best able to assist.

Yao725 commented 1 year ago

Thanks for reaching out to us, will investigate this issue.

live1206 commented 1 year ago

Covered in https://github.com/Azure/autorest.csharp/issues/3493

ArthurMa1978 commented 1 year ago

Close as dup