Azure-Samples / cognitive-services-speech-sdk

Sample code for the Microsoft Cognitive Services Speech SDK
MIT License
2.79k stars 1.82k forks source link

[IngestionClient] Introduce dependency injection and make code more unit-testable. #2446

Open superhindupur opened 2 months ago

superhindupur commented 2 months ago

Is your feature request related to a problem? Please describe. Currently, the service dependencies in the IngestionClient code are declared as static variables (possibly because we want to instantiate them only once per application instance). This makes it hard to mock these dependencies and unit test the behavior of the IngestionClient code.

Describe the solution you'd like We would like to use a dependency injection framework and stop using static variables for service dependencies, so that we can easily mock them and unit test the code.

We expect to do this work incrementally, and add unit tests as we go under this task.

github-actions[bot] commented 1 month ago

This item has been open without activity for 19 days. Provide a comment on status and remove "update needed" label.

komalg1 commented 1 month ago

Pending items: Dependency Injection for TranscriptionProcessor, TranscriptionAnalyticsOrchestrator, BatchClient

pankopon commented 3 weeks ago

@HenryvanderVegte There are several "[IngestionClient]" items open, are these actual customer issues or more general backlog work items? Is there a plan for them? Please update.