Package org.jostraca.util

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




  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

  }


  protected boolean confirmPropertySet( String pTestRoot, PropertySet pReferencePS ) {
    PropertySet testps = new PropertySet();
    testps.load( new File( getTestFolder(), PREFIX_RESULT + pTestRoot + DOT + TXT ) );
    boolean test = testps.equals( pReferencePS );

    if( !test ) {
      displayPropertySets( testps, pReferencePS );
    }
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();

    ReplaceDirective rd = new ReplaceDirective();
View Full Code Here

  public void testMethodInsert() throws Exception {
    if( RUN_ONLY_COMMENTED_OUT ) { return; }
    generateTemplate( TEST_MethodInsert );

    PropertySet testPS = getTestPS();
    testPS.load( new File( getTestFolder(), PREFIX_RESULT + TEST_MethodInsert + DOT + TXT ) );

    PropertySet refPS  = getReferencePS();
    refPS.clear();

    refPS.set( "string",   "string" );
View Full Code Here

    systemPS.overrideWith( addps );

    PropertySet local           = new PropertySet();
    File        localConfigFile = new File( pConfigFolder, systemPS.get( Property.jostraca_LocalConfigFileName ) );
    if( localConfigFile.exists() && !localConfigFile.isDirectory() ) {
      local.load( localConfigFile  );
      systemPS.overrideWith( local );
    }
    else {
      // if local.conf does not exist, ignore
    }
View Full Code Here

    PropertySet result = new PropertySet();
    int numAddConf = pAdditionalConfigFiles.size();
    for(int addConfI = 0; addConfI < numAddConf; addConfI++) {
      String      path    = (String) pAdditionalConfigFiles.get( addConfI );
      PropertySet addConf = new PropertySet();
      addConf.load( new File(path) );
      result.overrideWith( addConf );
    }
    return result;
  }
View Full Code Here

      configFolder = new File( "" );
    }
    PropertySet local           = new PropertySet();
    File        localConfigFile = new File( configFolder, system.get( Property.jostraca_LocalConfigFileName ) );
    if( localConfigFile.exists() && !localConfigFile.isDirectory() ) {
      local.load( localConfigFile  );
    }

    system.overrideWith( local );

    // only set jostraca.Location if using configuration from disk
View Full Code Here


  public void testProcessExpression() throws Exception {
    TemplateActionHandlerStub tahs  = new TemplateActionHandlerStub();
    PropertySet               ps    = new PropertySet();
    ps.load( new File( "conf/system.conf" ) );
   
    // REVIEW: this will have to change
    ps.set( Property.jostraca_old, "yes" );

    BasicExpressionElementProcessor beep = create( ps, tahs );
View Full Code Here



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

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.