Package javax.naming.ldap

Examples of javax.naming.ldap.SortResponseControl


   * Test for the class javax.naming.ldap.SortResponseControl
   *
   */
  public void testSortResponseControl(){
    try{
      SortResponseControl src=new SortResponseControl("", false, new byte[]{48,3,10,1,0});
      SortResponseControl src2=null;
      ByteArrayOutputStream buffer = new ByteArrayOutputStream();
      ObjectOutput out = new ObjectOutputStream(buffer);
      out.writeObject(src);
      out.close();
      ObjectInput in = new ObjectInputStream(new ByteArrayInputStream(buffer.toByteArray()));
      src2 = (SortResponseControl) in.readObject();
      in.close();
      assertEquals(src.getID(),src2.getID());
    }catch (Exception e) {
      fail("Failed with:"+e);
    }
  }
View Full Code Here


    String Id="";
    boolean crit=true;
    try {
      byte[] ber=null;
      SortResponseControl src=new SortResponseControl(Id,crit,ber);
      fail("The bytes are not in the ASN.1 BER.");
    } catch (IOException e) {
      fail("Should raise another exception.");
    } catch (NullPointerException e) {
     
View Full Code Here

    String Id="";
    boolean crit=true;
    try {
      byte[] ber={};
      SortResponseControl src=new SortResponseControl(Id,crit,ber);
      fail("The bytes are not in the ASN.1 BER.");
    } catch (IOException e) {
     
    }
  }
View Full Code Here

    String Id="";
    boolean crit=false;
    try {
      byte[] ber={};
      SortResponseControl src=new SortResponseControl(Id,crit,ber);
      fail("The bytes are not in the ASN.1 BER.");
    } catch (IOException e) {
     
    }
  }
View Full Code Here

    String Id="";
    boolean crit=true;
    try {
      byte[] ber={10,20,12};
      SortResponseControl src=new SortResponseControl(Id,crit,ber);
      fail("The bytes are not in the ASN.1 BER.");
    } catch (IOException e) {
     
    }
  }
View Full Code Here

    String Id="";
    boolean crit=false;
    try {
      byte[] ber={10,20,12};
      SortResponseControl src=new SortResponseControl(Id,crit,ber);
      fail("The bytes are not in the ASN.1 BER.");
    } catch (IOException e) {
     
    }
  }
View Full Code Here

    String Id="";
    boolean crit=false;
    try {
      byte[] ber={48,3,10,1,0};
      SortResponseControl src=new SortResponseControl(Id,crit,ber);
      assertNotNull(src);
    } catch (IOException e) {
      fail("The bytes are in the ASN.1 BER.");
    }
  }
View Full Code Here

    String Id="";
    boolean crit=true;
    try {
      byte[] ber={48,3,10,1,0};
      SortResponseControl src=new SortResponseControl(Id,crit,ber);
      assertNotNull(src);
    } catch (IOException e) {
      fail("The bytes are in the ASN.1 BER.");
    }
  }
View Full Code Here

    String Id="test";
    boolean crit=true;
    try {
      byte[] ber={48,3,10,1,0};
      SortResponseControl src=new SortResponseControl(Id,crit,ber);
      assertNotNull(src);
    } catch (IOException e) {
      fail("The bytes are in the ASN.1 BER.");
    }
  }
View Full Code Here

    String Id="test";
    boolean crit=false;
    try {
      byte[] ber={3,10,1,0};
      SortResponseControl src=new SortResponseControl(Id,crit,ber);
      fail("The bytes are not in the ASN.1 BER.");
    } catch (IOException e) {
     
    }
  }
View Full Code Here

TOP

Related Classes of javax.naming.ldap.SortResponseControl

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.