use nml2::{bundle::ion_channel_assignments, lems::file::LemsFile, xml::XML, Map}; use roxmltree::Document; #[test] fn check_nonunforms_are_merged() { let lems = LemsFile::core(); let tree = Document::parse(r#" "#).unwrap(); let biophys = XML::from_node( tree.descendants() .find(|c| c.tag_name().name() == "biophysicalProperties") .iter() .next() .unwrap(), ); let props = Map::from([(String::from("Cell1"), biophys)]); let sms = ion_channel_assignments(&props, &lems).unwrap(); assert!(sms.len() == 1); let k = (String::from("Cell1"), String::from("g")); assert!(sms.contains_key(&k)); assert!(sms[&k].len() == 3); }