Пример #1
0
        public void TestDefaultEncodingAsString()
        {
            IDocument myDoc = new Document2004();

            myDoc.Encoding("windows-1251");

            Assert.AreEqual(1, TestUtils.RegexCount(myDoc.Content, "encoding=\"windows-1251\""));
        }
Пример #2
0
        public void TestDefaultEncodingIso88591()
        {
            IDocument myDoc = new Document2004();

            myDoc.Encoding(Encoding.ISO8859_1);

            Assert.AreEqual(1, TestUtils.RegexCount(myDoc.Content, "encoding=\"ISO8859-1\""));
        }
Пример #3
0
        public void TestDefaultEncodingUTF()
        {
            IDocument myDoc = new Document2004();

            Assert.AreEqual(1, TestUtils.RegexCount(myDoc.Content, "encoding=\"UTF-8\""));

            IDocument myDoc02 = new Document2004();

            myDoc02.Encoding(Encoding.UTF8);
            Assert.AreEqual(1, TestUtils.RegexCount(myDoc02.Content, "encoding=\"UTF-8\""));
        }