// 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 static org.junit.jupiter.api.Assertions.*;
import dev.kreuzberg.Kreuzberg;
import dev.kreuzberg.ExtractionConfig;
import java.util.Optional;
import dev.kreuzberg.JsonUtil;

/** E2e tests for category: format_specific. */
class FormatSpecificTest {

    @Test
    void testFormatDocxStandalone() throws Exception {
        // Standalone DOCX extraction using extract_bytes_sync
        var result = Kreuzberg.extractBytesSync(java.nio.file.Files.readAllBytes(java.nio.file.Path.of("docx/fake.docx")), "application/vnd.openxmlformats-officedocument.wordprocessingml.document", ExtractionConfig.builder().build());
assertTrue(result.content().length() >= 20, "expected length >= 20");

    }


    @Test
    void testFormatHwpxStandalone() throws Exception {
        // Standalone HWPX extraction using extract_bytes_sync
        var result = Kreuzberg.extractBytesSync(java.nio.file.Files.readAllBytes(java.nio.file.Path.of("hwpx/simple.hwpx")), "application/haansofthwpx", ExtractionConfig.builder().build());
assertTrue(result.content().length() >= 20, "expected length >= 20");assertTrue(result.content().contains("Hello from HWPX"), "expected to contain: " + "Hello from HWPX");

    }


    @Test
    void testFormatPdfText() throws Exception {
        // Standalone PDF text extraction using extract_bytes_sync
        var result = Kreuzberg.extractBytesSync(java.nio.file.Files.readAllBytes(java.nio.file.Path.of("pdf/fake_memo.pdf")), "application/pdf", ExtractionConfig.builder().build());
assertTrue(result.content().length() >= 50, "expected length >= 50");assertTrue(result.content().contains("Mallori") || result.content().contains("May"), "expected to contain at least one of the specified values");

    }


    @Test
    void testFormatPptx() throws Exception {
        // PPTX presentation extraction using extract_file_sync
        var result = Kreuzberg.extractFileSync(java.nio.file.Path.of("pptx/simple.pptx"), "application/vnd.openxmlformats-officedocument.presentationml.presentation", ExtractionConfig.builder().build());


    }


    @Test
    void testFormatXlsx() throws Exception {
        // XLSX spreadsheet extraction using extract_file_sync
        var result = Kreuzberg.extractFileSync(java.nio.file.Path.of("xlsx/stanley_cups.xlsx"), "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", ExtractionConfig.builder().build());


    }

}
