public void ScriptTest()
 {
     HtmlPreserver hp = new HtmlPreserver();
     string working = hp.ScanAndPreserve(SCRIPT);
     working = working.Replace(SCRIPT, SCRIPT + "foo");
     Assert.AreEqual(
         SCRIPT,
         hp.RestorePreserved(working));
 }
 public void Test1()
 {
     HtmlPreserver hp = new HtmlPreserver();
     string scanned = hp.ScanAndPreserve(OBJECT_WITH_EMBED);
     Assert.AreNotEqual(OBJECT_WITH_EMBED, scanned);
     Assert.AreEqual(
         OBJECT_WITH_EMBED,
         hp.RestorePreserved(scanned.Replace(OBJECT_WITH_EMBED, "<object></object>")));
 }
        public void IgnoreSmartContent()
        {
            HtmlPreserver hp = new HtmlPreserver();
            Assert.AreEqual(
                OBJECT_WITH_EMBED_IN_SMART_CONTENT,
                hp.ScanAndPreserve(OBJECT_WITH_EMBED_IN_SMART_CONTENT));

            hp.Reset();
            Assert.AreEqual(
                OBJECT_WITH_EMBED_IN_SMART_CONTENT,
                hp.RestorePreserved(hp.ScanAndPreserve(OBJECT_WITH_EMBED_IN_SMART_CONTENT)));
        }