Package org.jostraca.transform

Examples of org.jostraca.transform.TrimTransform



  /* Public Methods << */

  public void testTransform() {
    TrimTransform t = new TrimTransform();

    assertTrue( "a".equals( t.transform(" a ") ) );
   
  }
View Full Code Here



  public void testPrependAppendRemove() throws Exception {
    SimpleObjectManager som = new SimpleObjectManager( TextualTransform.class );

    TrimTransform tt = new TrimTransform();
    som.prepend( tt );
    assertTrue( (TextualTransform.class.getName()+": "+tt.getClass().getName()).equals( som.toString() ) );

    try {
      som.prepend( new Object() );
      fail();
    } catch( Exception e ) {}

    CropTransform ct = new CropTransform();
    som.prepend( ct );
    assertTrue( (TextualTransform.class.getName()+": "+ct.getClass().getName()+", "+tt.getClass().getName())
            .equals( som.toString() ) );

    JavaStringEscapeTransform jset = new JavaStringEscapeTransform();
    som.append( jset );
    assertTrue( (TextualTransform.class.getName()+": "+ct.getClass().getName()+", "+tt.getClass().getName()+", "+jset.getClass().getName())
            .equals( som.toString() ) );


    som.remove( tt );
    assertTrue( (TextualTransform.class.getName()+": "+ct.getClass().getName()+", "+jset.getClass().getName())
View Full Code Here

TOP

Related Classes of org.jostraca.transform.TrimTransform

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.