extern crate test_generator;
use std::fs::read_to_string;
use test_generator::test_resources;
use natural_xml_diff::NaturalXmlDiff;
#[test_resources("natural-xml-diff/testdata/*")]
fn test_verify(resource: &str) {
let working_dir = std::path::Path::new(env!("CARGO_MANIFEST_DIR"))
.parent()
.unwrap();
std::env::set_current_dir(working_dir).unwrap();
let xml_a = read_to_string(format!("{}/a.xml", resource)).unwrap();
let xml_b = read_to_string(format!("{}/b.xml", resource)).unwrap();
let mut nxd = NaturalXmlDiff::new(&xml_a, &xml_b).unwrap();
let result = nxd.verify();
assert!(result.is_ok());
}