Пример #1
0
 public virtual void ShouldReturnNullForIllegalCharsetNames()
 {
     NUnit.Framework.Assert.AreEqual(null, DataUtil.GetCharsetFromContentType("text/html; charset=$HJKDF§$/("));
 }
Пример #2
0
 public virtual void ShouldSelectFirstCharsetOnWeirdMultileCharsetsInMetaTags()
 {
     NUnit.Framework.Assert.AreEqual("ISO-8859-1", DataUtil.GetCharsetFromContentType("text/html; charset=ISO-8859-1, charset=1251"
                                                                                      ));
 }
Пример #3
0
 public virtual void ShouldCorrectCharsetForDuplicateCharsetString()
 {
     NUnit.Framework.Assert.AreEqual("iso-8859-1", DataUtil.GetCharsetFromContentType("text/html; charset=charset=iso-8859-1"
                                                                                      ));
 }
Пример #4
0
 public virtual void ShouldNotThrowExceptionOnEmptyCharset()
 {
     NUnit.Framework.Assert.AreEqual(null, DataUtil.GetCharsetFromContentType("text/html; charset="));
     NUnit.Framework.Assert.AreEqual(null, DataUtil.GetCharsetFromContentType("text/html; charset=;"));
 }