Commit 7eae3cae authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Refactor tests.

parent f558eac0
Pipeline #21010 passed with stages
in 4 minutes and 21 seconds
......@@ -18,7 +18,14 @@
package org.memobase
import ch.memobase.reporting.Report
import ch.memobase.reporting.ReportStatus
import ch.memobase.testing.EmbeddedSftpServer
import com.beust.klaxon.Klaxon
import java.io.File
import java.io.FileInputStream
import java.nio.charset.Charset
import java.util.stream.Stream
import org.apache.kafka.common.header.internals.RecordHeader
import org.apache.kafka.common.header.internals.RecordHeaders
import org.apache.kafka.common.serialization.StringDeserializer
......@@ -33,13 +40,6 @@ import org.junit.jupiter.api.TestInstance
import org.junit.jupiter.api.assertAll
import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.MethodSource
import org.memobase.models.Report
import org.memobase.models.ReportStatus
import org.memobase.testing.EmbeddedSftpServer
import java.io.File
import java.io.FileInputStream
import java.nio.charset.Charset
import java.util.stream.Stream
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
class TestIntegration {
......@@ -141,7 +141,7 @@ class TestIntegration {
"simple test",
"data.xml",
"ADG-102683",
Report("ADG-102683", ReportStatus.success, "Successfully transformed xml to json!")
Report("ADG-102683", ReportStatus.success, "Successfully transformed xml to json!", Service.name)
)
)
......@@ -190,8 +190,9 @@ class TestIntegration {
assertThat(klaxon.parse<Report>(report)).isEqualTo(
Report(
"",
ReportStatus.failure,
"Could not find a matching xslt configuration for record set test-record-set-id."
ReportStatus.fatal,
"Could not find a matching xslt configuration for record set test-record-set-id.",
Service.name
)
)
}
......
......@@ -18,7 +18,7 @@
package org.memobase
import org.memobase.models.Report
import ch.memobase.reporting.Report
data class TestParams(
val count: Int,
......
......@@ -17,17 +17,17 @@
*/
package org.memobase
import ch.memobase.settings.HeaderMetadata
import java.io.File
import java.io.FileInputStream
import java.io.InputStream
import java.nio.charset.Charset
import org.apache.logging.log4j.LogManager
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.TestInstance
import org.junit.jupiter.api.assertAll
import org.memobase.xml.XMLTransformer
import settings.HeaderMetadata
import java.io.File
import java.io.FileInputStream
import java.io.InputStream
import java.nio.charset.Charset
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
class TestXsltTransform {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment