public virtual void TestShouldDetectUTF8EncodingFromBytesWithBOM() { EncodedText encodedText = new EncodedText(TestHelper.HexStringToBytes("ef bb bf " + UNICODE_TEST_STRING_HEX_UTF8)); Assert.AreEqual(EncodedText.TEXT_ENCODING_UTF_8, encodedText.GetTextEncoding()); }
public virtual void TestShouldInferISO8859_1EncodingFromBytesWithNoBOM() { EncodedText encodedText = new EncodedText(TestHelper.HexStringToBytes(TEST_STRING_HEX_ISO8859_1)); Assert.AreEqual(EncodedText.TEXT_ENCODING_ISO_8859_1, encodedText .GetTextEncoding()); }