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.25k stars 4.6k forks source link

DataLakeLeaseClientExtensions isn't testable #31605

Open amoghnatu opened 1 year ago

amoghnatu commented 1 year ago

Can this extension class be coded in a way such that it is testable? Mainly when the main datalakeleaseclient class is mocked, it is impossible right now to mock this method since it is an extension method. If there is some way I can inject the mocked extended type, that'd be great.

thanks, Amogh.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ghost commented 1 year ago

Thank you for your feedback. This has been routed to the support team for assistance.

navba-MSFT commented 1 year ago

Adding Service team to look into this.

ghost commented 1 year ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @sumantmehtams.

Issue Details
Can this extension class be coded in a way such that it is testable? Mainly when the main datalakeleaseclient class is mocked, it is impossible right now to mock this method since it is an extension method. If there is some way I can inject the mocked extended type, that'd be great. thanks, Amogh. --- #### Document Details ⚠ *Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.* * ID: a82a9820-00b6-3148-41d0-8b6b4d2750bb * Version Independent ID: 522043e2-1400-c6e3-e62e-434b1253d021 * Content: [DataLakeLeaseClientExtensions Class (Azure.Storage.Files.DataLake) - Azure for .NET Developers](https://learn.microsoft.com/en-us/dotnet/api/azure.storage.files.datalake.datalakeleaseclientextensions?view=azure-dotnet) * Content Source: [xml/Azure.Storage.Files.DataLake/DataLakeLeaseClientExtensions.xml](https://github.com/Azure/azure-docs-sdk-dotnet/blob/master/xml/Azure.Storage.Files.DataLake/DataLakeLeaseClientExtensions.xml) * Service: **azure** * GitHub Login: @rloutlaw * Microsoft Alias: **routlaw**
Author: amoghnatu
Assignees: -
Labels: `Service Attention`, `Client`, `customer-reported`, `question`, `Data Lake Storage Gen2`, `needs-team-attention`
Milestone: -
navba-MSFT commented 1 year ago

@sumantmehtams Could you please look into this and provide an update ? Thanks in advance.