// 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: pdf. */
class PdfTest {
    @Test
    fun testRenderPdfPageFirst() = runBlocking {
        // render_pdf_page_to_png: first page
        val result = Kreuzberg.renderPdfPageToPng("pdf/fake_memo.pdf", 0)
        assertTrue(result.size >= 100, "expected size >= 100")
    }

    @Test
    fun testRenderPdfPageOutOfRange() = runBlocking {
        // render_pdf_page_to_png: page out of range
        assertFailsWith<Exception> {
            Kreuzberg.renderPdfPageToPng("pdf/fake_memo.pdf", 999)
        }
        Unit
    }

}
