private void TestParser(string source, StatementListBuilder <StatementType, ParserTokenType> expected)
        {
            StringTextProvider textProvider = new StringTextProvider(source);
            var actual = XmlStatementParser.ParseStatements(new Position(0, 0, 0), textProvider);

            Assert.True(expected.SequenceEqual(actual, this.statementComparer));
        }
        ////[Fact]
        ////public void TwoTrivialObjects()
        ////{
        ////    this.TestParser(
        ////        "one\ntwo",
        ////        Statement(
        ////            StatementType.Object,
        ////            Token(ParserTokenType.Object, "one")
        ////            .Token(ParserTokenType.Whitespace, "\n")
        ////            )
        ////        .Statement(
        ////            StatementType.Object,
        ////            Token(ParserTokenType.Object, "two")
        ////            )
        ////        );
        ////}

        ////[Fact]
        ////public void TwoObjects()
        ////{
        ////    this.TestParser(
        ////        "one value\ntwo name=value",
        ////        Statement(
        ////            StatementType.Object,
        ////            Token(ParserTokenType.Object, "one")
        ////            .Token(ParserTokenType.Whitespace, " ")
        ////            .Token(ParserTokenType.PropertyValue, "value")
        ////            .Token(ParserTokenType.Whitespace, "\n")
        ////            )
        ////        .Statement(
        ////            StatementType.Object,
        ////            Token(ParserTokenType.Object, "two")
        ////            .Token(ParserTokenType.Whitespace, " ")
        ////            .Token(ParserTokenType.PropertyName, "name")
        ////            .Token(ParserTokenType.Equals, "=")
        ////            .Token(ParserTokenType.PropertyValue, "value")
        ////            )
        ////        );
        ////}

        ////[Fact]
        ////public void TwoObjectsWithIndent()
        ////{
        ////    this.TestParser(
        ////        "one value\n\ttwo name=value",
        ////        Statement(
        ////            StatementType.Object,
        ////            Token(ParserTokenType.Object, "one")
        ////            .Token(ParserTokenType.Whitespace, " ")
        ////            .Token(ParserTokenType.PropertyValue, "value")
        ////            .Token(ParserTokenType.Whitespace, "\n")
        ////            )
        ////        .Statement(
        ////            StatementType.Object,
        ////            Token(ParserTokenType.Whitespace, "\t")
        ////            .Token(ParserTokenType.Object, "two")
        ////            .Token(ParserTokenType.Whitespace, " ")
        ////            .Token(ParserTokenType.PropertyName, "name")
        ////            .Token(ParserTokenType.Equals, "=")
        ////            .Token(ParserTokenType.PropertyValue, "value")
        ////            )
        ////        );
        ////}

        ////[Fact]
        ////public void Continuation()
        ////{
        ////    this.TestParser(
        ////        "folder\n\tname=value",
        ////        Statement(
        ////            StatementType.Object,
        ////            Token(ParserTokenType.Object, "folder")
        ////            .Token(ParserTokenType.Whitespace, "\n")
        ////            .Token(ParserTokenType.Whitespace, "\t")
        ////            .Token(ParserTokenType.PropertyName, "name")
        ////            .Token(ParserTokenType.Equals, "=")
        ////            .Token(ParserTokenType.PropertyValue, "value")
        ////        ));
        ////}

        ////[Fact]
        ////public void UseStatement()
        ////{
        ////    this.TestParser(
        ////        "use appx",
        ////        Statement(
        ////            StatementType.Use,
        ////            Token(ParserTokenType.UseKeyword, "use")
        ////            .Token(ParserTokenType.Whitespace, " ")
        ////            .Token(ParserTokenType.NamespacePrefixDeclaration, "appx")
        ////            )
        ////        );
        ////}

////        [Fact]
////        public void WixlibFileSearchTest()
////        {
////            this.TestParser(
////                @"use msi
////
////msi.fileSearch id=fsC component=c00d5a59-1bd1-4f6b-9b2b-27e0ae64020b
////
////msi.fileSearch id=fsRK registry=HKLM\Search\Registry\Key\",
////                Statement(
////                ////    StatementType.Use,
////                ////    Token(ParserTokenType.UseKeyword, "use")
////                ////    .Token(ParserTokenType.Whitespace, " ")
////                ////    .Token(ParserTokenType.NamespacePrefixDeclaration, "msi")
////                ////    .Token(ParserTokenType.Whitespace, "\r\n")
////                ////    )
////                ////.Statement(
////                    StatementType.Ignorable,
////                    Token(ParserTokenType.Whitespace, "\r\n")
////                    )
////                .Statement(
////                    StatementType.Object,
////                    Token(ParserTokenType.NamespacePrefix, "msi")
////                    .Token(ParserTokenType.Period, ".")
////                    .Token(ParserTokenType.Object, "fileSearch")
////                    .Token(ParserTokenType.Whitespace, " ")
////                    .Token(ParserTokenType.PropertyName, "id")
////                    .Token(ParserTokenType.Equals, "=")
////                    .Token(ParserTokenType.PropertyValue, "fsC")
////                    .Token(ParserTokenType.Whitespace, " ")
////                    .Token(ParserTokenType.PropertyName, "component")
////                    .Token(ParserTokenType.Equals, "=")
////                    .Token(ParserTokenType.PropertyValue, "c00d5a59-1bd1-4f6b-9b2b-27e0ae64020b")
////                    .Token(ParserTokenType.Whitespace, "\r\n")
////                    )
////                .Statement(
////                    StatementType.Ignorable,
////                    Token(ParserTokenType.Whitespace, "\r\n")
////                    )
////                .Statement(
////                    StatementType.Object,
////                    Token(ParserTokenType.NamespacePrefix, "msi")
////                    .Token(ParserTokenType.Period, ".")
////                    .Token(ParserTokenType.Object, "fileSearch")
////                    .Token(ParserTokenType.Whitespace, " ")
////                    .Token(ParserTokenType.PropertyName, "id")
////                    .Token(ParserTokenType.Equals, "=")
////                    .Token(ParserTokenType.PropertyValue, "fsRK")
////                    .Token(ParserTokenType.Whitespace, " ")
////                    .Token(ParserTokenType.PropertyName, "registry")
////                    .Token(ParserTokenType.Equals, "=")
////                    .Token(ParserTokenType.PropertyValue, "HKLM\\Search\\Registry\\Key\\")
////                    )
////                );
////        }


        private static StatementListBuilder <StatementType, ParserTokenType> Statement(StatementType type, TokenListBuilder <ParserTokenType> tokens)
        {
            var builder = new StatementListBuilder <StatementType, ParserTokenType>();

            return(builder.Statement(type, tokens));
        }