Search in sources :

Example 6 with LDIFDeleteChangeRecord

use of com.unboundid.ldif.LDIFDeleteChangeRecord in project ldapsdk by pingidentity.

the class DebugTestCase method testDebugLDIFWrite4EnabledIncludeLDIF.

/**
 * Tests the fourth {@code debugLDIFWrite} method with the debugger enabled
 * and a debug type set that includes the LDIF type among others.
 *
 * @throws  Exception  If an unexpected problem occurs.
 */
@Test()
public void testDebugLDIFWrite4EnabledIncludeLDIF() throws Exception {
    Debug.setEnabled(true, EnumSet.of(DebugType.LDIF, DebugType.OTHER));
    testLogHandler.resetMessageCount();
    assertTrue(Debug.debugEnabled(DebugType.LDIF));
    Debug.debugLDIFWrite(Level.FINEST, new LDIFDeleteChangeRecord("dc=example,dc=com"));
    assertTrue(testLogHandler.getMessageCount() >= 1);
}
Also used : LDIFDeleteChangeRecord(com.unboundid.ldif.LDIFDeleteChangeRecord) Test(org.testng.annotations.Test)

Example 7 with LDIFDeleteChangeRecord

use of com.unboundid.ldif.LDIFDeleteChangeRecord in project ldapsdk by pingidentity.

the class DebugTestCase method testDebugLDIFRead2EnabledOnlyLDIF.

/**
 * Tests the second {@code debugLDIFRead} method with the debugger enabled
 * and a debug type set that includes only the LDIF type.
 *
 * @throws  Exception  If an unexpected problem occurs.
 */
@Test()
public void testDebugLDIFRead2EnabledOnlyLDIF() throws Exception {
    Debug.setEnabled(true, EnumSet.of(DebugType.LDIF));
    testLogHandler.resetMessageCount();
    assertTrue(Debug.debugEnabled(DebugType.LDIF));
    Debug.debugLDIFRead(new LDIFDeleteChangeRecord("dc=example,dc=com"));
    assertTrue(testLogHandler.getMessageCount() >= 1);
}
Also used : LDIFDeleteChangeRecord(com.unboundid.ldif.LDIFDeleteChangeRecord) Test(org.testng.annotations.Test)

Example 8 with LDIFDeleteChangeRecord

use of com.unboundid.ldif.LDIFDeleteChangeRecord in project ldapsdk by pingidentity.

the class DebugTestCase method testDebugLDIFRead4EnabledIncludeLDIF.

/**
 * Tests the fourth {@code debugLDIFRead} method with the debugger enabled
 * and a debug type set that includes the LDIF type among others.
 *
 * @throws  Exception  If an unexpected problem occurs.
 */
@Test()
public void testDebugLDIFRead4EnabledIncludeLDIF() throws Exception {
    Debug.setEnabled(true, EnumSet.of(DebugType.LDIF, DebugType.OTHER));
    testLogHandler.resetMessageCount();
    assertTrue(Debug.debugEnabled(DebugType.LDIF));
    Debug.debugLDIFRead(Level.FINEST, new LDIFDeleteChangeRecord("dc=example,dc=com"));
    assertTrue(testLogHandler.getMessageCount() >= 1);
}
Also used : LDIFDeleteChangeRecord(com.unboundid.ldif.LDIFDeleteChangeRecord) Test(org.testng.annotations.Test)

Example 9 with LDIFDeleteChangeRecord

use of com.unboundid.ldif.LDIFDeleteChangeRecord in project ldapsdk by pingidentity.

the class DebugTestCase method testDebugLDIFRead2EnabledAll.

/**
 * Tests the second {@code debugLDIFRead} method with the debugger enabled
 * and a debug type set of all types.
 *
 * @throws  Exception  If an unexpected problem occurs.
 */
@Test()
public void testDebugLDIFRead2EnabledAll() throws Exception {
    Debug.setEnabled(true);
    testLogHandler.resetMessageCount();
    assertTrue(Debug.debugEnabled(DebugType.LDIF));
    Debug.debugLDIFRead(new LDIFDeleteChangeRecord("dc=example,dc=com"));
    assertTrue(testLogHandler.getMessageCount() >= 1);
}
Also used : LDIFDeleteChangeRecord(com.unboundid.ldif.LDIFDeleteChangeRecord) Test(org.testng.annotations.Test)

Example 10 with LDIFDeleteChangeRecord

use of com.unboundid.ldif.LDIFDeleteChangeRecord in project ldapsdk by pingidentity.

the class DebugTestCase method testDebugLDIFRead4EnabledAll.

/**
 * Tests the fourth {@code debugLDIFRead} method with the debugger enabled
 * and a debug type set of all types.
 *
 * @throws  Exception  If an unexpected problem occurs.
 */
@Test()
public void testDebugLDIFRead4EnabledAll() throws Exception {
    Debug.setEnabled(true);
    testLogHandler.resetMessageCount();
    assertTrue(Debug.debugEnabled(DebugType.LDIF));
    Debug.debugLDIFRead(Level.FINEST, new LDIFDeleteChangeRecord("dc=example,dc=com"));
    assertTrue(testLogHandler.getMessageCount() >= 1);
}
Also used : LDIFDeleteChangeRecord(com.unboundid.ldif.LDIFDeleteChangeRecord) Test(org.testng.annotations.Test)

Aggregations

LDIFDeleteChangeRecord (com.unboundid.ldif.LDIFDeleteChangeRecord)67 Test (org.testng.annotations.Test)58 LDIFAddChangeRecord (com.unboundid.ldif.LDIFAddChangeRecord)29 LDIFChangeRecord (com.unboundid.ldif.LDIFChangeRecord)20 LDIFModifyChangeRecord (com.unboundid.ldif.LDIFModifyChangeRecord)18 LDIFModifyDNChangeRecord (com.unboundid.ldif.LDIFModifyDNChangeRecord)17 Calendar (java.util.Calendar)17 GregorianCalendar (java.util.GregorianCalendar)17 Entry (com.unboundid.ldap.sdk.Entry)10 Attribute (com.unboundid.ldap.sdk.Attribute)9 ModifyRequest (com.unboundid.ldap.sdk.ModifyRequest)9 ReadOnlyEntry (com.unboundid.ldap.sdk.ReadOnlyEntry)9 DN (com.unboundid.ldap.sdk.DN)7 LDAPException (com.unboundid.ldap.sdk.LDAPException)6 File (java.io.File)5 Schema (com.unboundid.ldap.sdk.schema.Schema)4 Nullable (com.unboundid.util.Nullable)4 ASN1OctetString (com.unboundid.asn1.ASN1OctetString)3 ChangeLogEntry (com.unboundid.ldap.sdk.ChangeLogEntry)3 Modification (com.unboundid.ldap.sdk.Modification)3