public void AlphaGoGame3IsSuccessfullyParsed()
        {
            var parser     = new SgfParser();
            var collection = SgfTestHelpers.ParseFile(parser, "Valid/AlphaGo3.sgf");

            Assert.IsFalse(parser.HasWarnings);
        }
        public void AlphaGoGame1IsSuccessfullyParsed()
        {
            var parser     = new SgfParser();
            var collection = SgfTestHelpers.ParseFile(parser, "Valid/AlphaGo1.sgf");

            //the file has one non-standard property - MULTIGOGM
            Assert.AreEqual(1, parser.Warnings.Count);
        }
        public void ExampleSgfFileIsSuccessfullyParsed()
        {
            var parser     = new SgfParser();
            var collection = SgfTestHelpers.ParseFile(parser, "Valid/ff4_ex.sgf");

            //check the root game tree count
            Assert.AreEqual(2, collection.Count());

            var firstGameTree = collection.First();

            //check the game info properties
            Assert.AreEqual(1, firstGameTree.Sequence.Count());

            var rootNode = firstGameTree.Sequence.First();

            Assert.AreEqual("Gametree 1: properties", rootNode["GN"].Value <string>());

            var markupTree = firstGameTree.Children.ElementAt(2);

            Assert.AreEqual("Markup", markupTree.Sequence.First()["N"].Value <string>());
        }