Package org.springframework.ide.eclipse.roo.ui.internal

Examples of org.springframework.ide.eclipse.roo.ui.internal.StyledTextAppender


*/
public class StyledTextAppenderTest extends TestCase {

  @Test
  public void testCreatedFile() {
    Pattern pattern = new StyledTextAppender(null).getHyperlinkPattern();

    Matcher matcher = pattern.matcher("Created SRC_MAIN_WEBAPP/WEB-INF/views/votes/list.jspx");
    assertTrue(matcher.matches());
    assertEquals("Created ", matcher.group(1));
    assertEquals("SRC_MAIN_WEBAPP/WEB-INF/views/votes/list.jspx", matcher.group(2));
View Full Code Here


    assertNull(matcher.group(5));
  }

  @Test
  public void testUpdatedFile() {
    Pattern pattern = new StyledTextAppender(null).getHyperlinkPattern();

    Matcher matcher = pattern.matcher("Updated SRC_MAIN_JAVA/r1/web/ApplicationConversionServiceFactoryBean_Roo_ConversionService.aj");
    assertTrue(matcher.matches());
    assertEquals("Updated ", matcher.group(1));
    assertEquals("SRC_MAIN_JAVA/r1/web/ApplicationConversionServiceFactoryBean_Roo_ConversionService.aj", matcher.group(2));
View Full Code Here

    assertNull(matcher.group(5));
  }
 
  @Test
  public void testCreatedModule() {
    Pattern pattern = new StyledTextAppender(null).getHyperlinkPattern();
   
    Matcher matcher = pattern.matcher("Created module1|SRC_MAIN_JAVA/com/foo/MyEntity_Roo_JavaBean.aj");
    assertTrue(matcher.matches());
    assertEquals("Created ", matcher.group(1));
    assertEquals("module1|SRC_MAIN_JAVA/com/foo/MyEntity_Roo_JavaBean.aj", matcher.group(2));
View Full Code Here

    assertNull(matcher.group(5));
  }
 
  @Test
  public void testUpdatedModule() {
    Pattern pattern = new StyledTextAppender(null).getHyperlinkPattern();
   
    Matcher matcher = pattern.matcher("Updated module1|SRC_MAIN_RESOURCES/META-INF/persistence.xml");
    assertTrue(matcher.matches());
    assertEquals("Updated ", matcher.group(1));
    assertEquals("module1|SRC_MAIN_RESOURCES/META-INF/persistence.xml", matcher.group(2));
View Full Code Here

    assertNull(matcher.group(5));
  }
 
  @Test
  public void testSpringConfigRoot() {
    Pattern pattern = new StyledTextAppender(null).getHyperlinkPattern();
   
    Matcher matcher = pattern.matcher("Created module1|SPRING_CONFIG_ROOT/applicationContext.xml");
    assertTrue(matcher.matches());
    assertEquals("Created ", matcher.group(1));
    assertEquals("module1|SPRING_CONFIG_ROOT/applicationContext.xml", matcher.group(2));
View Full Code Here

    assertNull(matcher.group(5));
  }

  @Test
  public void testDeletedFile() {
    Pattern pattern = new StyledTextAppender(null).getHyperlinkPattern();

    Matcher matcher = pattern.matcher("Managed SRC_MAIN_WEBAPP/WEB-INF/views/votes/list.jspx");
    assertTrue(matcher.matches());
    assertEquals("Managed ", matcher.group(1));
    assertEquals("SRC_MAIN_WEBAPP/WEB-INF/views/votes/list.jspx", matcher.group(2));
View Full Code Here

    assertNull(matcher.group(5));
  }

  @Test
  public void testUnknownAction() {
    Pattern pattern = new StyledTextAppender(null).getHyperlinkPattern();

    Matcher matcher = pattern.matcher("Unknown SRC_MAIN_WEBAPP/WEB-INF/views/votes/list.jspx");
    assertTrue(matcher.matches());
    assertEquals("Unknown ", matcher.group(1));
    assertEquals("SRC_MAIN_WEBAPP/WEB-INF/views/votes/list.jspx", matcher.group(2));
View Full Code Here

    assertNull(matcher.group(5));
  }

  @Test
  public void testSomethingAfterTheFileName() {
    Pattern pattern = new StyledTextAppender(null).getHyperlinkPattern();

    Matcher matcher = pattern.matcher("Unknown SRC_MAIN_WEBAPP/WEB-INF/views/votes/list.jspx this is the end");
    assertTrue(matcher.matches());
    assertEquals("Unknown ", matcher.group(1));
    assertEquals("SRC_MAIN_WEBAPP/WEB-INF/views/votes/list.jspx", matcher.group(2));
View Full Code Here

    assertEquals(" this is the end", matcher.group(5));
  }

  @Test
  public void testColonDirectlyAfterFileName() {
    Pattern pattern = new StyledTextAppender(null).getHyperlinkPattern();

    Matcher matcher = pattern.matcher("Unknown SRC_MAIN_WEBAPP/WEB-INF/views/votes/list.jspx : this is the end");
    assertTrue(matcher.matches());
    assertEquals("Unknown ", matcher.group(1));
    assertEquals("SRC_MAIN_WEBAPP/WEB-INF/views/votes/list.jspx", matcher.group(2));
View Full Code Here

    assertEquals(" : this is the end", matcher.group(5));
  }

  @Test
  public void testSpaceAndColonDirectlyAfterFileName() {
    Pattern pattern = new StyledTextAppender(null).getHyperlinkPattern();

    Matcher matcher = pattern.matcher("Unknown SRC_MAIN_WEBAPP/WEB-INF/views/votes/list.jspx : this is the end");
    assertTrue(matcher.matches());
    assertEquals("Unknown ", matcher.group(1));
    assertEquals("SRC_MAIN_WEBAPP/WEB-INF/views/votes/list.jspx", matcher.group(2));
View Full Code Here

TOP

Related Classes of org.springframework.ide.eclipse.roo.ui.internal.StyledTextAppender

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.