public void AsQualifiedTopicName()
        {
            QualifiedTopicRevision revision = new QualifiedTopicRevision("LocalName", "Namespace", "Version");
            QualifiedTopicName qualifiedName = revision.AsQualifiedTopicName();

            Assert.AreEqual("Namespace.LocalName", qualifiedName.DottedName,
                "Checking that the namespace and local name were set correctly."); 
        }
        public void NewOfSameType()
        {
            QualifiedTopicRevision revision = new QualifiedTopicRevision("Foo.Bar").NewOfSameType("Namespace.LocalName(Version)")
                as QualifiedTopicRevision;

            Assert.AreEqual(typeof(QualifiedTopicRevision), revision.GetType(), 
                "Checking that the newly created type is a QualifiedTopicRevision.");
            Assert.AreEqual("Namespace.LocalName(Version)", revision.DottedNameWithVersion, "Checking that the correct properties were parsed."); 

        }
Exemple #3
0
		protected void DoPage()
		{
			LinkMaker lm = TheLinkMaker;

			string body = Request.Form["body"];
			string ns = Request.Form["defaultNamespace"];
			string tn = Request.Form["topic"];

			QualifiedTopicRevision topicName = new QualifiedTopicRevision(tn, ns);

			Response.Write("<div class='PreviewMain'>");
			Response.Write(Formatter.FormattedString(topicName, body, OutputFormat.HTML, Federation.NamespaceManagerForNamespace(ns), TheLinkMaker));
			Response.Write("</div>");
			Response.Write(@"<div id='TopicTip' class='TopicTip' ></div>");
		}
Exemple #4
0
        protected void DoPage()
        {
            LinkMaker lm = TheLinkMaker;

            string body = Request.Form["body"];
            string ns = Request.Form["defaultNamespace"];
            string tn = Request.Form["topic"];

            QualifiedTopicRevision topicName = new QualifiedTopicRevision(tn, ns);
            string sender = Request.UrlReferrer.LocalPath;
            if (sender.Contains("MessagePost"))
            {
                body = MessagePostFix(body);
            }

            Response.Write("<div class='PreviewMain'>");
            Response.Write(Formatter.FormattedString(topicName, body, OutputFormat.HTML, Federation.NamespaceManagerForNamespace(ns), TheLinkMaker));
            Response.Write("</div>");
            Response.Write(@"<div id='TopicTip' class='TopicTip' ></div>");
        }
        public void CompareTo()
        {
            TopicRevision aa11 = new TopicRevision("A", "A", "1");
            TopicRevision aa12 = new TopicRevision("A", "A", "1");
            TopicRevision aa21 = new TopicRevision("A", "A", "2");
            TopicRevision ab11 = new TopicRevision("A", "B", "1");
            TopicRevision ba11 = new TopicRevision("B", "A", "1");

            Assert.AreEqual(0, aa11.CompareTo(aa11), "Checking that an object compares equal to itself.");
            Assert.AreEqual(0, aa11.CompareTo(aa12), "Checking that an object compares equal to an equivalent object.");
            Assert.AreEqual(-1, aa11.CompareTo(aa21), "Checking that an object with a higher version compares higher.");
            Assert.AreEqual(1, aa21.CompareTo(aa11), "Checking that an object with a lower version compares lower.");
            Assert.AreEqual(-1, aa11.CompareTo(ab11), "Checking that an object with a higher namespace compares higher.");
            Assert.AreEqual(1, ab11.CompareTo(aa11), "Checking that an object with a lower namespace compares lower.");
            Assert.AreEqual(-1, aa11.CompareTo(ba11), "Checking that an object with a higher local name compares higher.");
            Assert.AreEqual(1, ba11.CompareTo(aa11), "Checking that an object with a lower local name compares lower.");
            Assert.AreEqual(1, aa11.CompareTo(null), "Checking that an object compares greater than null.");

            QualifiedTopicRevision qualifiedRevision = new QualifiedTopicRevision("A", "A", "1");
            Assert.AreEqual(0, aa11.CompareTo(qualifiedRevision), "Checking that a QualifiedTopicRevision can compare successfully to a TopicRevision"); 
        }
        public void WomDocFreeLinkToHttpTest()
        {
            string test = @"This is some text.

            This line has a link to ""FlexWiki HomePage"":http://www.flexwiki.com/default.aspx/FlexWiki/HomePage.html

            Here is some more text.
            ";
            QualifiedTopicRevision topic = new QualifiedTopicRevision("NamespaceOne.TestDocument");
            parser.ProcessText(test, topic, manager, true, 600);
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"<Para><paraText>This is some text.</paraText></Para>

            <Para><paraText>This line has a link to </paraText><FreeLinkToHttpLink><FreeLink>FlexWiki HomePage</FreeLink><HttpLink>http://www.flexwiki.com/default.aspx/FlexWiki/HomePage.html</HttpLink></FreeLinkToHttpLink></Para>

            <Para><paraText>Here is some more text.</paraText></Para>"));
        }
        public void WomDocFreeLinkToMailtoTest()
        {
            string test = @"This is some text.

            This line has a mailto to ""JW Davidson"":mailto:[email protected] in it.
            This line has a mailto to ""JW Davidson + Somebodyelse"":mailto:[email protected];[email protected] in it.
            This line has a mailto to ""FlexWiki Development"":mailto:[email protected]?subject=FlexWiki%20Development in it.

            Here is some more text.
            ";
            QualifiedTopicRevision topic = new QualifiedTopicRevision("NamespaceOne.TestDocument");
            WomDocument.ResetUniqueIdentifier();
            parser.ProcessText(test, topic, manager, true, 600);
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"<Para><paraText>This is some text.</paraText></Para>

            <Para><paraText>This line has a mailto to </paraText><FreeLinkToMailto><FreeLinkMail>JW Davidson</FreeLinkMail><Mailto>mailto:[email protected]</Mailto></FreeLinkToMailto><paraText> in it.</paraText></Para>

            <Para><paraText>This line has a mailto to </paraText><FreeLinkToMailto><FreeLinkMail>JW Davidson + Somebodyelse</FreeLinkMail><Mailto>mailto:[email protected];[email protected]</Mailto></FreeLinkToMailto><paraText> in it.</paraText></Para>

            <Para><paraText>This line has a mailto to </paraText><FreeLinkToMailto><FreeLinkMail>FlexWiki Development</FreeLinkMail><Mailto>mailto:[email protected]?subject=FlexWiki%20Development</Mailto></FreeLinkToMailto><paraText> in it.</paraText></Para>

            <Para><paraText>Here is some more text.</paraText></Para>"));
        }
        public void WomDocFirstMultipleHeaderTest()
        {
            string test = @"This is some text.
            !! Header Two text

            Here is some more text.
            !!! Header Three text

            Here is some more text.
            !!!!! Header Five text

            Here is some more text.
            ";
            QualifiedTopicRevision topic = new QualifiedTopicRevision("NamespaceOne.TestDocument");
            parser.ProcessText(test, topic, manager, true, 600);
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"
            <Para><paraText>This is some text.</paraText></Para>
            <Header level=""2"">
            <womHeaderText> Header Two text</womHeaderText><AnchorText>_1__Header_Two_text</AnchorText></Header>
            <Para><paraText>Here is some more text.</paraText></Para>
            <Header level=""3"">
            <womHeaderText> Header Three text</womHeaderText><AnchorText>_2__Header_Three_text</AnchorText></Header>
            <Para><paraText>Here is some more text.</paraText></Para>
            <Header level=""5"">
            <womHeaderText> Header Five text</womHeaderText><AnchorText>_3__Header_Five_text</AnchorText></Header>
            <Para><paraText>Here is some more text.</paraText></Para>"));
        }
        public void WomDocFreeLinkImageDisplayLinksTest()
        {
            string test = @"This is some text.
            ""http://www.flexwiki.com/fwlogo.jpg"":https://www.flexwiki.com

            Here is some more text.
            ""http://io9.com/test.gif"":http://io9.com

            Here is some more text.
            ""http://127.0.0.1/mypic.jpeg"":http://localhost/webpage.html

            Here is some more text.
            ""http://www.example.com:8080/my_graphic.png"":http://www.example.com:8080/

            Here is some more text.
            ""https://www.flexwiki.com/somedir/fwlogo.jpg"":https://www.flexwiki.com

            Here is some more text.
            ""https://io9.com/first/second/third/fourth/fifth/sixth/test.gif"":https://io9.com/first/second/third/fourth/fifth/sixth/test.gif

            Here is some more text.
            ""https://127.0.0.1/mypic.jpeg"":http://localhost/mypic.png

            Here is some more text.
            ""https://www.example.com/mygraphic.png"":http://www.example.com/text.htm

            Here is some more text.
            ";
            QualifiedTopicRevision topic = new QualifiedTopicRevision("NamespaceOne.TestDocument");
            parser.ProcessText(test, topic, manager, true, 600);
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"
            <Para><paraText>This is some text.</paraText></Para>

            <Para><FreeLinkToHttpImageDisplayJpg><HttpImageDisplayJpg>http://www.flexwiki.com/fwlogo.jpg</HttpImageDisplayJpg><WebLink>https://www.flexwiki.com</WebLink></FreeLinkToHttpImageDisplayJpg></Para>

            <Para><paraText>Here is some more text.</paraText></Para>

            <Para><FreeLinkToHttpImageDisplayGif><HttpImageDisplayGif>http://io9.com/test.gif</HttpImageDisplayGif><WebLink>http://io9.com</WebLink></FreeLinkToHttpImageDisplayGif></Para>

            <Para><paraText>Here is some more text.</paraText></Para>

            <Para><FreeLinkToHttpImageDisplayJpeg><HttpImageDisplayJpeg>http://127.0.0.1/mypic.jpeg</HttpImageDisplayJpeg><WebLink>http://localhost/webpage.html</WebLink></FreeLinkToHttpImageDisplayJpeg></Para>

            <Para><paraText>Here is some more text.</paraText></Para>

            <Para><FreeLinkToHttpImageDisplayPng><HttpImageDisplayPng>http://www.example.com:8080/my_graphic.png</HttpImageDisplayPng><WebLink>http://www.example.com:8080/</WebLink></FreeLinkToHttpImageDisplayPng></Para>

            <Para><paraText>Here is some more text.</paraText></Para>

            <Para><FreeLinkToHttpsImageDisplayJpg><HttpsImageDisplayJpg>https://www.flexwiki.com/somedir/fwlogo.jpg</HttpsImageDisplayJpg><WebLink>https://www.flexwiki.com</WebLink></FreeLinkToHttpsImageDisplayJpg></Para>

            <Para><paraText>Here is some more text.</paraText></Para>

            <Para><FreeLinkToHttpsImageDisplayGif><HttpsImageDisplayGif>https://io9.com/first/second/third/fourth/fifth/sixth/test.gif</HttpsImageDisplayGif><WebLink>https://io9.com/first/second/third/fourth/fifth/sixth/test.gif</WebLink></FreeLinkToHttpsImageDisplayGif></Para>

            <Para><paraText>Here is some more text.</paraText></Para>

            <Para><FreeLinkToHttpsImageDisplayJpeg><HttpsImageDisplayJpeg>https://127.0.0.1/mypic.jpeg</HttpsImageDisplayJpeg><WebLink>http://localhost/mypic.png</WebLink></FreeLinkToHttpsImageDisplayJpeg></Para>

            <Para><paraText>Here is some more text.</paraText></Para>

            <Para><FreeLinkToHttpsImageDisplayPng><HttpsImageDisplayPng>https://www.example.com/mygraphic.png</HttpsImageDisplayPng><WebLink>http://www.example.com/text.htm</WebLink></FreeLinkToHttpsImageDisplayPng></Para>

            <Para><paraText>Here is some more text.</paraText></Para>"));
        }
Exemple #10
0
        protected void PerformRename()
        {
            QualifiedTopicRevision oldName = new QualifiedTopicRevision(OldName, Namespace);
            NamespaceManager storeManager = Federation.NamespaceManagerForNamespace(Namespace);

            string defaultNamespace = DefaultNamespace;
            string oldAppearsAs = (oldName.Namespace == defaultNamespace) ? oldName.LocalName : oldName.DottedName;
            string newName = NewName;
            string newAppearsAs = (oldName.Namespace == defaultNamespace) ? newName : Namespace + "." + newName;

            if (storeManager == null)
            {
                Response.Write("<b>No namespace was specified. Please try again.</b>");
                return;
            }

            if (newName == null || newName.Length == 0)
            {
                Response.Write("<b>No name was specified. Please try again.</b>");
                return;
            }

            // See if the new name already exists
            if (storeManager.TopicExists(newName, ImportPolicy.DoNotIncludeImports))
            {
                Response.Write("<b>Topic (" + newName + ") already exists.  Choose another name...</b>");
                return;
            }

            bool fixup = Fixup == "on";
            bool fixupDisabled = false;

            try
            {
                fixupDisabled = bool.Parse(System.Configuration.ConfigurationManager.AppSettings["DisableRenameFixup"]);
            }
            catch
            {
            }

            if (fixupDisabled)
            {
                fixup = false;
            }

            ReferenceFixupPolicy fixupPolicy = ReferenceFixupPolicy.DoNotFixReferences;

            if (fixup)
            {
                fixupPolicy = ReferenceFixupPolicy.FixReferences; 
            }

            RenameTopicDetails results = storeManager.RenameTopic(new UnqualifiedTopicName(oldName.LocalName), new UnqualifiedTopicName(newName), 
                fixupPolicy, VisitorIdentityString);

            Response.Write("Renamed <i>" + oldAppearsAs + "</i> to <i>" + newName + "</i><br/>");
            Response.Write("<br/>");
            foreach (TopicName topic in results.UpdatedReferenceTopics)
            {
                Response.Write(String.Format("Topic {0} had its references updated. <br>", topic.DottedName));
            }
            bool redir = LeaveRedirect == "on";
            if (redir)
            {
                DateTime ts = DateTime.Now.ToLocalTime();
                storeManager.WriteTopicAndNewVersion(oldName.LocalName,
                    "Redirect: " + newName + @"

This page was automatically generated when this topic (" + oldName.LocalName + ") was renamed to " + newName + " on " +
                    ts.ToShortDateString() + " at " + ts.ToShortTimeString() + " by " + VisitorIdentityString + "." +
                    "\nPlease update references to point to the new topic.", 
                    VisitorIdentityString);
            }

        }
        public void WomDocWikiStylingTest()
        {
            string test = @"This is some text.

            Some text %red% some text in red

            Some text %blue% some text in blue%% now it is normal
            Some text %big blue% some text in blue%% now it is normal
            Some text %blue small% some text in blue%% now it is normal
            Some text %big blue big% some text in blue%% now it is normal
            Some %blue% blue text%% with some %red% red text.
            Here is some more text.
            ";
            QualifiedTopicRevision topic = new QualifiedTopicRevision("NamespaceOne.TestDocument");
            WomDocument.ResetUniqueIdentifier();
            parser.ProcessText(test, topic, manager, true, 600);
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"<Para><paraText>This is some text.</paraText></Para>

            <Para><paraText>Some text </paraText><WikiStyling><StyleColor>red</StyleColor><womWikiStyledText> some text in red</womWikiStyledText></WikiStyling></Para>

            <Para><paraText>Some text </paraText><WikiStyling><StyleColor>blue</StyleColor><womWikiStyledText> some text in blue</womWikiStyledText></WikiStyling><paraText> now it is normal</paraText></Para>

            <Para><paraText>Some text </paraText><WikiStyling><StyleSizeBig/><StyleColor>blue</StyleColor><womWikiStyledText> some text in blue</womWikiStyledText></WikiStyling><paraText> now it is normal</paraText></Para>

            <Para><paraText>Some text </paraText><WikiStyling><StyleColor>blue</StyleColor><StyleSizeSmall/><womWikiStyledText> some text in blue</womWikiStyledText></WikiStyling><paraText> now it is normal</paraText></Para>

            <Para><paraText>Some text </paraText><WikiStyling><StyleSizeBig/><StyleColor>blue</StyleColor><StyleSizeBig/><womWikiStyledText> some text in blue</womWikiStyledText></WikiStyling><paraText> now it is normal</paraText></Para>

            <Para><paraText>Some </paraText><WikiStyling><StyleColor>blue</StyleColor><womWikiStyledText> blue text</womWikiStyledText></WikiStyling><paraText> with some </paraText><WikiStyling><StyleColor>red</StyleColor><womWikiStyledText> red text.</womWikiStyledText></WikiStyling></Para>

            <Para><paraText>Here is some more text.</paraText></Para>"));
        }
        public void WomDocComplexUnorderedListTest()
        {
            string test = @"This is some text.

            * List item 1
            * List item 2
                * List 2 item 1
                * List 2 item 2
                        * List 3 item 1
                * List 2 item 3
                * List 2 item 4
            * List item 3
                * New List 2 item 1
            This is some other text after the list.
            \r\n";
            test = test.Replace("        ", "\t");
            QualifiedTopicRevision topic = new QualifiedTopicRevision("NamespaceOne.TestDocument");
            parser.ProcessText(test, topic, manager, true, 600);
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"
            <Para><paraText>This is some text.</paraText></Para>
            <list type=""unordered""><item>
            <womListText> List item 1</womListText></item>
            <item>
            <womListText> List item 2</womListText><list type=""unordered""><item>
            <womListText> List 2 item 1</womListText></item>
            <item>
            <womListText> List 2 item 2</womListText><list type=""unordered""><item>
            <womListText> List 3 item 1</womListText></item>
            </list></item>
            <item>
            <womListText> List 2 item 3</womListText></item>
            <item>
            <womListText> List 2 item 4</womListText></item>
            </list></item>
            <item>
            <womListText> List item 3</womListText><list type=""unordered""><item>
            <womListText> New List 2 item 1</womListText></item></list>
            </item></list>

            <Para><paraText>This is some other text after the list.</paraText></Para>

            <Para><paraText>\r\n</paraText></Para>"));
        }
        public void WomDocFreeLinkToNamespaceMalformedTopicBadNamespaceTest()
        {
            string test = @"This is some text.

            This line has an freelink to ""My FreeLink"":FlexWiki.[goodtopic] in it.

            Here is some more text.
            ";
            QualifiedTopicRevision topic = new QualifiedTopicRevision("NamespaceOne.TestDocument");
            WomDocument.ResetUniqueIdentifier();
            parser.ProcessText(test, topic, manager, true, 600);
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"<Para><paraText>This is some text.</paraText></Para>

            <Para><paraText>This line has an freelink to </paraText><paraText>""My FreeLink"":FlexWiki.[goodtopic]</paraText><paraText> in it.</paraText></Para>

            <Para><paraText>Here is some more text.</paraText></Para>"));
        }
        public void WomDocBadTopicLinksTest()
        {
            string test = @"This is some text.

            This line contains a link to a BadTopic in it

            Here is some more text with a link MULTIcapsBadTopic in the line

            Here is some more text.
            ";
            QualifiedTopicRevision topic = new QualifiedTopicRevision("NamespaceOne.TestDocument");
            parser.ProcessText(test, topic, manager, true, 600);
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"
            <Para><paraText>This is some text.</paraText></Para>

            <Para><paraText>This line contains a link to a </paraText><CreateNewTopic><StartsWithOneCap>BadTopic</StartsWithOneCap><Namespace>NamespaceOne</Namespace></CreateNewTopic><paraText> in it</paraText></Para>

            <Para><paraText>Here is some more text with a link </paraText><CreateNewTopic><StartsWithMulticaps>MULTIcapsBadTopic</StartsWithMulticaps><Namespace>NamespaceOne</Namespace></CreateNewTopic><paraText> in the line</paraText></Para>

            <Para><paraText>Here is some more text.</paraText></Para>"));
        }
        public void WomDocComplexEmoticonsTest()
        {
            string test = @"This is some text.

            || (y)|| (n)|| (b)|| (d)|| (x)|| (z)|| (6)|| :-[|| (})|| ({)|| :-)|| ;)|| :(||
            || """"(y)""""|| """"(n)""""|| """"(b)""""|| """"(d)""""|| """"(x)""""|| """"(z)""""|| """"(6)""""|| """":-[""""|| """"(})""""|| """"({)""""|| """":-)""""|| """";)""""|| """":(""""||
            ||    ||    ||    ||    ||    ||    ||    ||    ||    ||    ||    ||   ||   ||
            || :| || :'(|| :-$|| (H)|| :-@|| (A)|| (L)|| (U)|| (k)|| (g)|| (f)|| (w)|| (p)||
            || """":|"""" || """":'(""""|| """":-$""""|| """"(H)""""|| """":-@""""|| """"(A)""""|| """"(L)""""|| """"(U)""""|| """"(k)""""|| """"(g)""""|| """"(f)""""|| """"(w)""""|| """"(p)""""||
            ||    ||    ||    ||    ||    ||    ||    ||    ||    ||    ||    ||   ||   ||
            || (~)|| (T)|| (t)|| (@)|| (c)|| (i)|| (S)|| (*)|| (8)|| (E)|| (^)|| (O)|| (M)||
            || """"(~)""""|| """"(T)""""|| """"(t)""""|| """"(@)""""|| """"(c)""""|| """"(i)""""|| """"(S)""""|| """"(*)"""" || """"(8)""""|| """"(E)""""|| """"(^)""""|| """"(O)""""|| """"(M)""""||
            ||    ||    ||    ||    ||    ||    ||    ||    ||    ||    ||    ||   ||   ||
            || :-P || (o) || :-D   ||    ||    ||    ||    ||    ||    ||    ||    ||   ||   ||
            || """":-P"""" || """"(o)""""   ||  """":-D""""  ||    ||    ||    ||    ||    ||    ||    ||    ||   ||   ||

            I need a little flag (red maybe :-))

            :)
            :D
            :-D
            :/
            :-/
            :\
            :-\
            :p
            :-p
            :P
            :-P

            (`) (1) (2) (3) (4) (5) (6) (7) (8) (9) (0) (-) (=)
            (q) (w) (e) (r) (t) (y) (u) (i) (o) (p) ([) (]) (\)
            (a) (s) (d) (f) (g) (h) (j) (k) (l) (;) (')
            (z) (x) (c) (v) (b) (n) (m) (,) (.) (/)

            () () () () () () () () () () () () ()

            (~) (!) (@) ($) (%) (^) (&) (*) (() ()) (_) (+)
            (Q) (W) (E) (R) (T) (Y) (U) (I) (O) (P) ({) (}) (|)
            (A) (S) (D) (F) (G) (H) (J) (K) (L) (:) ("")
            (Z) (X) (C) (V) (B) (N) (M) (<) (>) (?)

            Here is some more text.
            ";
            QualifiedTopicRevision topic = new QualifiedTopicRevision("NamespaceOne.TestDocument");
            WomDocument.ResetUniqueIdentifier();
            parser.ProcessText(test, topic, manager, true, 600);
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"<Para><paraText>This is some text.</paraText></Para>
            <Table><TableRow><womCellText>
            <womCell> <Emoticon>emoticons/y.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/n.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/beer_yum.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/martini_shaken.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/girl_handsacrossamerica.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/guy_handsacrossamerica.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/devil_smile.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/bat.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/girl_hug.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/dude_hug.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/regular_smile.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/wink_smile.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/sad_smile.gif</Emoticon></womCell></womCellText></TableRow>
            <TableRow><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(y)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(n)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(b)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(d)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(x)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(z)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(6)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>:-[</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(})</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>({)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>:-)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>;)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>:(</EscapedNoFormatText></womCellText></TableRow>
            <TableRow><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>   </womCell></womCellText><womCellText>
            <womCell>   </womCell></womCellText></TableRow>
            <TableRow><womCellText>
            <womCell> <Emoticon>emoticons/whatchutalkingabout_smile.gif</Emoticon> </womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/cry_smile.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> :-$</womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/shades_smile.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/angry_smile.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/angel_smile.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/heart.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/broken_heart.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/kiss.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/present.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/rose.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/wilted_rose.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/camera.gif</Emoticon></womCell></womCellText></TableRow>
            <TableRow><womCellText>
            <womCell> </womCell><EscapedNoFormatText>:|</EscapedNoFormatText><womCell> </womCell></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>:'(</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>:-$</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(H)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>:-@</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(A)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(L)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(U)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(k)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(g)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(f)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(w)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(p)</EscapedNoFormatText></womCellText></TableRow>
            <TableRow><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>   </womCell></womCellText><womCellText>
            <womCell>   </womCell></womCellText></TableRow>
            <TableRow><womCellText>
            <womCell> <Emoticon>emoticons/film.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/phone.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/phone.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/kittykay.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/coffee.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/lightbulb.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/moon.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/star.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/musical_note.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/envelope.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/cake.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/clock.gif</Emoticon></womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/messenger.gif</Emoticon></womCell></womCellText></TableRow>
            <TableRow><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(~)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(T)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(t)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(@)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(c)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(i)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(S)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(*)</EscapedNoFormatText><womCell> </womCell></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(8)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(E)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(^)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(O)</EscapedNoFormatText></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(M)</EscapedNoFormatText></womCellText></TableRow>
            <TableRow><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>   </womCell></womCellText><womCellText>
            <womCell>   </womCell></womCellText></TableRow>
            <TableRow><womCellText>
            <womCell> <Emoticon>emoticons/tounge_smile.gif</Emoticon> </womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/clock.gif</Emoticon> </womCell></womCellText><womCellText>
            <womCell> <Emoticon>emoticons/teeth_smile.gif</Emoticon>   </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>   </womCell></womCellText><womCellText>
            <womCell>   </womCell></womCellText></TableRow>
            <TableRow><womCellText>
            <womCell> </womCell><EscapedNoFormatText>:-P</EscapedNoFormatText><womCell> </womCell></womCellText><womCellText>
            <womCell> </womCell><EscapedNoFormatText>(o)</EscapedNoFormatText><womCell>   </womCell></womCellText><womCellText>
            <womCell>  </womCell><EscapedNoFormatText>:-D</EscapedNoFormatText><womCell>  </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>    </womCell></womCellText><womCellText>
            <womCell>   </womCell></womCellText><womCellText>
            <womCell>   </womCell></womCellText></TableRow>
            </Table>

            <Para><paraText>I need a little flag (red maybe <Emoticon>emoticons/regular_smile.gif</Emoticon>)</paraText></Para>

            <Para><paraText><Emoticon>emoticons/regular_smile.gif</Emoticon></paraText></Para>

            <Para><paraText>:D</paraText></Para>

            <Para><paraText><Emoticon>emoticons/teeth_smile.gif</Emoticon></paraText></Para>

            <Para><paraText>:/</paraText></Para>

            <Para><paraText>:-/</paraText></Para>

            <Para><paraText>:\</paraText></Para>

            <Para><paraText>:-\</paraText></Para>

            <Para><paraText>:p</paraText></Para>

            <Para><paraText>:-p</paraText></Para>

            <Para><paraText>:P</paraText></Para>

            <Para><paraText><Emoticon>emoticons/tounge_smile.gif</Emoticon></paraText></Para>

            <Para><paraText>(`) (1) (2) (3) (4) (5) <Emoticon>emoticons/devil_smile.gif</Emoticon> (7) <Emoticon>emoticons/musical_note.gif</Emoticon> (9) (0) (-) (=)</paraText></Para>

            <Para><paraText>(q) <Emoticon>emoticons/wilted_rose.gif</Emoticon> <Emoticon>emoticons/envelope.gif</Emoticon> (r) <Emoticon>emoticons/phone.gif</Emoticon> <Emoticon>emoticons/y.gif</Emoticon> <Emoticon>emoticons/broken_heart.gif</Emoticon> <Emoticon>emoticons/lightbulb.gif</Emoticon> <Emoticon>emoticons/clock.gif</Emoticon> <Emoticon>emoticons/camera.gif</Emoticon> ([) (]) (\)</paraText></Para>

            <Para><paraText><Emoticon>emoticons/angel_smile.gif</Emoticon> (s) <Emoticon>emoticons/martini_shaken.gif</Emoticon> <Emoticon>emoticons/rose.gif</Emoticon> <Emoticon>emoticons/present.gif</Emoticon> <Emoticon>emoticons/shades_smile.gif</Emoticon> (j) <Emoticon>emoticons/kiss.gif</Emoticon> <Emoticon>emoticons/heart.gif</Emoticon> (<Emoticon>emoticons/wink_smile.gif</Emoticon> (')</paraText></Para>

            <Para><paraText><Emoticon>emoticons/guy_handsacrossamerica.gif</Emoticon> <Emoticon>emoticons/girl_handsacrossamerica.gif</Emoticon> <Emoticon>emoticons/coffee.gif</Emoticon> (v) <Emoticon>emoticons/beer_yum.gif</Emoticon> <Emoticon>emoticons/n.gif</Emoticon> <Emoticon>emoticons/messenger.gif</Emoticon> (,) (.) (/)</paraText></Para>

            <PreformattedSingleLine> </PreformattedSingleLine>

            <Para><paraText>() () () () () () () () () () () () () </paraText></Para>

            <Para><paraText><Emoticon>emoticons/film.gif</Emoticon> (!) <Emoticon>emoticons/kittykay.gif</Emoticon> ($) (%) <Emoticon>emoticons/cake.gif</Emoticon> (&) <Emoticon>emoticons/star.gif</Emoticon> (() ()) (_) (+)</paraText></Para>

            <Para><paraText>(Q) <Emoticon>emoticons/wilted_rose.gif</Emoticon> <Emoticon>emoticons/envelope.gif</Emoticon> (R) <Emoticon>emoticons/phone.gif</Emoticon> <Emoticon>emoticons/thumbs_up.gif</Emoticon> <Emoticon>emoticons/broken_heart.gif</Emoticon> <Emoticon>emoticons/lightbulb.gif</Emoticon> <Emoticon>emoticons/clock.gif</Emoticon> <Emoticon>emoticons/camera.gif</Emoticon> <Emoticon>emoticons/dude_hug.gif</Emoticon> <Emoticon>emoticons/girl_hug.gif</Emoticon> (|)</paraText></Para>

            <Para><paraText><Emoticon>emoticons/angel_smile.gif</Emoticon> <Emoticon>emoticons/moon.gif</Emoticon> <Emoticon>emoticons/martini_shaken.gif</Emoticon> <Emoticon>emoticons/rose.gif</Emoticon> <Emoticon>emoticons/present.gif</Emoticon> <Emoticon>emoticons/shades_smile.gif</Emoticon> (J) <Emoticon>emoticons/kiss.gif</Emoticon> <Emoticon>emoticons/heart.gif</Emoticon> (<Emoticon>emoticons/regular_smile.gif</Emoticon> ("")</paraText></Para>

            <Para><paraText><Emoticon>emoticons/guy_handsacrossamerica.gif</Emoticon> <Emoticon>emoticons/girl_handsacrossamerica.gif</Emoticon> <Emoticon>emoticons/coffee.gif</Emoticon> (V) <Emoticon>emoticons/beer_yum.gif</Emoticon> <Emoticon>emoticons/thumbs_down.gif</Emoticon> <Emoticon>emoticons/messenger.gif</Emoticon> (<) (>) (?)</paraText></Para>

            <Para><paraText>Here is some more text.</paraText></Para>"));
        }
        public void WomDocWikiTalkStringTest()
        {
            string test = @"This is some text.

            @@[
            ""||{!}*Topic*||{!}*Date of Last Change*||{!}*Summary*||"", Newline,
            namespace.Topics.Select{ each |
            each.HasProperty(""Owner"")
            }.SortBy { each |
            DateTime.Now.SpanBetween(each.LastModified)
            }.Collect{ each |
            [
                ""        * "", each.Name,
                "" %gray%("", each.LastModified.ToShortDateString(), "" "", each.LastModified.ToLongTimeString(),
                "")"", Newline,
                ""                * "",each.Summary,Newline,
            ]
            }
            ]
            @@
            Here is some more text.
            ";
            QualifiedTopicRevision topic = new QualifiedTopicRevision("NamespaceOne.TestDocument");
            WomDocument.ResetUniqueIdentifier();
            parser.ProcessText(test, topic, manager, true, 600);
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"<Para><paraText>This is some text.</paraText></Para>
            <WikiTalkString>@@[
            ""||{!}*Topic*||{!}*Date of Last Change*||{!}*Summary*||"", Newline,
            namespace.Topics.Select{ each |
            each.HasProperty(""Owner"")
            }.SortBy { each |
            DateTime.Now.SpanBetween(each.LastModified)
            }.Collect{ each |
            [
                ""        * "", each.Name,
                "" %gray%("", each.LastModified.ToShortDateString(), "" "", each.LastModified.ToLongTimeString(),
                "")"", Newline,
                ""                * "",each.Summary,Newline,
            ]
            }
            ]
            @@</WikiTalkString>
            <Para><paraText>Here is some more text.</paraText></Para>"));
        }
        public void WomDocWikiTalkMethodTopicExistsTest()
        {
            string test = @"This is some text.

            HomePage:{ selected |
            selected.IfNull{ ShowNamespaceSelectHelper(namespace.Name) }
            Else{ ShowNamespaceSelectHelper(selected) }
            }
            Here is some more text.
            ";
            WomDocument.ResetUniqueIdentifier();
            QualifiedTopicRevision topic = new QualifiedTopicRevision("NamespaceOne.TestDocument");
            parser.ProcessText(test, topic, manager, true, 600);
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"
            <Para><paraText>This is some text.</paraText></Para>

            <WikiTalkMethod><Name>HomePage</Name><TopicExists><Namespace>NamespaceOne</Namespace><Topic>HomePage</Topic><TipId>id1</TipId><TipData><TipIdData>id1</TipIdData><TipText></TipText><TipStat>1/1/0001 12:00:00 AM</TipStat></TipData></TopicExists><wikiTalkMultiline>{ selected |
            selected.IfNull{ ShowNamespaceSelectHelper(namespace.Name) }
            Else{ ShowNamespaceSelectHelper(selected) }
            }</wikiTalkMultiline></WikiTalkMethod>
            <Para><paraText>Here is some more text.</paraText></Para>"));
        }
        public void WomDocWikiTalkMethodCreateTopicTest()
        {
            string test = @"This is some text.

            TopicForMethodCreate:{ selected |
            selected.IfNull{ ShowNamespaceSelectHelper(namespace.Name) }
            Else{ ShowNamespaceSelectHelper(selected) }
            }
            Here is some more text.
            ";
            QualifiedTopicRevision topic = new QualifiedTopicRevision("NamespaceOne.TestDocument");
            parser.ProcessText(test, topic, manager, true, 600);
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"
            <Para><paraText>This is some text.</paraText></Para>

            <WikiTalkMethod><Name>TopicForMethodCreate</Name><CreateNewTopic><WikiTalkMethod>TopicForMethodCreate</WikiTalkMethod><Namespace>NamespaceOne</Namespace></CreateNewTopic><wikiTalkMultiline>{ selected |
            selected.IfNull{ ShowNamespaceSelectHelper(namespace.Name) }
            Else{ ShowNamespaceSelectHelper(selected) }
            }</wikiTalkMultiline></WikiTalkMethod>
            <Para><paraText>Here is some more text.</paraText></Para>"));
        }
        public void WomDocFreeLinkToMULTIcapsTopicCreateTest()
        {
            string test = @"This is some text.

            This line has a link to ""FlexWiki CreateTopic"":MULTIcapsBadTopic

            Here is some more text.
            ";
            WomDocument.ResetUniqueIdentifier();
            QualifiedTopicRevision topic = new QualifiedTopicRevision("NamespaceOne.TestDocument");
            parser.ProcessText(test, topic, manager, true, 600);
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"<Para><paraText>This is some text.</paraText></Para>

            <Para><paraText>This line has a link to </paraText><CreateNewTopic><Topic>MULTIcapsBadTopic</Topic><Namespace>NamespaceOne</Namespace><DisplayText>FlexWiki CreateTopic</DisplayText></CreateNewTopic></Para>

            <Para><paraText>Here is some more text.</paraText></Para>"));
        }
 protected string FormattedTestText(string inputString, QualifiedTopicRevision top)
 {
     WikiOutput output = WikiOutput.ForFormat(OutputFormat.Testing, null);
     Formatter.Format(top, inputString, output, _namespaceManager, _lm, _externals, 0);
     string o = output.ToString();
     string o1 = o.Replace("\r", "");
     return o1;
 }
        public void WomDocFreeLinkToMULTIcapsTopicExistsTest()
        {
            string test = @"This is some text.

            This line has a link to ""FlexWiki TopicExists"":MULTIcapsGoodTopic

            Here is some more text.
            ";
            WomDocument.ResetUniqueIdentifier();
            QualifiedTopicRevision topic = new QualifiedTopicRevision("NamespaceOne.TestDocument");
            parser.ProcessText(test, topic, manager, true, 600);
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"<Para><paraText>This is some text.</paraText></Para>

            <Para><paraText>This line has a link to </paraText><TopicExists><Namespace>NamespaceOne</Namespace><Topic>MULTIcapsGoodTopic</Topic><TipId>id1</TipId><DisplayText>FlexWiki TopicExists</DisplayText><TipData><TipIdData>id1</TipIdData><TipText></TipText><TipStat>1/1/0001 12:00:00 AM</TipStat></TipData></TopicExists></Para>

            <Para><paraText>Here is some more text.</paraText></Para>"));
        }
 protected void FormattedTopicContainsTest(QualifiedTopicRevision top, string find)
 {
     FormatTestContains(FormattedTopic(top), find);
 }
        public void WomDocFreeLinkToNamespaceMalformedTopicCreateTopicTest()
        {
            string test = @"This is some text.

            This line has an freelink to ""My FreeLink"":NamespaceOne.[badtopic] in it.

            Here is some more text.
            ";
            QualifiedTopicRevision topic = new QualifiedTopicRevision("NamespaceOne.TestDocument");
            WomDocument.ResetUniqueIdentifier();
            parser.ProcessText(test, topic, manager, true, 600);
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"<Para><paraText>This is some text.</paraText></Para>
            <EmptyLine />

            <Para><paraText>This line has an freelink to </paraText><CreateNewTopic><Topic>badtopic</Topic><Namespace>OdsWiki</Namespace><DisplayText>My FreeLink</DisplayText></CreateNewTopic><paraText> in it.</paraText></Para>
            <EmptyLine />

            <Para><paraText>Here is some more text.</paraText></Para>
            "));
        }
        public void WomDocTextileInLineTest()
        {
            string test = @"This is some text.

            This line (1) contains ''italic text'' and a '''strong text''' in it
            This line (2) contains ''italic text with embedded *strong text* and some ^superscript^ in'' it
            This line (3) has *strong text* by itself
            This line (4) has ^superscript text with *strong text* embedded^ in it
            This line (5) contains a ??citation text?? in it
            This line ( 6 ) has a section of -deleted terxt- and a section of +inserted text+ in it
            This line (7) has _emphasized text_ in it
            While this ( 8 ) line has a mix of ^superscript^ and ~subscript~ in it
            This (9) is a @section of code@ in the text

            Here is some more text.
            ";
            QualifiedTopicRevision topic = new QualifiedTopicRevision("NamespaceOne.TestDocument");
            parser.ProcessText(test, topic, manager, true, 600);
            //TODO: Break this into individual tests after fixing formats by adding end pattern and jump references:
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"
            <Para><paraText>This line (1) contains </paraText><Italics>italic text</Italics><paraText> and a </paraText><Strong>strong text</Strong><paraText> in it</paraText></Para>"));
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"
            <Para><paraText>This line (2) contains </paraText><Italics>italic text with embedded <Strong>strong text</Strong> and some <TextileSuperscriptInLine>superscript</TextileSuperscriptInLine> in</Italics><paraText> it</paraText></Para>"));
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"
            <Para><paraText>This line (3) has </paraText><TextileStrong><womStrongText>strong text</womStrongText></TextileStrong><paraText> by itself</paraText></Para>"));

            // The remaining *strong* part will be picked up by an additional processor at the end of the WomDocument, just before Emoticon processing
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"
            <Para><paraText>This line (4) has</paraText><TextileSuperscriptInLine>superscript text with <Strong>strong text</Strong> embedded</TextileSuperscriptInLine><paraText> in it</paraText></Para>"));
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"
            <Para><paraText>This line (5) contains a</paraText><TextileCitationInLine>citation text</TextileCitationInLine><paraText> in it</paraText></Para>"));
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"
            <Para><paraText>This line ( 6 ) has a section of</paraText><TextileDeletionInLine>deleted terxt</TextileDeletionInLine><paraText> and a section of</paraText><TextileInsertedInLine>inserted text</TextileInsertedInLine><paraText> in it</paraText></Para>"));
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"
            <Para><paraText>This line (7) has</paraText><TextileEmphasisInLine>emphasized text</TextileEmphasisInLine><paraText> in it</paraText></Para>"));
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"
            <Para><paraText>While this ( 8 ) line has a mix of</paraText><TextileSuperscriptInLine>superscript</TextileSuperscriptInLine><paraText> and</paraText><TextileSubscriptInLine>subscript</TextileSubscriptInLine><paraText> in it</paraText></Para>"));
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"
            <Para><paraText>This (9) is a</paraText><TextileCodeLineInLine>section of code</TextileCodeLineInLine><paraText> in the text</paraText></Para>"));
        }
        public void WomDocEscapedNoFormatTextTest()
        {
            string test = @"This is some text.

            This line has a """"NoFormatText"""" in it.

            Here is some more text.
            ";
            WomDocument.ResetUniqueIdentifier();
            QualifiedTopicRevision topic = new QualifiedTopicRevision("NamespaceOne.TestDocument");
            parser.ProcessText(test, topic, manager, true, 600);
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"<Para><paraText>This is some text.</paraText></Para>

            <Para><paraText>This line has a </paraText><EscapedNoFormatText>NoFormatText</EscapedNoFormatText><paraText> in it.</paraText></Para>

            <Para><paraText>Here is some more text.</paraText></Para>"));
        }
        public void WomDocTextileStartLineTest()
        {
            string test = @"This is some text.

            *strong text* by itself on line (1)
            ^superscript text with *strong text* embedded^ in it on line (2)
            ??citation text?? on line (3)
            -deleted terxt- at the start of line (4)
            +inserted text+ in line (5)
            _emphasized text_ in line ( 6 )
            ~subscript~ in line (7)
            @section of code@ in the text of line ( 8 )

            Here is some more text.
            ";
            QualifiedTopicRevision topic = new QualifiedTopicRevision("NamespaceOne.TestDocument");
            parser.ProcessText(test, topic, manager, true, 600);
            //TODO: Break this into individual tests after fixing formats by adding end pattern and jump references:
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"<Para><TextileStrong><womStrongText>strong text</womStrongText></TextileStrong><paraText> by itself on line (1)</paraText></Para>"));
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"<Para><TextileSuperscriptLineStart>superscript text with <Strong>strong text</Strong> embedded</TextileSuperscriptLineStart><paraText> in it on line (2)</paraText></Para>"));
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"<Para><TextileCitationLineStart>citation text</TextileCitationLineStart><paraText> on line (3)</paraText></Para>"));
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"<Para><TextileDeletionLineStart>deleted terxt</TextileDeletionLineStart><paraText> at the start of line (4)</paraText></Para>"));
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"<Para><TextileInsertedLineStart>inserted text</TextileInsertedLineStart><paraText> in line (5)</paraText></Para>"));
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"<Para><TextileEmphasisLineStart>emphasized text</TextileEmphasisLineStart><paraText> in line ( 6 )</paraText></Para>"));
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"<Para><TextileSubscriptLineStart>subscript</TextileSubscriptLineStart><paraText> in line (7)</paraText></Para>"));
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"<Para><TextileCodeLineStart>@section of code@</TextileCodeLineStart><paraText> in the text of line ( 8 )</paraText></Para>"));
        }
 protected string FormattedTopic(QualifiedTopicRevision top)
 {
     return FormattedTestText(Federation.NamespaceManagerForTopic(top).Read(top.LocalName), top);
 }
        public void WomDocExtendedCodeTest()
        {
            string test = @"This is some text.

            {+
               %blue%public void%% Foo()
               {
               %green%// comment here%%
               %blue%string%% s;
               *...*
               }
            }+

            Here is some more text.
            ";
            QualifiedTopicRevision topic = new QualifiedTopicRevision("NamespaceOne.TestDocument");
            WomDocument.ResetUniqueIdentifier();
            parser.ProcessText(test, topic, manager, true, 600);
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"<Para><paraText>This is some text.</paraText></Para>
            <ExtendedCode><womStyledCode>&nbsp;&nbsp;&nbsp;</womStyledCode><WikiStyling><StyleColor>blue</StyleColor><womWikiStyledText>public void</womWikiStyledText></WikiStyling><womStyledCode>&nbsp;Foo()<Break />&nbsp;&nbsp;&nbsp;{<Break />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</womStyledCode><WikiStyling><StyleColor>green</StyleColor><womWikiStyledText>// comment here</womWikiStyledText></WikiStyling><womStyledCode><Break />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</womStyledCode><WikiStyling><StyleColor>blue</StyleColor><womWikiStyledText>string</womWikiStyledText></WikiStyling><womStyledCode>&nbsp;s;<Break />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</womStyledCode><TextileStrongInLine>...</TextileStrongInLine><womStyledCode><Break />&nbsp;&nbsp;&nbsp;}</womStyledCode></ExtendedCode>
            <Para><paraText>Here is some more text.</paraText></Para>"));
        }
 protected void FormatTest(string inputString, string outputString, QualifiedTopicRevision top)
 {
     string o1 = FormattedTestText(inputString, top);
     string o2 = outputString.Replace("\r", "");
     if (o1 != o2)
     {
         Console.Error.WriteLine("Got     : " + o1);
         Console.Error.WriteLine("Expected: " + o2);
     }
     Assert.AreEqual(o2, o1);
 }
        public void WomDocFileLinkTest()
        {
            string test = @"This is some text.

            This line has a file link to file:\\someserver\share in it.
            This line has a file link to file:\\someserver\share\test.gif in it.

            Here is some more text.
            ";
            QualifiedTopicRevision topic = new QualifiedTopicRevision("NamespaceOne.TestDocument");
            WomDocument.ResetUniqueIdentifier();
            parser.ProcessText(test, topic, manager, true, 600);
            Assert.IsTrue(parser.WomDocument.ParsedDocument.Contains(@"<Para><paraText>This is some text.</paraText></Para>

            <Para><paraText>This line has a file link to </paraText><FileLink>file:\\someserver\share</FileLink><paraText> in it.</paraText></Para>

            <Para><paraText>This line has a file link to </paraText><FileLink>file:\\someserver\share\test.gif</FileLink><paraText> in it.</paraText></Para>

            <Para><paraText>Here is some more text.</paraText></Para>"));
        }