use jdt_activity_pub::{ApNote, ApNoteType, ApAddress, ApContext};
use chrono::Utc;
fn main() {
println!("๐งช Testing ApNote Display and Debug implementations");
println!();
let note_with_name = ApNote {
context: Some(ApContext::default()),
kind: ApNoteType::Note,
attributed_to: ApAddress::Address("https://example.com/users/alice".to_string()),
id: Some("https://example.com/notes/123".to_string()),
name: Some("Test Note with Name".to_string()),
content: Some("This is a test note with a name field for question replies".to_string()),
published: Utc::now().into(),
..Default::default()
};
println!("๐ Note with name:");
println!(" Display: {}", note_with_name);
println!(" Debug: {:?}", note_with_name);
println!();
let note_without_name = ApNote {
context: Some(ApContext::default()),
kind: ApNoteType::Note,
attributed_to: ApAddress::Address("https://example.com/users/bob".to_string()),
id: Some("https://example.com/notes/456".to_string()),
name: None,
content: Some("This is a regular note without a name field".to_string()),
published: Utc::now().into(),
..Default::default()
};
println!("๐ Note without name:");
println!(" Display: {}", note_without_name);
println!(" Debug: {:?}", note_without_name);
println!();
let note_name_no_id = ApNote {
context: Some(ApContext::default()),
kind: ApNoteType::Note,
attributed_to: ApAddress::Address("https://example.com/users/charlie".to_string()),
id: None,
name: Some("Vote: Option A".to_string()),
content: Some("This represents a vote selection".to_string()),
published: Utc::now().into(),
..Default::default()
};
println!("๐ Note with name but no ID:");
println!(" Display: {}", note_name_no_id);
println!(" Debug: {:?}", note_name_no_id);
}