//! Verify generated types exist and are constructable.

use bo4e_edifact_types::generated::companions::*;

#[test]
fn test_companion_types_exist() {
    let _m = MarktlokationEdifact::default();
    let _g = GeschaeftspartnerEdifact::default();
    let _p = ProzessdatenEdifact::default();
}

#[test]
fn test_companion_serde_roundtrip() {
    let companion = MarktlokationEdifact {
        betriebszustand: Some("Z51".to_string()),
        ..Default::default()
    };
    let json = serde_json::to_string(&companion).unwrap();
    let deserialized: MarktlokationEdifact = serde_json::from_str(&json).unwrap();
    assert_eq!(deserialized.betriebszustand.as_deref(), Some("Z51"));
}

use bo4e_edifact_types::generated::fv2504::utilmd_strom::pids::*;

#[test]
fn test_pid_55001_types_exist() {
    let _m = Pid55001MessageStammdaten::default();
    let _t = Pid55001TransaktionStammdaten::default();
}

#[test]
fn test_pid_55001_interchange_type_alias() {
    let interchange = Pid55001Interchange {
        interchangedaten: bo4e_edifact_types::Interchangedaten::default(),
        nachrichten: vec![],
    };
    assert!(interchange.nachrichten.is_empty());
}
