use super::{DocDefaults, Style}; use crate::documents::BuildXML; use crate::xml_builder::*; use crate::StyleType; pub struct Document {} impl Document { pub fn new() -> Document { Default::default() } } impl Default for Document { fn default() -> Self { Self {} } } impl BuildXML for Document { fn build(&self) -> Vec { let b = XMLBuilder::new(); b.open_document().open_body().close().close().build() } } #[cfg(test)] mod tests { use super::*; #[cfg(test)] use pretty_assertions::assert_eq; use std::str; #[test] fn test_document() { let b = Document::new().build(); assert_eq!( str::from_utf8(&b).unwrap(), r#" "# ); } }