public void GetNextAsLiteralValue()
        {
            // Create Constructor Parameters

            Tokenizer testSubject = new Tokenizer();

            List<NextAsLiteralValueTestParameters> testParameters =
                new List<NextAsLiteralValueTestParameters>();

            // Array Literal

            testParameters.Add(new NextAsLiteralValueTestParameters(
                "foo",
                HsqlProviderType.Array,
                null,
                org.hsqldb.Trace.UNEXPECTED_TOKEN,
                "SQL ARRAY literal tokens are not supposed to be supported"));

            // BigInt Literal

            testParameters.Add(new NextAsLiteralValueTestParameters(
                "-1",
                HsqlProviderType.BigInt,
                null,
                org.hsqldb.Trace.UNEXPECTED_TOKEN,
                "Atomic retrieval of a negative BIGINT literal is not supposed to be supported."));

            testParameters.Add(new NextAsLiteralValueTestParameters(
                "0",
                HsqlProviderType.BigInt,
                new java.lang.Long(0),
                null,
                null));

            testParameters.Add(new NextAsLiteralValueTestParameters(
                "1",
                HsqlProviderType.BigInt,
                new java.lang.Long(1),
                null,
                null));

            testParameters.Add(new NextAsLiteralValueTestParameters(
                long.MaxValue.ToString(),
                HsqlProviderType.BigInt,
                new java.lang.Long(long.MaxValue),
                null,
                null));

            testParameters.Add(new NextAsLiteralValueTestParameters(
                long.MinValue.ToString(),
                HsqlProviderType.BigInt,
                null,
                org.hsqldb.Trace.UNEXPECTED_TOKEN,
                "Atomic retrieval of a negative BIGINT literal is not supposed to be supported."));

            // Binary Literal

            testParameters.Add(new NextAsLiteralValueTestParameters(
                "/* a binary literal value */ 'AFD14E7B9F82' ",
                HsqlProviderType.Binary,
                new org.hsqldb.types.Binary(HsqlStringConverter.hexToByte("AFD14E7B9F82"),false),
                null,
                null));

            foreach (NextAsLiteralValueTestParameters parameters in
                testParameters)
            {
                Console.WriteLine(parameters);

                testSubject.Reset(parameters.Chars);

                try
                {
                    object value = testSubject.GetNextAsLiteralValue(
                        parameters.ProviderType);

                    if (parameters.ErrorMessage != null) {
                        Assert.Fail(parameters.ErrorMessage);
                    }

                    System.Type expectedValueType =
                        HsqlConvert.ToProviderSpecificDataType(
                        parameters.ProviderType);

                    Assert.IsAssignableFrom(expectedValueType,
                        parameters.Value);
                    Assert.IsAssignableFrom(expectedValueType,
                        value);

                    Assert.AreEqual(parameters.Value, value);
                }
                catch(AssertionException)
                {
                    throw;
                }
                catch(HsqlDataSourceException hdse)
                {
                    Assert.AreEqual(parameters.ErrorCode, -hdse.ErrorCode);
                }
            }

            //testSubject.Reset("'AFD14E7B9F82'");

            //object bytes = testSubject.GetNextAsLiteralValue(HsqlProviderType.Binary);

            //Assert.IsInstanceOfType(typeof(org.hsqldb.types.Binary), bytes);

            //testSubject.Reset("'CAFEBABE'");

            //try
            //{
            //    testSubject.GetNextAsLiteralValue(HsqlProviderType.Blob);

            //    Assert.Fail("SQL BLOB literal tokens are not supposed to be supported at this time");
            //}
            //catch (HsqlDataSourceException)
            //{
            //}

            //testSubject.Reset("TRUE");

            //testSubject.GetNextAsLiteralValue(HsqlProviderType.Boolean);

            //testSubject.Reset("FALSE");

            //testSubject.GetNextAsLiteralValue(HsqlProviderType.Boolean);

            //testSubject.Reset("NULL");

            //testSubject.GetNextAsLiteralValue(HsqlProviderType.Boolean);

            ////testSubject.GetNextAsLiteralValue(HsqlProviderType.Char);
            //try
            //{
            //    testSubject.GetNextAsLiteralValue(HsqlProviderType.Clob);

            //    Assert.Fail("SQL CLOB literal tokens are not supposed to be supported at this time");
            //}
            //catch (HsqlDataSourceException)
            //{
            //}
            //try
            //{
            //    testSubject.GetNextAsLiteralValue(HsqlProviderType.DataLink);

            //    Assert.Fail("SQL DATALINK literal tokens are not supposed to be supported at this time");
            //}
            //catch (HsqlDataSourceException)
            //{
            //}
            ////testSubject.GetNextAsLiteralValue(HsqlProviderType.Date);
            ////testSubject.GetNextAsLiteralValue(HsqlProviderType.Decimal);
            //try
            //{
            //    testSubject.GetNextAsLiteralValue(HsqlProviderType.Distinct);

            //    Assert.Fail("SQL DISTINCT literal tokens are not supposed to be supported");
            //}
            //catch (HsqlDataSourceException)
            //{
            //}
            ////testSubject.GetNextAsLiteralValue(HsqlProviderType.Double);
            ////testSubject.GetNextAsLiteralValue(HsqlProviderType.Float);
            ////testSubject.GetNextAsLiteralValue(HsqlProviderType.Integer);
            //try
            //{
            //    testSubject.GetNextAsLiteralValue(HsqlProviderType.JavaObject);

            //    Assert.Fail("SQL JAVA_OBJECT literal tokens are not supposed to be supported at this time");
            //}
            //catch (HsqlDataSourceException)
            //{
            //}
            ////testSubject.GetNextAsLiteralValue(HsqlProviderType.LongVarBinary);
            ////testSubject.GetNextAsLiteralValue(HsqlProviderType.LongVarChar);
            ////testSubject.GetNextAsLiteralValue(HsqlProviderType.Null);
            ////testSubject.GetNextAsLiteralValue(HsqlProviderType.Numeric);
            ////testSubject.GetNextAsLiteralValue(HsqlProviderType.Object);
            ////testSubject.GetNextAsLiteralValue(HsqlProviderType.Real);
            //try
            //{
            //    testSubject.GetNextAsLiteralValue(HsqlProviderType.Ref);

            //    Assert.Fail("SQL REF literal tokens are not supposed to be supported");
            //}
            //catch (HsqlDataSourceException)
            //{
            //}
            ////testSubject.GetNextAsLiteralValue(HsqlProviderType.SmallInt);
            //try
            //{
            //    testSubject.GetNextAsLiteralValue(HsqlProviderType.Struct);

            //    Assert.Fail("SQL STRUCT literal tokens are not supposed to be supported");
            //}
            //catch (HsqlDataSourceException)
            //{
            //}
            ////testSubject.GetNextAsLiteralValue(HsqlProviderType.Time);
            ////testSubject.GetNextAsLiteralValue(HsqlProviderType.TimeStamp);
            ////testSubject.GetNextAsLiteralValue(HsqlProviderType.TinyInt);
            ////testSubject.GetNextAsLiteralValue(HsqlProviderType.VarBinary);
            ////testSubject.GetNextAsLiteralValue(HsqlProviderType.VarChar);
            //try
            //{
            //    testSubject.GetNextAsLiteralValue(HsqlProviderType.Xml);

            //    Assert.Fail("SQL XML literal tokens are not supposed to be supported at this time");
            //}
            //catch (HsqlDataSourceException)
            //{
            //}
        }
            /// <summary>
            /// Parses the given value as an HSQLDB SQL DOUBLE.
            /// </summary>
            /// <remarks>
            /// The legal input formats are those supported by
            /// <c>java.lang.Double.ParseDouble</c>
            /// </remarks>
            /// <param name="value">The value to parse.</param>
            /// <returns>An SQL DOUBLE representation of the given value.</returns>
            /// <exception cref="HsqlDataSourceException">
            /// When a number format exception is encountered.
            /// </exception>
            public static double ParseDouble(string value)
            {
                Tokenizer tokenizer = new Tokenizer(value);

                return ((java.lang.Number)tokenizer.GetNextAsLiteralValue(
                    HsqlProviderType.Double)).doubleValue();
            }