azure-sdk-for-net
azure-sdk-for-net copied to clipboard
How to write unit tests for this
Please can you add a section about how to set up these for testing as per the question raised in https://github.com/Azure/azure-sdk-for-net/issues/30928
It would be good to see a complete mocked sample document in order to speed up developers adopting this in their unit tests as so many items in the intellisense list are internal methods which makes it harder to just get started.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: d9e74cbb-db05-aa99-c830-1e5d99503130
- Version Independent ID: 5c869c27-80a9-7407-2f9e-0d7329306413
- Content: DocumentField Class (Azure.AI.FormRecognizer.DocumentAnalysis) - Azure for .NET Developers
- Content Source: xml/Azure.AI.FormRecognizer.DocumentAnalysis/DocumentField.xml
- Service: azure
- GitHub Login: @rloutlaw
- Microsoft Alias: routlaw
Thank you for your feedback. Tagging and routing to the team member best able to assist.
@zebslc Thank you for your feedback. I can totally understand how mocking DocumentField could be tricky. We have a added a sample to illustrate how mocking works in our library (you can check it by clicking here). Please let us know if you have further questions.
That is brilliant. Thank you :-)
On Wed, 21 Sept 2022 at 21:10, Caio Saldanha @.***> wrote:
@zebslc https://github.com/zebslc Thank you for your feedback. I can totally understand how mocking DocumentField could be tricky. We have a added a sample to illustrate how mocking works in our library (you can check it by clicking here https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/formrecognizer/Azure.AI.FormRecognizer/samples/Sample_MockClient.md). Please let us know if you have further questions.
— Reply to this email directly, view it on GitHub https://github.com/Azure/azure-sdk-for-net/issues/30941#issuecomment-1254177314, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2MP44AZKZNHNTT4KHRWSDV7NTSVANCNFSM6AAAAAAQFC3NXQ . You are receiving this because you were mentioned.Message ID: @.***>
--
Our new children's pirate book available on iTunes - http://tinyurl.com/5PiratesGTH
Closing this issue since it seems to be addressed. Please feel free to open a new one if you have further questions.