Exemplo n.º 1
0
        public void ValidatePostProcessResultsProcessSingleDocumentSeeAlsoTagInvalid()
        {
            List <Document> documents = new List <Document>();

            documents.Add(new Document(Shared.DocumentType.Class, "Test", "Test", "ClassName", "T:Test.ClassName"));

            DocumentPostProcess postProcess = new DocumentPostProcess(documents);

            Assert.IsNotNull(postProcess);

            Document searchDoc = new Document(Shared.DocumentType.Custom, "Custom Type");

            searchDoc.ClassName       = searchDoc.FullMemberName;
            searchDoc.LongDescription = "Test <seealso cref=\"T:Test.ClassName /> class";

            Assert.IsNotNull(searchDoc);

            PostProcessResults postProcessResults = postProcess.Process(searchDoc);

            Assert.IsNotNull(postProcessResults);

            Assert.AreEqual(1, postProcessResults.DocumentsProcessed);
            Assert.AreEqual(1, postProcessResults.GetCountValue(Constants.CountValueSeeAlso));
            Assert.AreEqual(1, postProcessResults.GetCountValue(Constants.CountValueSeeAlsoNotFound));
            Assert.AreEqual(0, searchDoc.SeeAlso.Count);
        }
Exemplo n.º 2
0
        public void ValidatePostProcessResultsProcessSingleDocumentParaTag()
        {
            List <Document> documents = new List <Document>();

            documents.Add(new Document(Shared.DocumentType.Class, "Test", "Test", "ClassName", "T:Test.ClassName"));

            DocumentPostProcess postProcess = new DocumentPostProcess(documents);

            Assert.IsNotNull(postProcess);

            Document searchDoc = new Document(Shared.DocumentType.Custom, "Custom Type");

            searchDoc.LongDescription = "Test <para>This will be a seperate paragraph</para> class";

            Assert.IsNotNull(searchDoc);

            PostProcessResults postProcessResults = postProcess.Process(searchDoc);

            Assert.IsNotNull(postProcessResults);

            Assert.AreEqual(1, postProcessResults.DocumentsProcessed);
            Assert.AreEqual(1, postProcessResults.GetCountValue(Constants.CountValueParaOpen));
            Assert.AreEqual(1, postProcessResults.GetCountValue(Constants.CountValueParaClose));
            Assert.AreEqual("Test <p>This will be a seperate paragraph</p> class", searchDoc.LongDescription);
        }
Exemplo n.º 3
0
        public void ValidatePostProcessResultsProcessSingleDocumentSeeTag()
        {
            List <Document> documents = new List <Document>();

            documents.Add(new Document(Shared.DocumentType.Class, "Test", "Test", "ClassName", "T:Test.ClassName"));

            DocumentPostProcess postProcess = new DocumentPostProcess(documents);

            Assert.IsNotNull(postProcess);

            Document searchDoc = new Document(Shared.DocumentType.Custom, "Custom Type");

            searchDoc.ClassName       = searchDoc.FullMemberName;
            searchDoc.LongDescription = "Test <see cref=\"T:Test.ClassName\" /> class";

            Assert.IsNotNull(searchDoc);

            PostProcessResults postProcessResults = postProcess.Process(searchDoc);

            Assert.IsNotNull(postProcessResults);

            Assert.AreEqual(1, postProcessResults.DocumentsProcessed);
            Assert.AreEqual(1, postProcessResults.GetCountValue(Constants.CountValueSee));
            Assert.AreEqual("Test <a href=\"/docs/Document/Test/ClassName/\">ClassName</a> class", searchDoc.LongDescription);
        }