Package org.jostraca.util

Examples of org.jostraca.util.InstanceManager



  // test methods

  public void testGet() throws Exception {
    InstanceManager im = new InstanceManager();

    String im_cn = "org.jostraca.util.InstanceManager";
    String ps_cn = "org.jostraca.util.PropertySet";

    Object im_o = im.getInstance( im_cn );
    assertTrue( im_o instanceof InstanceManager );

    Object ps_o = im.getInstance( ps_cn );
    assertTrue( ps_o instanceof PropertySet );

    Object im_o2 = im.getInstance( im_cn );
    assertEquals( im_o, im_o2 );

    Object ps_o2 = im.getInstance( ps_cn );
    assertEquals( ps_o, ps_o2 );
  }
View Full Code Here


    Object ps_o2 = im.getInstance( ps_cn );
    assertEquals( ps_o, ps_o2 );
  }

  public void testFail() throws Exception {
    InstanceManager im = new InstanceManager();

    try {
      im.getInstance( "org.jostraca.util.NotAClassAtAllAtAll" );
    }
    catch( Exception e ) {
      //e.printStackTrace();
      assertTrue( e instanceof UtilException );
      UtilException ue = (UtilException) e;
View Full Code Here

TOP

Related Classes of org.jostraca.util.InstanceManager

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.