// 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
// swift-format-ignore-file

import XCTest
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
import Kreuzberg
import RustBridge

/// E2e tests for category: embeddings.
final class EmbeddingsTests: XCTestCase {
    func testEmbedTextsDifferentPreset() throws {
        // embed_texts: multilingual preset
        let configObj = try Kreuzberg.embeddingConfigFromJson("{\"model\":{\"name\":\"multilingual\",\"type\":\"preset\"}}")
        let result = try Kreuzberg.embedTexts(texts: ["Hello world", "Test"], config: configObj)
        // skipped: field 'embeddings' not available on result type
    }

    func testGetEmbeddingPresetKnown() throws {
        // get_embedding_preset: known preset
        let result = try Kreuzberg.getEmbeddingPreset(name: "balanced")
    }

    func testGetEmbeddingPresetNominal() throws {
        // get_embedding_preset: nominal case
        let result = try Kreuzberg.getEmbeddingPreset(name: "balanced")
    }

    func testGetEmbeddingPresetUnknown() throws {
        // get_embedding_preset: unknown preset fails
        let result = try Kreuzberg.getEmbeddingPreset(name: "nonexistent-xyz")
        XCTAssertNil(result, "expected nil value")
    }

    func testListEmbeddingPresetsSanity() throws {
        // list_embedding_presets: returns at least one
        let result = try Kreuzberg.listEmbeddingPresets()
        XCTAssertFalse(result.isEmpty, "expected non-empty value")
    }

}
