mockito
mockito copied to clipboard
Mockito-inspired mock library for Dart
Related issue was https://github.com/dart-lang/mockito/issues/152. In Dart2, it is _impossible_ to implement generic methods (correctly) with Mockito. Specifically: 1. It isn't possible to match on type arguments, which are part of...
When running `flutter pub run build_runner build` in `webview_flutter_wkwebview/`, the header uses a symlink in the generated mock file: `webview_flutter_wkwebview/test/src/web_kit_webview_widget_test.mocks.dart`: ``` // Mocks generated by Mockito 5.1.0 from annotations //...
Related to #502 and https://github.com/dart-lang/build/issues/3238. Currently, the mock builder is [implemented in such a way that it fully resolves every Dart library](https://github.com/dart-lang/mockito/blob/master/lib/src/builder.dart#L58-L59). Given that this builder also currently runs on...
I am writing a check into Mockito 4.0.0, and Mockito 3.0.3, that checks for an incompatibility between the test and test_api packages. It should be removed at some point.
**Description** the error that is in the console is not helpful in solving the issue. for me, through trial and error I discovered that I should verify each call for...
This is a candidate for Mockito 4, and entirely opt-in before Mockito 4. Rationale: The following currently "just works" in Mockito 3: ```dart class Cat { List toys; } class...
mockito stores mock's parameters to allow us to check them via `captureAny`. But the instance's fields may have changed between the mock call and the `verify` : ```dart final user...
I am using Mockito 5.0.10, and I **do** have read about various fixes regarding operators override: - https://github.com/dart-lang/mockito/issues/371 - https://github.com/dart-lang/mockito/issues/397 However, I'm still having issues when using `EquatableMixin `from the...
First off, thanks for dart mockito 🙏 I've been using `mockito` for a while and haven't run into any issues until now. I have the following test checking if the...
#### Problem Unable to verify generic function. The function has always been called 0. ``` verify(mockInstance.fn()); ```