// tests/api_stability.rs
use pdfmake_rust::prelude::*;

#[test]
fn test_document_builder_api() {
    let doc = Document::builder()
        .page_size(PageSize::a4())
        .page_margins(Margins::all(40.0))
        .content(DocumentNode::text("Hello"))
        .build();
    
    assert!(!doc.content.is_empty());
}

#[test]
fn test_style_builder_api() {
    let style = Style::new()
        .font_size(12.0)
        .bold(true)
        .color("#000000");
    
    assert_eq!(style.font_size, Some(12.0));
}

#[test]
fn test_page_size_presets() {
    assert_eq!(PageSize::a4().width, 595.28);
    assert_eq!(PageSize::letter().width, 612.0);
}
