@@ -13,8 +13,8 @@ import org.jetbrains.kotlinx.dataframe.impl.io.resizeKeepingAspectRatio
13
13
import org.jetbrains.kotlinx.dataframe.io.Base64ImageEncodingOptions.Companion.ALL_OFF
14
14
import org.jetbrains.kotlinx.dataframe.io.Base64ImageEncodingOptions.Companion.GZIP_ON
15
15
import org.jetbrains.kotlinx.dataframe.io.Base64ImageEncodingOptions.Companion.LIMIT_SIZE_ON
16
- import org.junit.runner.RunWith
17
- import org.junit.runners.Parameterized
16
+ import org.junit.jupiter.params.ParameterizedTest
17
+ import org.junit.jupiter.params.provider.MethodSource
18
18
import java.awt.image.BufferedImage
19
19
import java.io.ByteArrayInputStream
20
20
import java.io.ByteArrayOutputStream
@@ -23,12 +23,11 @@ import java.util.Base64
23
23
import java.util.zip.GZIPInputStream
24
24
import javax.imageio.ImageIO
25
25
import kotlin.math.abs
26
- import kotlin.test.Test
27
26
28
- @RunWith( Parameterized :: class )
29
- class ImageSerializationTests ( private val encodingOptions : Base64ImageEncodingOptions ? ) {
30
- @Test
31
- fun `serialize images as base64` () {
27
+ class ImageSerializationTests {
28
+ @ParameterizedTest
29
+ @MethodSource( " imageEncodingOptionsToTest " )
30
+ fun `serialize images as base64` (encodingOptions : Base64ImageEncodingOptions ? ) {
32
31
val images = readImagesFromResources()
33
32
val json = encodeImagesAsJson(images, encodingOptions)
34
33
@@ -166,8 +165,7 @@ class ImageSerializationTests(private val encodingOptions: Base64ImageEncodingOp
166
165
private val DISABLED = null
167
166
168
167
@JvmStatic
169
- @Parameterized.Parameters
170
- fun imageEncodingOptionsToTest (): Collection <Base64ImageEncodingOptions ?> =
168
+ fun imageEncodingOptionsToTest (): List <Base64ImageEncodingOptions ?> =
171
169
listOf (
172
170
DEFAULT ,
173
171
GZIP_ON_RESIZE_OFF ,
0 commit comments