Skip to content

Commit

Permalink
Prevent transitive dependencies on mockito, hamcrest and assertj
Browse files Browse the repository at this point in the history
  • Loading branch information
ursjoss committed May 5, 2020
1 parent 8fcc8f0 commit eaea5e0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
13 changes: 12 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,19 @@ subprojects {

compileOnly(Lib.jsr305())

testImplementation(Lib.springBootStarter("test").id) {
exclude("junit", "junit")
exclude("org.skyscreamer", "jsonassert")
exclude("org.mockito", "mockito-core")
exclude("org.mockito", "mockito-junit-jupiter")
exclude("org.hamcrest", "hamcrest")
exclude("org.assertj", "assertj-core")
}
testImplementation(Lib.spek("dsl-jvm"))
testImplementation(Lib.kluent())
testImplementation(Lib.kluent().id) {
exclude("org.mockito", "mockito-core")
exclude("com.nhaarman.mockitokotlin2", "mockito-kotlin")
}
testImplementation(Lib.mockk())
testImplementation(Lib.springMockk())
testImplementation(Lib.kwik("evaluator"))
Expand Down
9 changes: 8 additions & 1 deletion common/common-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,19 @@ dependencies {
api(project(Module.scipamatoCommon("utils")))
api(project(Module.scipamatoCommon("entity")))

api(Lib.kluent())
api(Lib.springBootStarter("test").id) {
exclude("junit", "junit")
exclude("org.skyscreamer", "jsonassert")
exclude("org.mockito", "mockito-core")
exclude("org.mockito", "mockito-junit-jupiter")
exclude("org.hamcrest", "hamcrest")
exclude("org.assertj", "assertj-core")
}
api(Lib.junit5())
api(Lib.junit5("params"))
api(Lib.kluent().id) {
exclude("org.mockito", "mockito-core")
exclude("com.nhaarman.mockitokotlin2", "mockito-kotlin")
}
api(Lib.equalsverifier())
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package ch.difty.scipamato.common.paper

import org.amshove.kluent.shouldBeEqualTo
import org.assertj.core.api.AssertionsForInterfaceTypes.assertThat
import org.junit.jupiter.api.Test

@Suppress("SpellCheckingInspection")
Expand All @@ -26,10 +25,8 @@ internal class AbstractShortFieldConcatenatorWithoutNewLineTest {

@Test
fun method_withMethodNull_returnsConcatenatedShortFieldsWhereNotBlank() {
assertThat(concatenator.methodsFrom(null, "", " ", "pp", "ep", "ea", "ms", "mc"))
.isEqualTo(
"Place: pp / Pollutant: ep / Exposure Assessment: ea / Statistical Method: ms / Confounders: mc"
)
concatenator.methodsFrom(null, "", " ", "pp", "ep", "ea", "ms", "mc") shouldBeEqualTo
"Place: pp / Pollutant: ep / Exposure Assessment: ea / Statistical Method: ms / Confounders: mc"
}

@Test
Expand Down

0 comments on commit eaea5e0

Please sign in to comment.