You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When testing an app, using mock controllers is crucial. It's particularly convenient if dependencies are injected through constructors because it makes it easy to switch between actual and mock controllers. This flexibility enhances adaptability in testing, ensuring smooth transitions for different testing scenarios and improving overall testability and maintainability.
🚀 The feature
Problem
Usage of Get.find<>() making it difficult to test the application as
proper dependency injection of mock controllers is not possible.
example
e.g.
Solution
Constructor injection, as the mock dependencies can be injected easily.
e.g.
In this case injecting Mock Controller can be injected and tested easily
Motivation, pitch
When testing an app, using mock controllers is crucial. It's particularly convenient if dependencies are injected through constructors because it makes it easy to switch between actual and mock controllers. This flexibility enhances adaptability in testing, ensuring smooth transitions for different testing scenarios and improving overall testability and maintainability.
Can I work on this issue @chandansgowda.
The text was updated successfully, but these errors were encountered: