public static void QualifierWithMofV2FlavorsAndQuirksDisabledShouldThrow()
            {
                var sourceMof =
                    "[Locale(1033): ToInstance, UUID(\"{BE46D060-7A7C-11d2-BC85-00104B2CF71C}\"): ToInstance]\r\n" +
                    "class Win32_PrivilegesStatus : __ExtendedStatus\r\n" +
                    "{\r\n" +
                    "\t[read: ToSubClass, MappingStrings{\"Win32API|AccessControl|Windows NT Privileges\"}: ToSubClass] string PrivilegesNotHeld[];\r\n" +
                    "\t[read: ToSubClass, MappingStrings{\"Win32API|AccessControl|Windows NT Privileges\"}: ToSubClass] string PrivilegesRequired[];\r\n" +
                    "};";
                var tokens    = Lexing.Lexer.Lex(SourceReader.From(sourceMof));
                var tokensMof = TokenMofGenerator.ConvertToMof(tokens);
                var ex        = Assert.Throws <UnexpectedTokenException>(
                    () =>
                {
                    var astNodes = Parser.Parse(tokens);
                }
                    );

                Assert.AreEqual(
                    "Unexpected token found at Position 13, Line Number 1, Column Number 14.\r\n" +
                    "Token Type: 'ColonToken'\r\n" +
                    "Token Text: ':'",
                    ex.Message
                    );
            }
            public static void EnumerationDeclarationDeprecatedMof300IntegerBaseAndQuirksEnabledShouldThrow()
            {
                // this should throw because "uint32" is recognized as an integer type.
                // as a result, "July" (a string) is not a valid value for an integer enumElement value
                var sourceMof =
                    "enumeration MonthsEnum : uint32\r\n" +
                    "{\r\n" +
                    "\tJuly = \"July\"\r\n" +
                    "};";
                var tokens    = Lexing.Lexer.Lex(SourceReader.From(sourceMof));
                var tokensMof = TokenMofGenerator.ConvertToMof(tokens);
                var ex        = Assert.Throws <UnexpectedTokenException>(
                    () =>
                {
                    var astNodes = Parser.Parse(
                        tokens,
                        ParserQuirks.AllowDeprecatedMof300IntegerTypesAsEnumerationDeclarationsBase
                        );
                }
                    );

                Assert.AreEqual(
                    "Unexpected token found at Position 44, Line Number 3, Column Number 9.\r\n" +
                    "Token Type: 'StringLiteralToken'\r\n" +
                    "Token Text: '\"July\"'",
                    ex.Message
                    );
            }
        //[TestFixture]
        //public static class ConvertToMofMethodTestCasesWmiWinXp
        //{
        //    [Test, TestCaseSource(typeof(ConvertToMofMethodTestCasesWmiWinXp), "GetTestCases")]
        //    public static void ConvertToMofMethodTestsFromDisk(string mofFilename)
        //    {
        //        ConvertToMofTests.MofGeneratorRoundtripTest(mofFilename);
        //    }
        //    public static IEnumerable<TestCaseData> GetTestCases
        //    {
        //        get
        //        {
        //            return TestUtils.GetMofTestCase("Parsing\\WMI\\WinXp");
        //        }
        //    }
        //}

        //[TestFixture]
        //public static class ConvertToMofMethodGolfExamples
        //{
        //    //[Test, TestCaseSource(typeof(ConvertToMofMethodGolfExamples), "GetTestCases")]
        //    public static void ConvertToMofMethodTestsFromDisk(string mofFilename)
        //    {
        //        ConvertToMofTests.MofGeneratorRoundtripTest(mofFilename);
        //    }
        //    public static IEnumerable<TestCaseData> GetTestCases
        //    {
        //        get
        //        {
        //            return TestUtils.GetMofTestCase("Parsing\\DSP0221_3.0.1");
        //        }
        //    }
        //}

        private static void AssertRoundtrip(string sourceMof, ParserQuirks parserQuirks = ParserQuirks.None)
        {
            // check the lexer tokens roundtrips ok
            var tokens    = Lexing.Lexer.Lex(SourceReader.From(sourceMof));
            var tokensMof = TokenMofGenerator.ConvertToMof(tokens);

            Assert.AreEqual(sourceMof, tokensMof);
            // check the parser ast roundtrips ok
            var astNodes = Parser.Parse(tokens, parserQuirks);
            var astMof   = AstMofGenerator.ConvertToMof(astNodes);

            Assert.AreEqual(sourceMof, astMof);
        }
            public static void InvalidClassFeatureShouldThrow()
            {
                var sourceMof =
                    "class Sponsor\r\n" +
                    "{\r\n" +
                    "\t100\r\n" +
                    "};";
                var tokens    = Lexing.Lexer.Lex(SourceReader.From(sourceMof));
                var tokensMof = TokenMofGenerator.ConvertToMof(tokens);
                var ex        = Assert.Throws <UnexpectedTokenException>(
                    () => {
                    var astNodes = Parser.Parse(tokens);
                }
                    );

                Assert.AreEqual(
                    "Unexpected token found at Position 19, Line Number 3, Column Number 2.\r\n" +
                    "Token Type: 'IntegerLiteralToken'\r\n" +
                    "Token Text: '100'",
                    ex.Message
                    );
            }
            public static void EnumValueArrayWithQualifiedEnumValuesAndQuirksDisabledShouldThrow()
            {
                var sourceMof =
                    "instance of GOLF_Date\r\n" +
                    "{\r\n" +
                    "\tMonth = {MonthEnums.July};\r\n" +
                    "};";
                var tokens    = Lexing.Lexer.Lex(SourceReader.From(sourceMof));
                var tokensMof = TokenMofGenerator.ConvertToMof(tokens);
                var ex        = Assert.Throws <UnexpectedTokenException>(
                    () =>
                {
                    var astNodes = Parser.Parse(tokens);
                }
                    );

                Assert.AreEqual(
                    "Unexpected token found at Position 46, Line Number 3, Column Number 21.\r\n" +
                    "Token Type: 'DotOperatorToken'\r\n" +
                    "Token Text: '.'",
                    ex.Message
                    );
            }