Package org.jostraca.util

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


    psdefs.put( "test01", ps01 );
    psdefs.put( "test02", ps02 );

    OrderedPropertySetManager opsm01 = new OrderedPropertySetManager( names, psdefs );
   
    PropertySet ops01 = opsm01.load( "test01", Tools.findRelativeSystemPath("src/org/jostraca/util/test/test.conf") );
    assertEquals( "0", ops01.get("a") );
    assertEquals( "1", ops01.get("b") );
    assertEquals( "",  ops01.get("default01") );

    try {
View Full Code Here


    assertEquals( "0", ops01.get("a") );
    assertEquals( "1", ops01.get("b") );
    assertEquals( "",  ops01.get("default01") );

    try {
      PropertySet ops02 = opsm01.load( "test02", new File("no-test.conf") );
      fail();
    } catch( Exception ioe ) {}
    try {
      PropertySet ops02 = opsm01.load( "test02", new File("no-test.conf"), PropertySetManager.FILE_MUST_EXIST );
      fail();
View Full Code Here

    try {
      PropertySet ops02 = opsm01.load( "test02", new File("no-test.conf") );
      fail();
    } catch( Exception ioe ) {}
    try {
      PropertySet ops02 = opsm01.load( "test02", new File("no-test.conf"), PropertySetManager.FILE_MUST_EXIST );
      fail();
    } catch( Exception ioe ) {}


    try {
View Full Code Here

      fail();
    } catch( Exception ioe ) {}


    try {
      PropertySet ops02 = opsm01.load( "test02", new File("no-test.conf"), PropertySetManager.USE_DEFAULT_IF_FILE_DOES_NOT_EXIST );
      assertEquals( "true",  ops02.get("default02") );
    } catch( Exception 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.