Exemple #1
0
        public void GetBoundary_WorksForSingleBoundary()
        {
            string contents =
                "MIME-Version: 1.0" +
                "Content-Type: multipart/related; boundary=\"----=_NextPart_01D185BB.4485E820\"" +
                "This document is a Single File Web Page, also known as a Web Archive file.  If you are seeing this message, your browser or editor doesn't support Web Archive files.  Please download a browser that supports Web Archive, such as Windows� Internet Explorer�.";

            string result = MhtToHtml.GetBoundary(contents);

            Assert.AreEqual("----=_NextPart_01D185BB.4485E820", result);
        }
Exemple #2
0
        public void ConvertToSingleHtml_DoesNotCrashOnNull()
        {
            MhtToHtml converter = new MhtToHtml();

            try
            {
                converter.ConvertToHTMLDocument(null);
            }
            catch
            {
                Assert.Fail("Null should be handled.");
            }
        }
Exemple #3
0
 public void GetBoundary_FailsIfNoBoundaryIsFound()
 {
     MhtToHtml.GetBoundary(null);
 }