Package org.jostraca.transform

Examples of org.jostraca.transform.ReplaceRegExpTransform$RegExpReplacement



  /* Public Methods << */

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


    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

    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

Related Classes of org.jostraca.transform.ReplaceRegExpTransform$RegExpReplacement

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.