[JAVA] Difference between mockito-core and mockito-all

There are two types of mockito, the mockito-core library and the mockito-all distribution. Basically it is better to use the latest version of mockito-core, but I will explain the difference.

mockito-core mockito-core is the main body of mockito. If you are using a package management tool such as maven or gradle, you can use mockito by including mockito-core in its dependency.

for maven

pom.xml


<dependency>
    <groupId>org.mockito</groupId>
    <artifactId>mockito-core</artifactId>
    <version>3.6.0</version>
    <scope>test</scope>
</dependency>

For gradle

build.gradle


testCompile group: 'org.mockito', name: 'mockito-core', version: '3.6.0'

mockito-all mockito depends on hamcrest and objenesis. mockito-all includes mockito and its dependencies.

Use this for legacy projects where you manage dependencies manually. However, mockito-all has been deprecated since version 2.X and is only up to version 1.X.

Reference site (English)

Official site https://site.mockito.org/ "How do I drink it?" Explains how to use mockito.

The Difference Between mockito-core and mockito-all https://www.baeldung.com/mockito-core-vs-mockito-all

Recommended Posts

Difference between mockito-core and mockito-all
Difference between vh and%
Difference between i ++ and ++ i
Difference between product and variant
Difference between redirect_to and render
[Java] Difference between == and equals
Rails: Difference between resources and resources
Difference between puts and print
Difference between redirect_to and render
Difference between CUI and GUI
Difference between variables and instance variables
Difference between class and instance
Difference between bundle and bundle install
Difference between ArrayList and LinkedList
Difference between render and redirect_to
Difference between List and ArrayList
Difference between .bashrc and .bash_profile
Difference between StringBuilder and StringBuffer
Difference between render and redirect_to
Difference between render and redirect_to
[Ruby] Difference between get and post
Difference between render method and redirect_to
Difference between interface and abstract class
Difference between == operator and equals method
[Java] Difference between Hashmap and HashTable
[Terminal] Difference between irb and pry
JavaServlet: Difference between executeQuery and executeUpdate
[Ruby] Difference between is_a? And instance_of?
[Rails] Difference between find and find_by
[JAVA] Difference between abstract and interface
Difference between Thymeleaf @RestController and @Controller
Difference between Stream map and flatMap
[Java] Difference between array and ArrayList
Difference between primitive type and reference type
Difference between string.getByte () and Hex.decodeHex (string.toCharaArray ())
[Java] Difference between Closeable and AutoCloseable
[Java] Difference between StringBuffer and StringBuilder
[Java] Difference between length, length () and size ()
[rails] Difference between redirect_to and render
[Android] Difference between finish (); and return;
Note: Difference between Ruby "p" and "puts"
Difference between final and Immutable in Java
[Memo] Difference between bundle install and update
Difference between Ruby instance variable and local variable
Difference between pop () and peek () in stack
[For beginners] Difference between Java and Kotlin
Difference between isEmpty and isBlank of StringUtils
Difference between getText () and getAttribute () in Selenium
About the difference between irb and pry
Difference between "|| =" and "instance_variable_defined?" In Ruby memoization
Difference between EMPTY_ELEMENTDATA and DEFAULTCAPACITY_EMPTY_ELEMENTDATA in ArrayList
Difference between addPanel and presentModally of FloatingPanel
[Ruby] Difference between print, puts and p
[Java] Difference between Intstream range and rangeClosed
Difference between int and Integer in Java
[Rails] Difference between redirect_to and render [Beginner]
[iOS] Understand the difference between frame and bounds
[Rails / ActiveRecord] About the difference between create and create!
Difference between next () and nextLine () in Java Scanner
Understand the difference between abstract classes and interfaces!
What is the difference between SimpleDateFormat and DateTimeFormatter? ??