|
|
@ -155,4 +155,19 @@ mod tests {
|
|
|
|
let entry = BibliographyEntry::from_hash_map(&map).unwrap();
|
|
|
|
let entry = BibliographyEntry::from_hash_map(&map).unwrap();
|
|
|
|
assert_eq!(entry.bib_type.name(), "tech_report".to_string())
|
|
|
|
assert_eq!(entry.bib_type.name(), "tech_report".to_string())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
|
|
|
fn it_creates_thesis_from_hashmaps() {
|
|
|
|
|
|
|
|
let mut map: HashMap<String, String> = HashMap::new();
|
|
|
|
|
|
|
|
map.insert("key".to_string(), "test_entry".to_string());
|
|
|
|
|
|
|
|
map.insert("type".to_string(), "thesis".to_string());
|
|
|
|
|
|
|
|
map.insert("author".to_string(), "test".to_string());
|
|
|
|
|
|
|
|
map.insert("title".to_string(), "test tech".to_string());
|
|
|
|
|
|
|
|
map.insert("school".to_string(), "test".to_string());
|
|
|
|
|
|
|
|
map.insert("note".to_string(), "This is a test".to_string());
|
|
|
|
|
|
|
|
map.insert("date".to_string(), "02.09.2020".to_string());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let entry = BibliographyEntry::from_hash_map(&map).unwrap();
|
|
|
|
|
|
|
|
assert_eq!(entry.bib_type.name(), "thesis".to_string())
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|