コード例 #1
0
        public void SummarizeOneLineTest()
        {
            var    comment        = "//TODO - should fix this if it happens too often";
            string commentSummary = SrcMLParsingUtils.GetCommentSummary(comment);

            Assert.IsTrue("TODO - should fix this if it happens too often".Equals(commentSummary));
        }
コード例 #2
0
        public void SummarizeCommentTest()
        {
            var comment = "//TODO - should fix this if it happens too often\n" +
                          "//TODO - need to investigate why this is happening during parsing";
            string commentSummary = SrcMLParsingUtils.GetCommentSummary(comment);

            Assert.IsTrue("TODO - should fix this if it happens too often".Equals(commentSummary));
        }
コード例 #3
0
        public void SummarizeDashTest()
        {
            var comment = "// -----------------------------------------------------------------------------\n" +
                          "//  <autogeneratedinfo>\n" +
                          "//      This code was generated by:\n";
            string commentSummary = SrcMLParsingUtils.GetCommentSummary(comment);

            Assert.IsTrue("This code was generated by:".Equals(commentSummary));
        }
コード例 #4
0
        public void SummarizeMultiLineTest()
        {
            var comment = "/// <summary>\n" +
                          "/// Used for the culture in SR\n\r" +
                          "/// </devdoc>\r\n";
            string commentSummary = SrcMLParsingUtils.GetCommentSummary(comment);

            Assert.IsTrue("Used for the culture in SR".Equals(commentSummary));
        }
コード例 #5
0
        public void SummarizeSpaceTest()
        {
            var comment =
                "           /// <summary>\n\r" +
                "           /// Specifies the size, in bytes, of the structure. The caller must set this to Marshal.SizeOf(typeof(CURSORINFO)).\r\n" +
                "           /// </summary>\r\n";
            string commentSummary = SrcMLParsingUtils.GetCommentSummary(comment);

            Assert.IsTrue("Specifies the size, in bytes, of the structure. The caller must set this to Marshal.SizeOf(typeof(CURSORINFO)).".Equals(commentSummary));
        }
コード例 #6
0
        public void SummarizeNoSpaceTest()
        {
            var comment = "        ///<summary>\n" +
                          "/// Save the plug-in's settings.\n" +
                          "///</summary>\n" +
                          "/// ";
            string commentSummary = SrcMLParsingUtils.GetCommentSummary(comment);

            Assert.IsTrue("Save the plug-in's settings.".Equals(commentSummary));
        }