Package org.nasutekds.server.protocols.internal

Examples of org.nasutekds.server.protocols.internal.InternalClientConnection


         "givenName: Test",
         "sn: User",
         "cn: Test User",
         "userPassword: password");

    InternalClientConnection conn =
         InternalClientConnection.getRootConnection();
    AddOperation addOperation =
         conn.processAdd(e.getDN(), e.getObjectClasses(),
                         e.getUserAttributes(), e.getOperationalAttributes());
    assertEquals(addOperation.getResultCode(), ResultCode.SUCCESS);

    String[] args =
    {
View Full Code Here


   */
  @Test()
  public void testOutOfSequenceBind()
         throws Exception
  {
    InternalClientConnection conn =
         new InternalClientConnection(new AuthenticationInfo());
    BindOperation bindOperation =
         conn.processSASLBind(DN.nullDN(), SASL_MECHANISM_CRAM_MD5,
                              ByteString.valueOf("invalid"));
    assertFalse(bindOperation.getResultCode() == ResultCode.SUCCESS);
  }
View Full Code Here

   */
  @Test()
  public void testMalformedCredentials()
         throws Exception
  {
    InternalClientConnection conn =
         new InternalClientConnection(new AuthenticationInfo());
    BindOperation bindOperation =
         conn.processSASLBind(DN.nullDN(), SASL_MECHANISM_CRAM_MD5, null);
    assertEquals(bindOperation.getResultCode(),
                 ResultCode.SASL_BIND_IN_PROGRESS);

    bindOperation =
         conn.processSASLBind(DN.nullDN(), SASL_MECHANISM_CRAM_MD5,
                              ByteString.valueOf("malformed"));
    assertFalse(bindOperation.getResultCode() == ResultCode.SUCCESS);
  }
View Full Code Here

   */
  @Test()
  public void testMalformedDigest()
         throws Exception
  {
    InternalClientConnection conn =
         new InternalClientConnection(new AuthenticationInfo());
    BindOperation bindOperation =
         conn.processSASLBind(DN.nullDN(), SASL_MECHANISM_CRAM_MD5, null);
    assertEquals(bindOperation.getResultCode(),
                 ResultCode.SASL_BIND_IN_PROGRESS);

    ByteString creds =
         ByteString.valueOf("dn:cn=Directory Manager malformeddigest");
    bindOperation =
         conn.processSASLBind(DN.nullDN(), SASL_MECHANISM_CRAM_MD5, creds);
    assertFalse(bindOperation.getResultCode() == ResultCode.SUCCESS);
  }
View Full Code Here

   */
  @Test()
  public void testMalformedDigestWithCorrectLength()
         throws Exception
  {
    InternalClientConnection conn =
         new InternalClientConnection(new AuthenticationInfo());
    BindOperation bindOperation =
         conn.processSASLBind(DN.nullDN(), SASL_MECHANISM_CRAM_MD5, null);
    assertEquals(bindOperation.getResultCode(),
                 ResultCode.SASL_BIND_IN_PROGRESS);

    ByteString creds =
         ByteString.valueOf("dn:cn=Directory Manager " +
                          "malformedcredswiththerightlength");
    bindOperation =
         conn.processSASLBind(DN.nullDN(), SASL_MECHANISM_CRAM_MD5, creds);
    assertFalse(bindOperation.getResultCode() == ResultCode.SUCCESS);
  }
View Full Code Here

  @Test(dependsOnMethods = {"org.nasutekds.server.schema."+
                "CollationMatchingRuleTest.addEntry"})
  public void searchCollationEqualityUsingOID() throws Exception
  {
    //Search the collation rule with OID of en and no suffix in the filter.
    InternalClientConnection conn =
         InternalClientConnection.getRootConnection();

    InternalSearchOperation searchOperation =
         new InternalSearchOperation(
              conn,
View Full Code Here

                "CollationMatchingRuleTest.addEntry"})
  public void searchCollationEqualityUsingLanguageTag() throws Exception
  {
    //Search the collation rule with language tag of en and no suffix
    //in the filter.
    InternalClientConnection conn =
         InternalClientConnection.getRootConnection();

    InternalSearchOperation searchOperation =
         new InternalSearchOperation(
              conn,
View Full Code Here

  @Test(dependsOnMethods = {"org.nasutekds.server.schema."+
                "CollationMatchingRuleTest.addEntry"})
  public void searchCollationLTUsingOIDSuffix() throws Exception
  {
    //Search the collation rule with OID of es and suffix in the filter.
    InternalClientConnection conn =
         InternalClientConnection.getRootConnection();

    InternalSearchOperation searchOperation =
         new InternalSearchOperation(
              conn,
View Full Code Here

  @Test(dependsOnMethods = {"org.nasutekds.server.schema."+
                "CollationMatchingRuleTest.addEntry"})
  public void searchCollationLTEUsingLanguageSuffix() throws Exception
  {
    //Search the collation rule with tag of fr and suffix in the filter.
    InternalClientConnection conn =
         InternalClientConnection.getRootConnection();

    InternalSearchOperation searchOperation =
         new InternalSearchOperation(
              conn,
View Full Code Here

  @Test(dependsOnMethods = {"org.nasutekds.server.schema."+
                "CollationMatchingRuleTest.addEntry"})
  public void searchCollationGTUsingLanguage() throws Exception
  {
    //Search the collation rule with tag of fr in the filter.
    InternalClientConnection conn =
         InternalClientConnection.getRootConnection();

    InternalSearchOperation searchOperation =
         new InternalSearchOperation(
              conn,
View Full Code Here

TOP

Related Classes of org.nasutekds.server.protocols.internal.InternalClientConnection

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.