No issue: remove assertJ.
It was only used for 3 checks so it's not worth having a dependency on it.master
parent
c15a005ca8
commit
f1159f3558
|
@ -39,7 +39,6 @@ object Versions {
|
||||||
const val installreferrer = "1.0"
|
const val installreferrer = "1.0"
|
||||||
|
|
||||||
const val junit = "5.5.2"
|
const val junit = "5.5.2"
|
||||||
const val assertJ = "3.13.2"
|
|
||||||
const val mockito = "2.24.5"
|
const val mockito = "2.24.5"
|
||||||
const val mockk = "1.9.kotlin12"
|
const val mockk = "1.9.kotlin12"
|
||||||
const val assertk = "0.19"
|
const val assertk = "0.19"
|
||||||
|
@ -207,6 +206,5 @@ object Deps {
|
||||||
const val detektTest = "io.gitlab.arturbosch.detekt:detekt-test:${Versions.detekt}"
|
const val detektTest = "io.gitlab.arturbosch.detekt:detekt-test:${Versions.detekt}"
|
||||||
const val junitApi = "org.junit.jupiter:junit-jupiter-api:${Versions.junit}"
|
const val junitApi = "org.junit.jupiter:junit-jupiter-api:${Versions.junit}"
|
||||||
const val junitParams = "org.junit.jupiter:junit-jupiter-params:${Versions.junit}"
|
const val junitParams = "org.junit.jupiter:junit-jupiter-params:${Versions.junit}"
|
||||||
const val assertJ = "org.assertj:assertj-core:${Versions.assertJ}"
|
|
||||||
const val junitEngine = "org.junit.jupiter:junit-jupiter-engine:${Versions.junit}"
|
const val junitEngine = "org.junit.jupiter:junit-jupiter-engine:${Versions.junit}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@ dependencies {
|
||||||
implementation Deps.kotlin_stdlib
|
implementation Deps.kotlin_stdlib
|
||||||
testImplementation Deps.junitApi
|
testImplementation Deps.junitApi
|
||||||
testImplementation Deps.junitParams
|
testImplementation Deps.junitParams
|
||||||
testImplementation Deps.assertJ
|
|
||||||
testRuntimeOnly Deps.junitEngine
|
testRuntimeOnly Deps.junitEngine
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,8 @@ package org.mozilla.fenix.detektrules
|
||||||
|
|
||||||
import io.gitlab.arturbosch.detekt.test.lint
|
import io.gitlab.arturbosch.detekt.test.lint
|
||||||
import io.gitlab.arturbosch.detekt.api.YamlConfig
|
import io.gitlab.arturbosch.detekt.api.YamlConfig
|
||||||
import org.assertj.core.api.Assertions.assertThat
|
import org.junit.jupiter.api.Assertions.assertEquals
|
||||||
|
import org.junit.jupiter.api.Assertions.assertTrue
|
||||||
import org.junit.jupiter.api.DisplayName
|
import org.junit.jupiter.api.DisplayName
|
||||||
import org.junit.jupiter.api.Test
|
import org.junit.jupiter.api.Test
|
||||||
import org.junit.jupiter.params.ParameterizedTest
|
import org.junit.jupiter.params.ParameterizedTest
|
||||||
|
@ -22,8 +23,8 @@ internal class MozillaBannedPropertyAccessTest {
|
||||||
MozillaBannedPropertyAccess(YamlConfig.loadResource(this.javaClass.getResource("/config.yml"))).lint(
|
MozillaBannedPropertyAccess(YamlConfig.loadResource(this.javaClass.getResource("/config.yml"))).lint(
|
||||||
NONCOMPLIANT_ACCESS.trimIndent()
|
NONCOMPLIANT_ACCESS.trimIndent()
|
||||||
)
|
)
|
||||||
assertThat(findings).hasSize(1)
|
assertEquals(1, findings.size)
|
||||||
assertThat(findings[0].issue.description).isEqualTo(DESCR)
|
assertEquals(DESCR, findings[0].issue.description)
|
||||||
}
|
}
|
||||||
|
|
||||||
@DisplayName("compliant ")
|
@DisplayName("compliant ")
|
||||||
|
@ -34,7 +35,7 @@ internal class MozillaBannedPropertyAccessTest {
|
||||||
MozillaBannedPropertyAccess(YamlConfig.loadResource(this.javaClass.getResource("/config.yml"))).lint(
|
MozillaBannedPropertyAccess(YamlConfig.loadResource(this.javaClass.getResource("/config.yml"))).lint(
|
||||||
source
|
source
|
||||||
)
|
)
|
||||||
assertThat(findings).isEmpty()
|
assertTrue(findings.isEmpty())
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
@ -78,4 +79,4 @@ const val COMPLIANT_ACCESS = """
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue