From aa3454dcb3f9c0fdb5baea5a9579893da0846c5e Mon Sep 17 00:00:00 2001 From: Benoit Orihuela Date: Sun, 10 Nov 2024 17:37:12 +0100 Subject: [PATCH] chore: add testFixtures folder in detekt analysis --- build.gradle.kts | 1 + .../kotlin/com/egm/stellio/shared/util/AssertionUtils.kt | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 714f70743..432bc1697 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -116,6 +116,7 @@ subprojects { config.setFrom(files("$rootDir/config/detekt/detekt.yml")) buildUponDefaultConfig = true baseline.set(file("$projectDir/config/detekt/baseline.xml")) + source("src/main/kotlin", "src/test/kotlin", "src/testFixtures/kotlin") reports { xml.required.set(true) diff --git a/shared/src/testFixtures/kotlin/com/egm/stellio/shared/util/AssertionUtils.kt b/shared/src/testFixtures/kotlin/com/egm/stellio/shared/util/AssertionUtils.kt index dcc67743d..7ca9b5be6 100644 --- a/shared/src/testFixtures/kotlin/com/egm/stellio/shared/util/AssertionUtils.kt +++ b/shared/src/testFixtures/kotlin/com/egm/stellio/shared/util/AssertionUtils.kt @@ -4,7 +4,9 @@ import arrow.core.Either import com.egm.stellio.shared.model.APIException import com.fasterxml.jackson.core.filter.FilteringParserDelegate import com.fasterxml.jackson.core.filter.TokenFilter -import org.junit.jupiter.api.Assertions.* +import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.Assertions.assertTrue +import org.junit.jupiter.api.Assertions.fail import java.io.ByteArrayInputStream fun assertJsonPayloadsAreEqual(expectation: String, actual: String, ignoredKeys: Set = emptySet()) {