From 5656f3c492f0116f9dc07f01db83c0a3c343231e Mon Sep 17 00:00:00 2001 From: Nariman Abdullin Date: Thu, 16 Nov 2023 18:48:51 +0300 Subject: [PATCH] reverted changes in tests --- .../diktat/plugin/gradle/DiktatJavaExecTaskTest.kt | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/diktat-gradle-plugin/src/test/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatJavaExecTaskTest.kt b/diktat-gradle-plugin/src/test/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatJavaExecTaskTest.kt index d85e6deea4..c5b4d1430f 100644 --- a/diktat-gradle-plugin/src/test/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatJavaExecTaskTest.kt +++ b/diktat-gradle-plugin/src/test/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatJavaExecTaskTest.kt @@ -160,17 +160,7 @@ class DiktatJavaExecTaskTest { output = "report.json" } val task = project.tasks.getByName(DIKTAT_CHECK_TASK) as DiktatCheckTask - val (firstReporter, secondReporter) = task.diktatRunner.diktatReporter - .unwrap>().first() - .unwrap() - .unwrap>() - .toList() - assert( - firstReporter.unwrapToKtlint() is SarifReporter - ) - assert( - secondReporter.unwrapToKtlint() is JsonReporter - ) + assert(task.diktatRunner.diktatReporter.unwrapFirst() is SarifReporter) Assertions.assertEquals( project.rootDir.toString(), System.getProperty("user.home") @@ -182,6 +172,7 @@ class DiktatJavaExecTaskTest { assertFiles(emptyList()) { inputs { exclude("*") } diktatConfigFile = project.file("../diktat-analysis.yml") + reporter = "sarif" } val task = project.tasks.getByName(DIKTAT_CHECK_TASK) as DiktatCheckTask assert(task.diktatRunner.diktatReporter.unwrapFirst() is SarifReporter)