Replies: 1 comment
-
Hi, I have currently the same problem, did you ever find a solution about this ? @mstagitis |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all - I understand that mocking Notifier's isn't generally recommended, but I do believe it's the correct thing to do given my situation. I am writing a widget test for a widget that watches an
AutoDisposeAsyncNotifier
that holds some state and has methods for interacting with the state.Here is a simple example below:
I want to mock out both the notifier's
someAction()
call and its state. If I only override the notifier, then the overriding implementation needs to implementsomeAction()
, which brings notifier-specific code into a widget test. Ideally this widget test will cover only the widget-specific code, with all dependencies mocked out.I've tried the following:
The thrown error:
Has anyone had luck with mocking out a notifier's state? Thanks ahead of time!
Matt
Beta Was this translation helpful? Give feedback.
All reactions