1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 17:19:39 +02:00

Introduce test fixtures

This also removes the powermock dependency. Although powermock is a
fine library, it currently prevents dropping Junit4. And since we only
use the Whitebox API of powermock, this simply replaced powermock's
Whitebox with our own.
This commit is contained in:
Florian Schmaus 2020-04-11 21:59:21 +02:00
parent 4a99f7252c
commit b5f9d4d7a3
51 changed files with 123 additions and 80 deletions

View file

@ -24,6 +24,7 @@ apply from: 'version.gradle'
allprojects {
apply plugin: 'java-library'
apply plugin: 'java-test-fixtures'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'jacoco'
@ -130,7 +131,6 @@ allprojects {
':smack-openpgp',
].collect { project(it) }
junitVersion = '5.6.0'
powerMockVersion = '2.0.2'
commonsIoVersion = '2.6'
if (project.hasProperty("useSonatype")) {
useSonatype = project.getProperty("useSonatype").toBoolean()
@ -266,10 +266,16 @@ allprojects {
}
dependencies {
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
testFixturesApi "org.junit.jupiter:junit-jupiter-api:$junitVersion"
testImplementation "org.junit.jupiter:junit-jupiter-params:$junitVersion"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
// The smack-extensions subproject uses mockito in its fest
// fixtures, and we want to have mockito also available in
// test, so we use API here.
testFixturesApi "org.mockito:mockito-core:3.3.3"
testImplementation 'com.jamesmurty.utils:java-xmlbuilder:1.2'
errorprone 'com.google.errorprone:error_prone_core:2.3.3'
errorproneJavac('com.google.errorprone:javac:9+181-r4173-1')
}
@ -282,9 +288,6 @@ allprojects {
configure (junit4Projects) {
dependencies {
testImplementation "org.junit.vintage:junit-vintage-engine:$junitVersion"
testImplementation "org.powermock:powermock-module-junit4:$powerMockVersion"
testImplementation "org.powermock:powermock-module-junit4-rule:$powerMockVersion"
testImplementation "org.powermock:powermock-api-mockito2:$powerMockVersion"
}
}