Package org.jostraca.util

Examples of org.jostraca.util.PropertySet.load()



  public void testProcessDirective() throws Exception {
    TemplateActionHandlerStub tahs  = new TemplateActionHandlerStub();
    PropertySet               ps    = new PropertySet();
    ps.load( new File( "conf/system.conf" ) );
    BasicDirectiveElementProcessor bdep = create( ps, tahs );

    tahs.clear();
    String s01 = "foo = bar;";
    Block  b01 = new Block( Block.TYPE_script, s01 );
View Full Code Here




  public void testCreate() throws Exception {
    PropertySet                 ps   = new PropertySet();
    ps.load( new File( "conf/system.conf" ) );
    TemplateActionHandler       tah  = new TemplateActionHandlerStub();
    BasicScriptElementProcessor bsep = create( ps, tah );
  }

View Full Code Here

  public void testProcessScript() throws Exception {
    TemplateActionHandlerStub tahs  = new TemplateActionHandlerStub();
    PropertySet               ps    = new PropertySet();

    ps.load( new File( "conf/system.conf" ) );
    BasicScriptElementProcessor bsep = create( ps, tahs );

    // REVIEW: this will have to change
    ps.set( Property.jostraca_old, "yes" );
View Full Code Here


  public void testProcessText() throws Exception {
    TemplateActionHandlerStub tahs  = new TemplateActionHandlerStub();
    PropertySet               ps    = new PropertySet();
    ps.load( new File( "conf/system.conf" ) );
    BasicTextElementProcessor btep = create( ps, tahs );
    String content   = "content";
    Block  textBlock = new Block( Block.TYPE_text, content );

    assertTrue( btep.isMatch( textBlock ) );
View Full Code Here

  public static PropertySet getSystemPropertySet() throws Exception {
    String base = FileUtil.findFile("org/jostraca/test").getAbsolutePath();

    PropertySet systemps = new PropertySet();
    systemps.load( new File(base,"../../../../conf/system.conf") );

    return systemps;
  }

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();
View Full Code Here

    if( tmps.isYes( Property.main_EnableMeta ) ) {
      TemplatePath tp       = tm.getTemplatePath();
      File         metaFile = makeMetaFilePath( tmps, tp );

      try {
        ps.load( metaFile );
      }
      catch( Exception e ) {
        throw ProcessException.CODE_load_meta( new ValueSet( ValueCode.FILE, metaFile ), e );
      }
    }
View Full Code Here

  public static PropertySet getSystemPropertySet() throws Exception {
    String base = FileUtil.findFile("org/jostraca/process/test").getAbsolutePath();

    PropertySet systemps = new PropertySet();
    systemps.load( new File(base,"../../../../../conf/system.conf") );

    return systemps;
  }

View Full Code Here

    bus.add( new BasicUnit( "text",    "foo", "foot02" ) );
    bus.add( new BasicUnit( "script""foo", "foos02" ) );


    PropertySet ps = new PropertySet();
    ps.load( Tools.findRelativeSystemPath("src/org/jostraca/unit/test/test.conf") );

    BasicUnitProcessor bup = new BasicUnitProcessor();
    bup.setPropertySet( ps );

    SectionSet ss = bup.process( bus );
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.