in sdk/core/azure_core_amqp/src/messaging.rs [1519:1561]
fn test_amqp_message_properties_builder() {
let time_now = SystemTime::now();
let test_uuid1 = Uuid::new_v4();
let test_uuid2 = Uuid::new_v4();
let properties = AmqpMessageProperties {
message_id: Some(test_uuid1.into()),
user_id: Some(vec![1, 2, 3]),
to: Some("destination".to_string()),
subject: Some("subject".to_string()),
reply_to: Some("reply_to".to_string()),
correlation_id: Some(test_uuid2.into()),
content_type: Some(AmqpSymbol::from("content_type")),
content_encoding: Some(AmqpSymbol::from("content_encoding")),
absolute_expiry_time: Some(time_now.into()),
creation_time: Some(time_now.into()),
group_id: Some("group_id".to_string()),
group_sequence: Some(1),
reply_to_group_id: Some("reply_to_group_id".to_string()),
};
assert_eq!(properties.message_id, Some(test_uuid1.into()));
assert_eq!(properties.user_id, Some(vec![1, 2, 3]));
assert_eq!(properties.to, Some("destination".to_string()));
assert_eq!(properties.subject, Some("subject".to_string()));
assert_eq!(properties.reply_to, Some("reply_to".to_string()));
assert_eq!(properties.correlation_id, Some(test_uuid2.into()));
assert_eq!(
properties.content_type,
Some(AmqpSymbol::from("content_type"))
);
assert_eq!(
properties.content_encoding,
Some(AmqpSymbol::from("content_encoding"))
);
assert_eq!(properties.absolute_expiry_time, Some(time_now.into()));
assert_eq!(properties.creation_time, Some(time_now.into()));
assert_eq!(properties.group_id, Some("group_id".to_string()));
assert_eq!(properties.group_sequence, Some(1));
assert_eq!(
properties.reply_to_group_id,
Some("reply_to_group_id".to_string())
);
}