use threemf::model::{Components, Object};
#[test]
fn test_object() {
let object_str = r##""##;
let object_de: Object = quick_xml::de::from_str(object_str).unwrap();
match object_de {
Object { mesh: Some(_), .. } => panic!("No mesh in this object"),
Object {
components: Some(Components { component }),
..
} => {
assert_eq!(component.len(), 3);
let transform = component.first().unwrap().transform.unwrap();
assert_eq!(transform[0], 0.0393701);
}
_ => panic!("There should be components"),
}
}
#[test]
fn test_metadatagroup() {
let object_str = r##"
"##;
let object_de: Object = quick_xml::de::from_str(object_str).unwrap();
assert!(object_de.mesh.is_some());
}