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
This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: Mock._givenName, Mock._givenHashCode, Mock._defaultRespons
This does not seem to be the intended usage then, I guess?
Second question
When I use it like:
final mockDto =MockResponse<Dto>();
when(mockVersionResponse.isSuccessful).thenReturn(false);
This fails with:
test/mocks_generator.dart 19:12 MockResponse.isSuccessful
test/some_test.dart 203:32 main.<fn>.<fn>
type 'Null' is not a subtype of type 'bool'
What did I overlook? A hint would be much appreciated!
Thank you in advance!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi!
I have two questions regarding mocking a response using the
MockResponseMixin
provided.First question
I am using mockito as mocking framework and the analyzer tells me the following when using the suggested implementation of:
This does not seem to be the intended usage then, I guess?
Second question
When I use it like:
This fails with:
What did I overlook? A hint would be much appreciated!
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions