Package org.jostraca.test

Examples of org.jostraca.test.TemplateActionHandlerStub


  }



  public void testPerform() throws Exception {
    TemplateActionHandlerStub tahs  = new TemplateActionHandlerStub();
    PropertySet               ps    = new PropertySet();
    ps.load( Tools.findRelativeSystemPath( "conf/system.conf" ) );
    TextualTransformManagerTable   ttmt = new TextualTransformManagerTable( ps );

    BasicUnitList bul = new BasicUnitList();

    SectionDirective sd = new SectionDirective();
    assertTrue( "section".equals( sd.getName() ) );

    tahs.clear();
    tahs.setDefaultSection( "foo" );
    sd.perform( "section", " ", bul, tahs, ps, ttmt );
    assertTrue( Section.NAME_body.equals( tahs.getDefaultSectionName() ) );

    tahs.clear();
    sd.perform( "section", " foo ", bul, tahs, ps, ttmt );
    assertTrue( "foo".equals( tahs.getDefaultSectionName() ) );

    tahs.clear();
    sd.perform( "section", " foo bar;", bul, tahs, ps, ttmt );
    assertTrue( "foo".equals( tahs.getDefaultSectionName() ) );
    assertTrue( " bar;".equals( tahs.getLastAppendedContent() ) );

  }
View Full Code Here


  }



  public void testPerform() throws Exception {
    TemplateActionHandlerStub tahs  = new TemplateActionHandlerStub();
    PropertySet               ps    = new PropertySet();
    ps.load( Tools.findRelativeSystemPath( "conf/system.conf" ) );
    TextualTransformManagerTable   ttmt = new TextualTransformManagerTable( ps );

    BasicUnitList bul = new BasicUnitList();
View Full Code Here



  public void testPerform() throws Exception {
    Template tm = new BasicTemplate();
    TemplateActionHandlerStub tahs  = new TemplateActionHandlerStub();
    PropertySet               ps    = new PropertySet();
    ps.load( Tools.findRelativeSystemPath( "conf/system.conf" ) );
    TextualTransformManagerTable   ttmt = new TextualTransformManagerTable( ps );

    BasicUnitList bul = new BasicUnitList();
View Full Code Here



  public void testPerform() throws Exception {
    Template tm = new BasicTemplate();
    TemplateActionHandlerStub tahs  = new TemplateActionHandlerStub();
    PropertySet               ps    = new PropertySet();
    ps.load( Tools.findRelativeSystemPath( "conf/system.conf" ) );
    TextualTransformManagerTable   ttmt = new TextualTransformManagerTable( ps );

    BasicUnitList bul = new BasicUnitList();

    SectionDirective sd = new SectionDirective();
    assertTrue( "section".equals( sd.getName() ) );

    tahs.clear();
    tahs.setDefaultSection( "foo" );
    sd.perform( "section", " ", bul, tahs, ps, ttmt, tm );
    assertTrue( Section.NAME_body.equals( tahs.getDefaultSectionName() ) );

    tahs.clear();
    sd.perform( "section", " foo ", bul, tahs, ps, ttmt, tm );
    assertTrue( "foo".equals( tahs.getDefaultSectionName() ) );

    tahs.clear();
    sd.perform( "section", " foo bar;", bul, tahs, ps, ttmt, tm );
    assertTrue( "foo".equals( tahs.getDefaultSectionName() ) );
    assertTrue( " bar;".equals( tahs.getLastAppendedContent() ) );

  }
View Full Code Here

TOP

Related Classes of org.jostraca.test.TemplateActionHandlerStub

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.