Package org.apache.harmony.jndi.tests.javax.naming.spi.mock.ldap

Examples of org.apache.harmony.jndi.tests.javax.naming.spi.mock.ldap.MockLdapReferralException


  /**
   * Here we are testing if this method recives a string a creates a not null object.
   *
   */
  public void testLdapReferralExceptionString(){
    MockLdapReferralException mc=new MockLdapReferralException("test");
    assertNotNull(mc);
  }
View Full Code Here


   * Test for the class javax.naming.ldap.LdapReferralException
   *
   */
  public void testLdapReferralException(){
     
      MockLdapReferralException mlre=new MockLdapReferralException();
      MockLdapReferralException mlre2=null;
    try{
      ByteArrayOutputStream buffer = new ByteArrayOutputStream();
      ObjectOutput out = new ObjectOutputStream(buffer);
      out.writeObject(mlre);
      out.close();
      ObjectInput in = new ObjectInputStream(new ByteArrayInputStream(buffer.toByteArray()));
      mlre2 = (MockLdapReferralException) in.readObject();
      in.close();
      assertEquals(mlre.getExplanation(),mlre2.getExplanation());
    }catch (Exception e) {
      fail("Failed with:"+e);
    }
  }
View Full Code Here

  /**
   * Here we are testing if this method receives a string a creates a not null object.
   *
   */
  public void testLdapReferralExceptionString(){
    MockLdapReferralException mc=new MockLdapReferralException("test");
    assertNotNull(mc);
  }
View Full Code Here

TOP

Related Classes of org.apache.harmony.jndi.tests.javax.naming.spi.mock.ldap.MockLdapReferralException

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.