+
+
+-- * Tasty Tests
+xml_tests :: TestTree
+xml_tests =
+ testGroup
+ "XML tests"
+ [ xml_file_id_tests ]
+
+
+xml_file_id_tests :: TestTree
+xml_file_id_tests =
+ testCase "XML_File_ID is parsed correctly" $ do
+ let xmlfids = ["19908216", "19908216", "19908245", "19908246", "19908247"]
+ mapM_ check xmlfids
+ where
+ check :: String -> Assertion
+ check xmlfid = do
+ xml <- readFile ("test/xml/" ++ xmlfid ++ ".xml")
+ let actual = parse_xmlfid xml
+ let expected = readMaybe xmlfid
+ actual @?= expected