getsentry / getsentry/sentry-dart

Distinguish between Mocks and Fakes inside tests

Open
#2,401 0 comments 0 reactions 0 assignees View on GitHub
Dart Tests
Dominant language
Dart
Stars
873
Forks
299
Avg merge
2d 7h
Merged PRs (30d)
30

Description

### Description

Hello,

in the `test` section, there is no differentiation between `Mocks` and `Fakes`. The word `Mock` is used for both `Fakes`(Implementation of classes) and `Mocks`(abstract classes).

- Mocks should only be abstract classes, which should be mockable in tests and don`t have implemented methods.

- Fakes should be minimal working implementation of classes.

In the `mockito` package are [some samples](https://pub.dev/packages/mockito#mocking-a-function-type) for `Mocks` and `Fakes`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.