Exemplo n.º 1
0
        public void MalformedTestHeaderIsNotExtracted()
        {
            var commentLines = new List <string>();

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

            var extracted = TestParser.ExtractTestHeader(commentLines);

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

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

            var extracted = TestParser.ExtractTestHeader(commentLines);

            Assert.Equal("<test/>", extracted);
        }
Exemplo n.º 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);
        }