Package org.jboss.soa.esb.addressing.util

Examples of org.jboss.soa.esb.addressing.util.EPRManager


{
  private Logger log = Logger.getLogger( EPRManagerUnitTest.class );
 
  public void testCreate ()
  {
    EPRManager manager1 = EPRManager.getInstance(null);
    EPRManager manager2 = EPRManager.getInstance("");
    EPRManager manager3 = EPRManager.getInstance("/tmp");
   
    assertEquals(manager1.equals(manager2), true);
    assertEquals(manager1.equals(manager3), false);
  }
View Full Code Here


  public void testInputOutput ()
  {
    EmailEpr email = new EmailEpr(EmailEpr.SMTP_PROTOCOL, "foobar", "25", "me", "letmein");
   
    String tmpDir = System.getProperty("java.io.tmpdir");
    EPRManager manager = EPRManager.getInstance(tmpDir);

    try
    {
      manager.saveEPR("MyEmail", email);

      EmailEpr loaded = new EmailEpr(manager.loadEPR("MyEmail"));
   
      assertEquals(loaded.getHost().equals("foobar"), true);
      assertEquals(loaded.getPassword().equals("letmein"), true);
    }
    catch (Exception ex)
    {
      log.error(ex);
     
      fail(ex.toString());
    }
    finally
    {
      try
      {
        manager.removeEPR("MyEmail");
      }
      catch (Exception ex)
      {
      }
    }
View Full Code Here

  public void testSpecificInputOutput ()
  {
    EmailEpr email = new EmailEpr(EmailEpr.SMTP_PROTOCOL, "foobar", "25", "me", "letmein");
   
    String tmpDir = System.getProperty("java.io.tmpdir");
    EPRManager manager = EPRManager.getInstance(tmpDir);

    try
    {
      manager.saveEPR("MyEmail", email);
     
      EPR epr = manager.loadEPR("MyEmail");
     
      if (epr instanceof EmailEpr)
      {
         
      }
      else
          fail();
    }
    catch (Exception ex)
    {
      log.error(ex);
     
      fail(ex.toString());
    }
    finally
    {
      try
      {
        manager.removeEPR("MyEmail");
      }
      catch (Exception ex)
      {
      }
    }
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.addressing.util.EPRManager

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.