test: add simple test to check icd10 code mapping

This commit is contained in:
Paul-Christian Volkmer 2024-06-07 09:54:46 +02:00
parent ceba8d28b9
commit 2b94618f9f

View File

@ -116,3 +116,15 @@ impl Check {
.to_string() .to_string()
} }
} }
#[cfg(test)]
mod tests {
use crate::common::Check;
#[test]
fn should_map_icd10_code_as_expected() {
assert_eq!(Check::map_icd_code("D39.1"), "C56, D39.1");
assert_eq!(Check::map_icd_code("C00"), "C00-C14");
assert_eq!(Check::map_icd_code("F79.9"), "Other");
}
}