-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Samples for Mocking Client Types #7382
Comments
Hi @jsquire, |
Hi @ACHYUT001. Apologies for missing the notification on this earlier. Your contribution would be greatly appreciated. Our goal here would be to demonstrate the types mentioned in the scope, and I think the best way to do that would be to try and mirror some of the core scenarios that we demonstrate in our publishing, consuming, and processing samples. As you may already be aware, our samples are markdown-based and with the code driven from snippets defined in our test suite. I added a few more references to the issue description that may help you get started. Since this work is based around unit testing, we can probably avoid Live tests and just stick with unit tests - like the first set of snippets above. I'm happy to help you along as best I can; please feel free to use a draft PR to share ideas and start discussion, just mention me when you'd like my thoughts. Thank you for helping to make the Azure SDK experience better! |
Hi @jsquire , Sorry, been a little away past few days. Thanks |
Hi @jsquire , I've started out writing the mocks. I also needed your assistance in understanding the points to cover in the markdown file of the sample. Thanks |
Should this issue still have the status of Open? |
Yes, this work has not been completed. There have been some contributions that formed a good foundation for the samples, but there is still some work needed to complete the sample. |
Summary
The Event Hubs client library aims to be mockable and fully support testability. To help illustrate usage of the new API for the testing scenarios, a set of samples mocking the various Event Hubs client types and illustrating use of the model factory is needed.
Scope of Work
Implement a sample or set of samples demonstrating a basic approach for mocking the high level client types for their core scenarios. Included should be:
EventHubProducerClient
EventHubConsumerClient
EventProcessorClient
PartitionReceiver
EventProcessor<TPartition>
Ensure that the use of the model factory is demonstrated for key types, including:
EventData
EventDataBatch
EventHubProperties
PartitionProperties
PartitionPublishingProperties
LastEnqueuedEventProperties
PartitionContext
Success Criteria
The sample(s) have been created, with a clear and simple approach and detailed discussion to support the goal of helping those unfamiliar with Event Hubs to get started testing its types.
The sample(s) adhere to the coding conventions and standards defined for track two libraries.
All projects in the solution compile; any warnings that exist have either been fixed or additional work items filed to address them if they were deemed non-critical.
The sample(s) follow the pattern within the Event Hubs library, are compiled and executed as part of the Live test suite.
Related
The following are promising pull requests begun by a community member before they were unable to complete due to time constraints. These would serve as a great starting point.
References
The text was updated successfully, but these errors were encountered: