+-- | Make sure the accessors work and that we can parse one file. Ok,
+-- so the real point of this is to make the unused fields (dtd, xml,
+-- ...) warning go away without having to mangle the groundhog code.
+--
+test_accessors :: TestTree
+test_accessors = testCase "we can access a parsed game_info" $ do
+ xmltree <- unsafe_read_document "test/xml/gameinfo/recapxml.xml"
+ let Right t = parse_xml "recapxml.dtd" xmltree
+ let a1 = dtd t
+ let ex1 = "recapxml.dtd"
+ let a2 = xml_file_id t
+ let ex2 = 21201550
+ let a3 = show $ time_stamp t
+ let ex3 = "2014-05-31 15:13:00 UTC"
+ let a4 = game_id t
+ let ex4 = Just 39978
+ let a5 = schedule_id t
+ let ex5 = Just 39978
+ let a6 = take 9 (xml t)
+ let ex6 = "<message>"
+ let actual = (a1,a2,a3,a4,a5,a6)
+ let expected = (ex1,ex2,ex3,ex4,ex5,ex6)
+ actual @?= expected
+
+