[flutter_remote_config] Expose FetchThrottledException constructor for testability #5618
Unanswered
ncuillery
asked this question in
Feature request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
As a FetchThrottledException could occur if the user fetches the configuration too many times, I would like to test my app behavior in such a scenario.
My remote config singleton is mocked with Mockito, so I'm able to mock any of its methods, like:
Unfortunately I can't because the constructor is private: https://github.com/FirebaseExtended/flutterfire/blob/6b6c6404715297c8324b57ece5ecf638431bbd9e/packages/firebase_remote_config/lib/src/remote_config_fetch_throttled_exception.dart#L9
Is it possible to open that up? I don't think it would hurt POO encapsulation too much.
Beta Was this translation helpful? Give feedback.
All reactions