Ejemplo n.º 1
0
        public void CheckHtmlStartTagsUntilTitleTest()
        {
            string textGood1 = "<html><head><title>";
            string textGood2 = "  < html> <  head    >       <    title    >  something blb lbaba ";
            string textBad1  = "";
            string textBad2  = "   <html>  <head><bla> something";
            string textBad3  = "   <head><html><title>";
            string textBad4  = "something <html><head><title>";

            Parser.Parser p = new Parser.Parser();

            Assert.AreEqual(true, p.CheckHtmlStartTagsUntilTitle(textGood1));
            Assert.AreEqual(true, p.CheckHtmlStartTagsUntilTitle(textGood2));
            Assert.AreEqual(false, p.CheckHtmlStartTagsUntilTitle(textBad1));
            Assert.AreEqual(false, p.CheckHtmlStartTagsUntilTitle(textBad2));
            Assert.AreEqual(false, p.CheckHtmlStartTagsUntilTitle(textBad3));
            Assert.AreEqual(false, p.CheckHtmlStartTagsUntilTitle(textBad4));
        }