mockito
mockito copied to clipboard
Mockito-inspired mock library for Dart
Recently, when using Mockito, I accidentally capitalized the path of an imported type which was used to generate mocks. ```dart import 'package:my_package:/UPPERCASE/foo.dart'; @GenerateMocks([Foo]) void main() {} ``` The actual path...
Don't really know how or if this is achievable but it would be great if there's some magical means to create a mock function rather than a mock class that...
Just to be sure codegen works properly with Flutter tooling? This would have to be a separate package though, otherwise we'll bloat Mockito dependencies.
Right now if one clicks on the `API Reference` tab, there is the `Mock` class in the `mockito` library, with a quite bad suggestion in its documentation comment:  I'm...
A casual search for `is InterfaceType` and `is! InterfaceType` yields a lot of results: ```none $ git grep 'is\(!\)* InterfaceType' | wc -l 11 ``` We should review these to...
Based on a report from StackOverflow: https://stackoverflow.com/q/71830050/ Given code: ```dart import 'package:cross_file/cross_file.dart'; import 'package:mockito/annotations.dart'; import 'xfile_test.mocks.dart'; class Cat {} @GenerateMocks([XFile]) void main() { var mockXFile = MockXFile(); print(mockXFile is XFile);...
## Description - I need to create an automation task that detect devs have called build_runner on their client. ## Problem - Despite nothing has changed, sometimes CI build failed...
Mockito currently just ignores non-function type aliases and works with the target type directly. Which is usually fine, unless the target type is private. We added support for mocking non-function...
Don't try to be smart with `unsupportedMembers` If `MockSpec` says a member is not supported, just generate a `throw`, even if it looks like we could get away without it.
Currently `argThat` takes a `Matcher`. Ideally it would be nice to decouple `mockito` from a specific matching framework, and then be be able to plug in versions of `argThat` using...