Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package io.mosip.pixelpass

actual typealias IgnoreOnAndroid = org.junit.Ignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ class QrDataConvertorAndroidTest {

val data = "Test QR Data"
val header = "Header"

val result = convertQRDataIntoBase64("$header$data", ECC.L)

assertEquals("", result, "The result should be an empty string when an exception occurs")
assertEquals("", result, "Should return empty string when exception occurs from QrCode.encodeText")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package io.mosip.pixelpass

import co.nstant.`in`.cbor.CborDecoder
import co.nstant.`in`.cbor.CborEncoder
import co.nstant.`in`.cbor.model.DataItem
import io.mosip.pixelpass.cbor.Utils
import io.mosip.pixelpass.common.decodeFromBase64UrlFormat
import io.mosip.pixelpass.exception.UnknownBinaryFileTypeException
Expand Down Expand Up @@ -67,7 +66,11 @@ class PixelPass {
} catch (e: Exception) {
throw e
} finally {
tempFile?.delete()
tempFile?.let {
if (!it.delete()) {
System.err.println("Warning: Failed to delete temp file: ${it.absolutePath}")
}
}
}
}
throw UnknownBinaryFileTypeException()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package io.mosip.pixelpass

@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
@Retention(AnnotationRetention.RUNTIME)
expect annotation class IgnoreOnAndroid()
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import kotlin.test.fail
import org.json.JSONArray
import org.json.JSONObject

@IgnoreOnAndroid
class PixelPassGenerateQRCodeTest {

private val pixelPass = PixelPass()
Expand Down
Loading