Skip to content

Instantly share code, notes, and snippets.

@amrfarid140
Last active June 25, 2018 11:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amrfarid140/20fdec32f64e7280745dad5606078cf7 to your computer and use it in GitHub Desktop.
Save amrfarid140/20fdec32f64e7280745dad5606078cf7 to your computer and use it in GitHub Desktop.
Testing Gradle Dependencies
...
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
testImplementation 'junit:junit:4.12'
testImplementation 'org.hamcrest:hamcrest-library:1.3'
androidTestImplementation ('com.android.support.test:runner:0.5'){
exclude module: 'support-annotations'
}
// Set this dependency to use JUnit 4 rules
androidTestImplementation ('com.android.support.test:rules:0.5'){
exclude module: 'support-annotations'
}
// Set this dependency to build and run Espresso tests
androidTestImplementation ('com.android.support.test.espresso:espresso-core:2.2.2'){
exclude module: 'support-annotations'
}
// required if you want to use Mockito for unit tests
testImplementation 'org.mockito:mockito-core:2.18.3'
// required if you want to use Mockito for Android tests
androidTestImplementation 'org.mockito:mockito-android:2.18.3'
androidTestImplementation 'com.squareup.okhttp3:mockwebserver:3.6.0'
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment