diff --git a/backend/data/src/test/kotlin/io/tolgee/unit/util/exportAssertUtil.kt b/backend/data/src/test/kotlin/io/tolgee/unit/util/exportAssertUtil.kt index 503c9950d8..6476a3fecd 100644 --- a/backend/data/src/test/kotlin/io/tolgee/unit/util/exportAssertUtil.kt +++ b/backend/data/src/test/kotlin/io/tolgee/unit/util/exportAssertUtil.kt @@ -19,19 +19,21 @@ fun getExported(exporter: FileExporter): Map { fun getExportedCompressed(exporter: FileExporter): Map { val files = exporter.produceFiles() - val data = files.map { - it.key to buildString { - val stream = ZipInputStream(it.value) - var entry = stream.nextEntry - while (entry != null) { - appendLine("====================") - appendLine(entry.name) - appendLine("--------------------") - append(stream.bufferedReader().readText()) - appendLine() - entry = stream.nextEntry - } - } - }.toMap() + val data = + files.map { + it.key to + buildString { + val stream = ZipInputStream(it.value) + var entry = stream.nextEntry + while (entry != null) { + appendLine("====================") + appendLine(entry.name) + appendLine("--------------------") + append(stream.bufferedReader().readText()) + appendLine() + entry = stream.nextEntry + } + } + }.toMap() return data } diff --git a/backend/data/src/test/kotlin/io/tolgee/unit/xlsx/out/XlsxFileExporterTest.kt b/backend/data/src/test/kotlin/io/tolgee/unit/xlsx/out/XlsxFileExporterTest.kt index fedc641b80..1f8ef130c6 100644 --- a/backend/data/src/test/kotlin/io/tolgee/unit/xlsx/out/XlsxFileExporterTest.kt +++ b/backend/data/src/test/kotlin/io/tolgee/unit/xlsx/out/XlsxFileExporterTest.kt @@ -15,7 +15,6 @@ import java.util.Calendar import java.util.Date class XlsxFileExporterTest { - private val currentDateProvider = Mockito.mock(CurrentDateProvider::class.java) @BeforeEach @@ -33,7 +32,9 @@ class XlsxFileExporterTest { fun `exports with placeholders (ICU placeholders disabled)`() { val exporter = getIcuPlaceholdersDisabledExporter() val data = getExportedCompressed(exporter) - data.assertFile("all.xlsx", """ + data.assertFile( + "all.xlsx", + """ |==================== |[Content_Types].xml |-------------------- @@ -77,7 +78,8 @@ class XlsxFileExporterTest { | |01234506 | - """.trimMargin()) + """.trimMargin(), + ) } private fun getIcuPlaceholdersDisabledExporter(): XlsxFileExporter { @@ -108,7 +110,9 @@ class XlsxFileExporterTest { fun `exports with placeholders (ICU placeholders enabled)`() { val exporter = getIcuPlaceholdersEnabledExporter() val data = getExportedCompressed(exporter) - data.assertFile("all.xlsx", """ + data.assertFile( + "all.xlsx", + """ |==================== |[Content_Types].xml |-------------------- @@ -151,14 +155,17 @@ class XlsxFileExporterTest { | |012345 | - """.trimMargin()) + """.trimMargin(), + ) } @Test fun `correct exports translation with colon`() { val exporter = getExporter(getTranslationWithColon()) val data = getExportedCompressed(exporter) - data.assertFile("all.xlsx", """ + data.assertFile( + "all.xlsx", + """ |==================== |[Content_Types].xml |-------------------- @@ -201,7 +208,8 @@ class XlsxFileExporterTest { | |0123 | - """.trimMargin()) + """.trimMargin(), + ) } private fun getTranslationWithColon(): MutableList { @@ -248,4 +256,3 @@ class XlsxFileExporterTest { ) } } -