Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend usage of automatic mocks where it's possible #1010

Open
zaychenko-sergei opened this issue Dec 24, 2024 · 0 comments
Open

Extend usage of automatic mocks where it's possible #1010

zaychenko-sergei opened this issue Dec 24, 2024 · 0 comments
Labels
devex Development experience improvement enhancement New feature or request rust Pull requests that update Rust code

Comments

@zaychenko-sergei
Copy link
Contributor

We have a bunch different approaches to mocking system traits:

To unify it's proposed third approach via conditional automock macro. Benefits:

  • no duplication of traits
  • no extra files
  • does not compile when not needed
  • mocks are easy to find: e.g. if you have access to QueryService - you can use MockQueryService

Note that historically we've seen compilation issues when attempting to automock some of our traits.
Review the manually written mocks in the entire project and try to convert to automock what's convertible.

@zaychenko-sergei zaychenko-sergei added enhancement New feature or request rust Pull requests that update Rust code devex Development experience improvement labels Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devex Development experience improvement enhancement New feature or request rust Pull requests that update Rust code
Projects
None yet
Development

No branches or pull requests

1 participant