// 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: mime_utilities. */
class MimeUtilitiesTest {
    @Test
    fun testMimeDetectBytes() = runBlocking {
        // Detect MIME type from file bytes
        val result = Kreuzberg.detectMimeTypeFromBytes("pdf/fake_memo.pdf")
        assertTrue(result.contains("pdf"), "expected to contain: " + "pdf")
    }

    @Test
    fun testMimeDetectImage() = runBlocking {
        // Detect MIME type from PNG image bytes
        val result = Kreuzberg.detectMimeTypeFromBytes("images/test_hello_world.png")
        assertTrue(result.contains("png"), "expected to contain: " + "png")
    }

    @Test
    fun testMimeGetExtensions() = runBlocking {
        // Get file extensions for a MIME type
        val result = Kreuzberg.getExtensionsForMime("application/pdf")
        assertTrue(result.contains("pdf"), "expected to contain: " + "pdf")
    }

}
