Beispiel #1
0
        public void MalformedTestHeaderIsNotExtracted()
        {
            var commentLines = new List <string>();

            commentLines.Add("// <test>");

            var extracted = TestParser.ExtractTestHeader(commentLines);

            Assert.Equal(null, extracted);
        }
Beispiel #2
0
        public void SelfClosedTestElementIsExtractedCorrectly()
        {
            var commentLines = new List <string>();

            commentLines.Add("// <test/>");

            var extracted = TestParser.ExtractTestHeader(commentLines);

            Assert.Equal("<test/>", extracted);
        }
Beispiel #3
0
        public void TestHeaderWithRequiresIsExtractedCorrectly()
        {
            var commentLines = new List <string>();

            commentLines.Add("// <test>");
            commentLines.Add("// <requires runtime=\"<2.0\" />");
            commentLines.Add("// </test>");

            var extracted = TestParser.ExtractTestHeader(commentLines);

            Assert.Equal("<test><requires runtime=\"<2.0\" /></test>", extracted);
        }