Examples of ReplaceRegExpTransform


Examples of org.jostraca.transform.ReplaceRegExpTransform


  /* Public Methods << */

  public void testNoReplace() throws Exception {
    ReplaceRegExpTransform rt01 = new ReplaceRegExpTransform();
    String f01 = "f01";
    assertEquals( f01, rt01.transform( f01 ) );
  }
View Full Code Here

Examples of org.jostraca.transform.ReplaceRegExpTransform

    assertEquals( f01, rt01.transform( f01 ) );
  }


  public void testOneReplace() throws Exception {
    ReplaceRegExpTransform rt01 = new ReplaceRegExpTransform();
    String f01 = "f..";
    String t01 = "t01";
    rt01.addReplacement( f01, t01 );

    assertEquals( t01, rt01.transform( "f01" ) );
  }
View Full Code Here

Examples of org.jostraca.transform.ReplaceRegExpTransform

    assertEquals( t01, rt01.transform( "f01" ) );
  }


  public void testTwoReplaces() throws Exception {
    ReplaceRegExpTransform rt01 = new ReplaceRegExpTransform();
    String f01 = "f+";
    String t01 = "t";
    String f02 = "^a";
    String t02 = "b";
    rt01.addReplacement( f01, t01 );
    rt01.addReplacement( f02, t02 );
    assertEquals( "bta", rt01.transform( "affa" ) );
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.