예제 #1
0
  @Test
  public void testJavaComments() {
    String text = "/*special symbols*/";
    correctListToCheck(CommentSplitter.getInstance(), text, "special", "symbols");

    text = "// comment line which spell check works: misttake";
    correctListToCheck(
        CommentSplitter.getInstance(),
        text,
        "comment",
        "line",
        "which",
        "spell",
        "check",
        "works",
        "misttake");

    text = "// comment line which spell check not works: misttake";
    correctListToCheck(
        CommentSplitter.getInstance(),
        text,
        "comment",
        "line",
        "which",
        "spell",
        "check",
        "works",
        "misttake");
  }
예제 #2
0
 @Test
 public void testCommentWithHtmlTagsAndAtr() {
   String text =
       "<!-- <li style='color:red;'>something go here</li> foooo <li style='color:red;'>barrrr</li> <p> text text -->";
   correctListToCheck(
       CommentSplitter.getInstance(),
       text,
       "something",
       "here",
       "foooo",
       "barrrr",
       "text",
       "text");
 }
예제 #3
0
 @Test
 public void testCommentWithHtml() {
   String text = "<!--<li>something go here</li> <li>next content</li> foooo barrrr <p> text -->";
   correctListToCheck(
       CommentSplitter.getInstance(),
       text,
       "something",
       "here",
       "next",
       "content",
       "foooo",
       "barrrr",
       "text");
 }
예제 #4
0
 @Test
 public void testCommentsWithAbr() {
   String text = "<!--JSPTestClass-->";
   correctListToCheck(CommentSplitter.getInstance(), text, "Test", "Class");
 }
예제 #5
0
 @Test
 public void testCommentsWithWordsWithNumbers() {
   String text = "<!--specialCase456 symbols-->";
   correctListToCheck(CommentSplitter.getInstance(), text, "special", "Case", "symbols");
 }
예제 #6
0
 @Test
 public void testCamelCaseInXmlComments() {
   String text = "<!--specialCase symbols-->";
   correctListToCheck(CommentSplitter.getInstance(), text, "special", "Case", "symbols");
 }