add test for stgb
All checks were successful
CI/CD Pipeline / test (push) Successful in 31s

This commit is contained in:
philipp 2024-02-04 16:25:56 +01:00
parent 57905899d7
commit 0407a8bfbd
2 changed files with 9265 additions and 0 deletions

9248
data/stgb/builder.result Normal file

File diff suppressed because it is too large Load Diff

View File

@ -565,6 +565,23 @@ mod tests {
assert_eq!(law, expected); assert_eq!(law, expected);
} }
#[ignore]
#[test]
fn test_stgb_with_live_data() {
let law = LawBuilder::new("StGB");
let path = Path::new("./data/stgb/builder.result");
let mut file = File::open(path).unwrap();
let mut json = String::new();
file.read_to_string(&mut json).unwrap();
let expected: Law = serde_json::from_str(&json).unwrap();
//println!("{}", serde_json::to_string(&law).unwrap());
assert_eq!(law, expected);
}
#[test] #[test]
fn test_builder_full_urhg() { fn test_builder_full_urhg() {
let mut builder = LawBuilder::test("UrhG"); let mut builder = LawBuilder::test("UrhG");