Package org.jostraca.util

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


  }


  public void testLoad() throws Exception {
    PropertySetManager psm01 = new PropertySetManager();
    PropertySet ps01 = psm01.load( "test01", Tools.findRelativeSystemPath("src/org/jostraca/util/test/test.conf") );
    assertEquals( "0", ps01.get("a") );
    assertEquals( "1", ps01.get("b") );

    try {
      psm01.load( "test02", new File("notest.conf") );
View Full Code Here


    PropertySet ps01 = psm01.load( "test01", Tools.findRelativeSystemPath("src/org/jostraca/util/test/test.conf") );
    assertEquals( "0", ps01.get("a") );
    assertEquals( "1", ps01.get("b") );

    try {
      psm01.load( "test02", new File("notest.conf") );
      fail();    
    } catch( PropertySetException ioe ) {}

    try {
      psm01.load( "test02", new File("notest.conf"), PropertySetManager.FILE_MUST_EXIST );
View Full Code Here

      psm01.load( "test02", new File("notest.conf") );
      fail();    
    } catch( PropertySetException ioe ) {}

    try {
      psm01.load( "test02", new File("notest.conf"), PropertySetManager.FILE_MUST_EXIST );
      fail();
    } catch( PropertySetException ioe ) {}

    try {
      PropertySet ps01o = psm01.load( "test01", new File("notest.conf"), PropertySetManager.USE_DEFAULT_IF_FILE_DOES_NOT_EXIST );
View Full Code Here

      psm01.load( "test02", new File("notest.conf"), PropertySetManager.FILE_MUST_EXIST );
      fail();
    } catch( PropertySetException ioe ) {}

    try {
      PropertySet ps01o = psm01.load( "test01", new File("notest.conf"), PropertySetManager.USE_DEFAULT_IF_FILE_DOES_NOT_EXIST );
      assertEquals( ps01o, ps01 );
    } catch( PropertySetException ioe ) { fail(); }
  }

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.