public void is_at_start_miss()
        {
            var scanner = new BlockCommentScanner("<!--", "-->", "spark", "lang-htm");

            scanner.DetermineName("<h1>some html</h1>").ShouldBeNull();
            scanner.DetermineName("SAMPLE: UsingCodeSnippetInSpark").ShouldBeNull();
        }
Example #2
0
        public void is_at_start_miss()
        {
            var scanner = new BlockCommentScanner("<!--", "-->", "spark", "lang-htm");

            scanner.DetermineName("<h1>some html</h1>").ShouldBeNull();
            scanner.DetermineName("SAMPLE: UsingCodeSnippetInSpark").ShouldBeNull();
        }
        public void is_at_start_positive()
        {
            var scanner = new BlockCommentScanner("<!--", "-->", "spark", "lang-htm");

            scanner.DetermineName("    <!--SAMPLE: UsingCodeSnippetInSpark-->").ShouldEqual("UsingCodeSnippetInSpark");
            scanner.DetermineName("<!--SAMPLE: UsingCodeSnippetInSpark-->").ShouldEqual("UsingCodeSnippetInSpark");
            scanner.DetermineName("<!--  SAMPLE:UsingCodeSnippetInSpark  -->").ShouldEqual("UsingCodeSnippetInSpark");
            scanner.DetermineName("<!--  SAMPLE: UsingCodeSnippetInSpark  -->").ShouldEqual("UsingCodeSnippetInSpark");
        }
Example #4
0
        public void is_at_start_positive()
        {
            var scanner = new BlockCommentScanner("<!--", "-->", "spark", "lang-htm");

            scanner.DetermineName("    <!--SAMPLE: UsingCodeSnippetInSpark-->").ShouldBe("UsingCodeSnippetInSpark");
            scanner.DetermineName("<!--SAMPLE: UsingCodeSnippetInSpark-->").ShouldBe("UsingCodeSnippetInSpark");
            scanner.DetermineName("<!--  SAMPLE:UsingCodeSnippetInSpark  -->").ShouldBe("UsingCodeSnippetInSpark");
            scanner.DetermineName("<!--  SAMPLE: UsingCodeSnippetInSpark  -->").ShouldBe("UsingCodeSnippetInSpark");
        }