Difference Between Mockito-Core vs Mockito-Inline

Difference Between Mockito-Core vs Mockito-Inline

In my project we already have mockito-core dependency. I want to stub static method for which I need to add mockito-inline dependency. So want to understand the difference between them. Can they co-exists?

2 Answers

As per latest documentation of version 4.2.0 it looks like mockito community has come up with mockito-inline for some experimental features like mocking final classes and methods, mocking static methods etc. So once they get feedback from community they will merge those changes in mockito-core and abolished mockito-inline. Eventually it will be mockito-core only.

4

At least with mockito 3.9 mockito-inline "depends on" mockito-core so...you can declare just mockito-inline...they're not mutually exclusive phew.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Marcus Vance
Author

Marcus Vance

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.