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

Refactor Mock-Utils to use new Java, JUnit5 and Mockito5 features #9

Open
wolf-bubenik opened this issue Jul 11, 2023 · 0 comments
Open

Comments

@wolf-bubenik
Copy link
Contributor

wolf-bubenik commented Jul 11, 2023

  • Update code to use latest Mockito 5
  • Update code to use latest JUnit5
  • Check if we still need the ThreadLocal in RepositoryMockUtils - is Mockito5 supporting multithreaded testing properly? I guess, yes.
  • Check if it would make sense to provide a MagnoliaMockitoExtension
    • setting Strictness.WARN (if needed)
    • calling clearComponentProvider() after each test method
    • using MockUtils to build instance mocks or method parameter mocks
  • Use Optional and stream().forEach()
  • I'm sure, there is more to improve
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant