public virtual void TestParseEncoding_ISO8859_1_encoding()
        {
            Encoding result = RawParseUtils.ParseEncoding(Constants.EncodeASCII("encoding ISO-8859-1\n"
                                                                                ));

            NUnit.Framework.Assert.IsNotNull(result);
        }
        public virtual void TestParseEncoding_Accept_Latin_One_AsISO8859_1()
        {
            Encoding result = RawParseUtils.ParseEncoding(Constants.EncodeASCII("encoding latin-1\n"
                                                                                ));

            NUnit.Framework.Assert.IsNotNull(result);
            NUnit.Framework.Assert.AreEqual("ISO-8859-1", result.Name());
        }
 public virtual void TestParseEncoding_badEncoding()
 {
     try
     {
         RawParseUtils.ParseEncoding(Constants.EncodeASCII("encoding xyz\n"));
         NUnit.Framework.Assert.Fail("should throw an UnsupportedCharsetException: xyz");
     }
     catch (UnsupportedCharsetException e)
     {
         NUnit.Framework.Assert.AreEqual("xyz", e.Message);
     }
 }