Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space ENGINES1031 and version 10.3.3

...

Adding Dependencies in Maven

Modify the pom.xml file by adding the following entry to the <dependencies> sectionxml file by adding new entries to the <dependencies> section. The following entries include all the required libraries:

Code Block
<dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.11</version>
    <scope>test</scope>
</dependency>

<dependency> 
	<groupId>pl<groupId>org.pragmatists<mockito</groupId>  
	<artifactId>JUnitParams<<artifactId>mockito-all</artifactId>
    	<version>1.010.6<19</version>
    	<scope>test</scope>
</dependency>

<dependency>
    <groupId>org.mockito<powermock</groupId>
    
	<artifactId>mockito-all<<artifactId>powermock-module-junit4</artifactId>
    <version>1.96.5</version>
    <scope>test</scope>
</dependency>
<dependency>
<dependency>
    	<groupId>org.powermock</groupId>
	<artifactId>powermock-core</artifactId>
	<version>1.6.5</version>
	<scope>test</scope>
</dependency>
<dependency>
	<groupId>org.powermock</groupId>
  	<artifactId>powermock-mockito-release-full</artifactId>
    <version>1.5.5</version>
    <type>pom</type>
    -api-mockito</artifactId>
	<version>1.6.5</version>
	<scope>test</scope>
</dependency>
<dependency>
	<groupId>org.powermock</groupId>
	<artifactId>powermock-api-support</artifactId>
	<version>1.6.5</version>
	<scope>test</scope>
</dependency>
<dependency>
	<groupId>pl.pragmatists</groupId>
	<artifactId>JUnitParams</artifactId>
	<version>1.0.6</version>
	<scope>test</scope>
</dependency>

Adding Dependencies in Gradle

Modify the build.gradle file by adding new entries to the dependencies section. The following entries include all the required libraries:

Code Block
testCompile 'org.powermock:powermock-module-junit4:1.6.5'
testCompile 'org.powermock:powermock-api-mockito:1.6.5'
testCompile 'junit:junit:4.11'
testCompile 'pl.pragmatists:JUnitParams:1.0.6'

Adding Dependencies in Ant

Ant requires all required JAR files to be added to a separate directory. The directory must be added manually by including in the build.xml file:

Code Block
<classpath>
    <!-- filesets can be used in classpath and bootpath -->
	<fileset dir="C:/directory_name/lib">
				<include name="**/*.jar"/>
    </fileset>
</classpath>

The following libraries are required:

  • junit-4.11
  • JUnitParams-1.0.6
  • mockito-all-1.10.19
  • powermock-mockito-1.6.5-full

The libraries are available online or in the [INSTALL_DIR]/examples/demo/lib.