This library was developed for parsing FictionBook2 format into the Rust's structs. Used in main project fb2lib
#[cfg(test)]
mod tests {
use super::*;
use xmltree::Element;
use util::from;
const TEST_DATA: &'static str = "<root><book-title>value</book-title></root>";
#[test]
fn from_trait_impl() {
let root = Element::parse(TEST_DATA.as_bytes()).unwrap();
assert_eq!(
BookTitle { text: "value".to_owned() },
from(&root, "book-title").unwrap()
);
}
}