Ejemplo n.º 1
0
        public void TestFiles(string fileName)
        {
            string text = LoadFile(fileName);
            QuotedPrintableDecoder decoder = new QuotedPrintableDecoder(text);

            char[] chars = null;
            Assert.DoesNotThrow(() => chars = decoder.GetChars().ToArray());
            string decodedString = null;

            Assert.DoesNotThrow(() => decodedString = new string(chars));
        }
Ejemplo n.º 2
0
        public void TestStandard(string text, string expectedText)
        {
            QuotedPrintableDecoder decoder = new QuotedPrintableDecoder(text);

            char[] chars = null;
            Assert.DoesNotThrow(() => chars = decoder.GetChars().ToArray());
            Assert.True(chars.Length == expectedText.Length);

            string decodedString = null;

            Assert.DoesNotThrow(() => decodedString = new string(chars));
            Assert.True(string.Equals(decodedString, expectedText));
        }