()
| 676 | |
| 677 | #[test] |
| 678 | fn test_header_json_full_roundtrip() { |
| 679 | let header = ChangeHeader::builder() |
| 680 | .message("Full JSON test") |
| 681 | .description("Testing full JSON serialization") |
| 682 | .author(Author::new("Alice", Some("alice@example.com"))) |
| 683 | .author(Author::new("Bob", None::<String>)) |
| 684 | .build(); |
| 685 | |
| 686 | let json = serde_json::to_string_pretty(&header).unwrap(); |
| 687 | let parsed: ChangeHeader = serde_json::from_str(&json).unwrap(); |
| 688 | |
| 689 | assert_eq!(header.message, parsed.message); |
| 690 | assert_eq!(header.description, parsed.description); |
| 691 | assert_eq!(header.authors.len(), parsed.authors.len()); |
| 692 | } |
| 693 | |
| 694 | // Builder Tests |
| 695 |
nothing calls this directly
no test coverage detected