dart-lang / mockito

Mockito-inspired mock library for Dart
https://pub.dev/packages/mockito
Apache License 2.0
632 stars 162 forks source link

Don't try to compare fakes to real objects #703

Closed copybara-service[bot] closed 12 months ago

copybara-service[bot] commented 12 months ago

Don't try to compare fakes to real objects

Real object comparison sometimes tries to access private members, which are obvously missing on fakes. This results in confusing errors.

To prevent those, just fail the comparison immediately if one thing is a fake while the other one is not.