Package javax.naming.ldap

Examples of javax.naming.ldap.PagedResultsControl


   * <p>Here we are testing if this method constructs a control to set the number of entries to be returned per page of results.</p>
   * <p>The expected result is an instance of this class.</p>
   */
  public void testPagedResultsControlIntBoolean005() {
    try {
      PagedResultsControl prc=new PagedResultsControl(1000000,false);
      assertNotNull(prc);
    } catch (IOException e) {
      fail("Failed with:"+e);
    }

View Full Code Here


   * <p>Here we are testing if this method constructs a control to set the number of entries to be returned per page of results.</p>
   * <p>The expected result is an instance of this class.</p>
   */
  public void testPagedResultsControlIntBoolean006() {
    try {
      PagedResultsControl prc=new PagedResultsControl(1000000,true);
      assertNotNull(prc);
    } catch (IOException e) {
      fail("Failed with:"+e);
    }

View Full Code Here

   * <p>The expected result is an instance of this class.</p>
   */
  public void testPagedResultsControlIntByteArrayBoolean002() {

    try {
      PagedResultsControl prc=new PagedResultsControl(0,null,false);
      assertNotNull(prc);
    } catch (IOException e) {
      fail("Failed with:"+e);
    }

View Full Code Here

   */
  public void testPagedResultsControlIntByteArrayBoolean003() {

    try {
      byte[] by={10,10};
      PagedResultsControl prc=new PagedResultsControl(10,by,true);
      assertNotNull(prc);
    } catch (IOException e) {
      fail("Failed with:"+e);
    }

View Full Code Here

   */
  public void testPagedResultsControlIntByteArrayBoolean004() {

    try {
      byte[] by={10,10};
      PagedResultsControl prc=new PagedResultsControl(10,by,false);
      assertNotNull(prc);
    } catch (IOException e) {
      fail("Failed with:"+e);
    }

View Full Code Here

   */
  public void testGetEncodedValue001() {

    byte[] by={10,10};
    try {
      PagedResultsControl prc=new PagedResultsControl(10,by,false);
      assertEquals("30 07 02 01 0a 04 02 0a 0a",toHexString(prc.getEncodedValue()));
    } catch (IOException e) {
      fail("Failed with:"+e);
    }
  }
View Full Code Here

   * <p>The expected result is a byte array representing the control's ASN.1 BER encoded value.</p>
   */
  public void testGetEncodedValue002() {

    try {
      PagedResultsControl prc=new PagedResultsControl(0,null,false);
      assertEquals("30 05 02 01 00 04 00",toHexString(prc.getEncodedValue()));
    } catch (IOException e) {
      fail("Failed with:"+e);
    }
  }
View Full Code Here

   * <p>The expected result is a byte array representing the control's ASN.1 BER encoded value.</p>
   */
  public void testGetEncodedValue003() {

    try {
      PagedResultsControl prc=new PagedResultsControl(0,null,true);
      assertEquals("30 05 02 01 00 04 00",toHexString(prc.getEncodedValue()));
    } catch (IOException e) {
      fail("Failed with:"+e);
    }
  }
View Full Code Here

   */
  public void testGetEncodedValue004() {

    byte[] by={1,10,20};
    try {
      PagedResultsControl prc=new PagedResultsControl(0,by,false);
      assertEquals("30 08 02 01 00 04 03 01 0a 14",toHexString(prc.getEncodedValue()));
    } catch (IOException e) {
      fail("Failed with:"+e);
    }
  }
View Full Code Here

   *
   */
  public void testPagedResultsResponseControl(){
   
    try{
      PagedResultsControl prc=new PagedResultsControl(0, false);
      PagedResultsControl prc2=null;
      ByteArrayOutputStream buffer = new ByteArrayOutputStream();
      ObjectOutput out = new ObjectOutputStream(buffer);
      out.writeObject(prc);
      out.close();
      ObjectInput in = new ObjectInputStream(new ByteArrayInputStream(buffer.toByteArray()));
      prc2 = (PagedResultsControl) in.readObject();
      in.close();
      assertEquals(prc.getID(),prc2.getID());
    }catch (Exception e) {
      fail("Failed with:"+e);
    }
  }
View Full Code Here

TOP

Related Classes of javax.naming.ldap.PagedResultsControl

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.