Search in sources :

Example 16 with IntermediateResponse

use of com.unboundid.ldap.sdk.IntermediateResponse in project ldapsdk by pingidentity.

the class DebugTestCase method testDebugLDAPResult7EnabledIncludeLDAP.

/**
 * Tests the seventh {@code debugLDAPResult} method with the debugger enabled
 * and a debug type set that includes the LDAP type among others.
 *
 * @throws  Exception  If an unexpected problem occurs.
 */
@Test()
public void testDebugLDAPResult7EnabledIncludeLDAP() throws Exception {
    Debug.setEnabled(true, EnumSet.of(DebugType.LDAP, DebugType.OTHER));
    testLogHandler.resetMessageCount();
    assertTrue(Debug.debugEnabled(DebugType.LDAP));
    Debug.debugLDAPResult(new IntermediateResponse("1.2.3.4", null));
    assertTrue(testLogHandler.getMessageCount() >= 1);
}
Also used : IntermediateResponse(com.unboundid.ldap.sdk.IntermediateResponse) Test(org.testng.annotations.Test)

Example 17 with IntermediateResponse

use of com.unboundid.ldap.sdk.IntermediateResponse in project ldapsdk by pingidentity.

the class DebugTestCase method testDebugLDAPResult7EnabledOnlyLDAP.

/**
 * Tests the seventh {@code debugLDAPResult} method with the debugger enabled
 * and a debug type set that includes only the LDAP type.
 *
 * @throws  Exception  If an unexpected problem occurs.
 */
@Test()
public void testDebugLDAPResult7EnabledOnlyLDAP() throws Exception {
    Debug.setEnabled(true, EnumSet.of(DebugType.LDAP));
    testLogHandler.resetMessageCount();
    assertTrue(Debug.debugEnabled(DebugType.LDAP));
    Debug.debugLDAPResult(new IntermediateResponse("1.2.3.4", null));
    assertTrue(testLogHandler.getMessageCount() >= 1);
}
Also used : IntermediateResponse(com.unboundid.ldap.sdk.IntermediateResponse) Test(org.testng.annotations.Test)

Example 18 with IntermediateResponse

use of com.unboundid.ldap.sdk.IntermediateResponse in project ldapsdk by pingidentity.

the class DebugTestCase method testDebugLDAPResult8DisabledAll.

/**
 * Tests the eighth {@code debugLDAPResult} method with the debugger disabled
 * and a debug type set of all types.
 *
 * @throws  Exception  If an unexpected problem occurs.
 */
@Test()
public void testDebugLDAPResult8DisabledAll() throws Exception {
    Debug.setEnabled(false);
    testLogHandler.resetMessageCount();
    assertFalse(Debug.debugEnabled(DebugType.LDAP));
    Debug.debugLDAPResult(Level.FINEST, new IntermediateResponse("1.2.3.4", null));
    assertTrue(testLogHandler.getMessageCount() >= 0);
}
Also used : IntermediateResponse(com.unboundid.ldap.sdk.IntermediateResponse) Test(org.testng.annotations.Test)

Example 19 with IntermediateResponse

use of com.unboundid.ldap.sdk.IntermediateResponse in project ldapsdk by pingidentity.

the class DebugTestCase method testDebugLDAPResult8EnabledIncludeLDAP.

/**
 * Tests the eighth {@code debugLDAPResult} method with the debugger enabled
 * and a debug type set that includes the LDAP type among others.
 *
 * @throws  Exception  If an unexpected problem occurs.
 */
@Test()
public void testDebugLDAPResult8EnabledIncludeLDAP() throws Exception {
    Debug.setEnabled(true, EnumSet.of(DebugType.LDAP, DebugType.OTHER));
    testLogHandler.resetMessageCount();
    assertTrue(Debug.debugEnabled(DebugType.LDAP));
    Debug.debugLDAPResult(Level.FINEST, new IntermediateResponse("1.2.3.4", null));
    assertTrue(testLogHandler.getMessageCount() >= 1);
}
Also used : IntermediateResponse(com.unboundid.ldap.sdk.IntermediateResponse) Test(org.testng.annotations.Test)

Example 20 with IntermediateResponse

use of com.unboundid.ldap.sdk.IntermediateResponse in project ldapsdk by pingidentity.

the class DebugTestCase method testDebugLDAPResult8EnabledWithoutLDAP.

/**
 * Tests the eighth {@code debugLDAPResult} method with the debugger enabled
 * and a debug type set that does not include the LDAP type.
 *
 * @throws  Exception  If an unexpected problem occurs.
 */
@Test()
public void testDebugLDAPResult8EnabledWithoutLDAP() throws Exception {
    Debug.setEnabled(true, EnumSet.of(DebugType.OTHER));
    testLogHandler.resetMessageCount();
    assertFalse(Debug.debugEnabled(DebugType.LDAP));
    Debug.debugLDAPResult(Level.FINEST, new IntermediateResponse("1.2.3.4", null));
    assertTrue(testLogHandler.getMessageCount() >= 0);
}
Also used : IntermediateResponse(com.unboundid.ldap.sdk.IntermediateResponse) Test(org.testng.annotations.Test)

Aggregations

IntermediateResponse (com.unboundid.ldap.sdk.IntermediateResponse)56 ASN1OctetString (com.unboundid.asn1.ASN1OctetString)39 Test (org.testng.annotations.Test)37 EnumSet (java.util.EnumSet)19 Set (java.util.Set)19 ExtendedResult (com.unboundid.ldap.sdk.ExtendedResult)18 LDAPException (com.unboundid.ldap.sdk.LDAPException)18 ASN1Sequence (com.unboundid.asn1.ASN1Sequence)12 Control (com.unboundid.ldap.sdk.Control)11 LDAPResult (com.unboundid.ldap.sdk.LDAPResult)6 ASN1Enumerated (com.unboundid.asn1.ASN1Enumerated)5 ASN1Element (com.unboundid.asn1.ASN1Element)2 AddRequest (com.unboundid.ldap.sdk.AddRequest)2 BindResult (com.unboundid.ldap.sdk.BindResult)2 Entry (com.unboundid.ldap.sdk.Entry)2 SearchResultReference (com.unboundid.ldap.sdk.SearchResultReference)2 AddRequestProtocolOp (com.unboundid.ldap.protocol.AddRequestProtocolOp)1 IntermediateResponseProtocolOp (com.unboundid.ldap.protocol.IntermediateResponseProtocolOp)1 CompareRequest (com.unboundid.ldap.sdk.CompareRequest)1 DeleteRequest (com.unboundid.ldap.sdk.DeleteRequest)1