()
| 367 | |
| 368 | #[test] |
| 369 | fn test_format_node_details_structured() { |
| 370 | use crate::format::OutputFormat; |
| 371 | |
| 372 | // JSON format |
| 373 | let out_json = format_node_details(456, "ClassA", 200, OutputFormat::Json).unwrap(); |
| 374 | let parsed: serde_json::Value = serde_json::from_str(&out_json).unwrap(); |
| 375 | assert_eq!(parsed["nodeId"], 456); |
| 376 | assert_eq!(parsed["nodeName"], "ClassA"); |
| 377 | assert_eq!(parsed["selfSize"], 200); |
| 378 | |
| 379 | // TOON format |
| 380 | let out_toon = format_node_details(456, "ClassA", 200, OutputFormat::Toon).unwrap(); |
| 381 | assert!(out_toon.contains("nodeId")); |
| 382 | assert!(out_toon.contains("ClassA")); |
| 383 | } |
| 384 | } |
nothing calls this directly
no test coverage detected