Examples of MockStartTlsResponse


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

   * Test for the class javax.naming.ldap.StartTlsResponse
   *
   */
  public void testStartTlsResponse(){

      MockStartTlsResponse str=new MockStartTlsResponse();
      MockStartTlsResponse str2=null;
    try{
      ByteArrayOutputStream buffer = new ByteArrayOutputStream();
      ObjectOutput out = new ObjectOutputStream(buffer);
      out.writeObject(str);
      out.close();
      ObjectInput in = new ObjectInputStream(new ByteArrayInputStream(buffer.toByteArray()));
      str2 = (MockStartTlsResponse) in.readObject();
      in.close();
      assertEquals(str.getID(),str2.getID());
    }catch (Exception e) {
      fail("Failed with:"+e);
    }
  }
View Full Code Here

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

public class StartTlsResponseTest extends TestCase {

    public void testAll() {
        assertEquals("1.3.6.1.4.1.1466.20037", StartTlsResponse.OID);

        StartTlsResponse str = new MockStartTlsResponse();

        assertEquals(StartTlsResponse.OID, str.getID());
        assertNull(str.getEncodedValue());
    }
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.