// This file is auto-generated by alef — DO NOT EDIT.
// alef:hash:4e15143f4af1ae8bafbdb1506ef057da924484c66a19483966333558ad437e75
// To regenerate: alef generate
// To verify freshness: alef verify --exit-code
// Issues & docs: https://github.com/kreuzberg-dev/alef
package dev.kreuzberg.e2e

import org.junit.jupiter.api.Test
import kotlin.test.assertEquals
import kotlin.test.assertTrue
import kotlin.test.assertFalse
import kotlin.test.assertFailsWith
import kotlinx.coroutines.runBlocking
import dev.kreuzberg.Kreuzberg

/** E2e tests for category: detection. */
class DetectionTest {
    @Test
    fun testDetectMimeBytesHtml() = runBlocking {
        // Detect HTML MIME from bytes
        val result = Kreuzberg.detectMimeTypeFromBytes("html/html.html")
    }

    @Test
    fun testDetectMimeBytesPdf() = runBlocking {
        // Detect PDF MIME type from bytes
        val result = Kreuzberg.detectMimeTypeFromBytes("pdf/fake_memo.pdf")
    }

    @Test
    fun testDetectMimeBytesPng() = runBlocking {
        // Detect PNG MIME type from bytes
        val result = Kreuzberg.detectMimeTypeFromBytes("images/test_hello_world.png")
    }

    @Test
    fun testGetExtensionsUnknownMime() = runBlocking {
        // get_extensions unknown MIME
        assertFailsWith<Exception> {
            Kreuzberg.getExtensionsForMime("application/x-totally-unknown")
        }
        Unit
    }

}
