Search in sources :

Example 36 with LDIFDeleteChangeRecord

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

the class DebugTestCase method testDebugLDIFWrite4EnabledOnlyLDIF.

/**
 * Tests the fourth {@code debugLDIFWrite} 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 testDebugLDIFWrite4EnabledOnlyLDIF() throws Exception {
    Debug.setEnabled(true, EnumSet.of(DebugType.LDIF));
    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 37 with LDIFDeleteChangeRecord

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

the class DebugTestCase method testDebugLDIFWrite2EnabledIncludeLDIF.

/**
 * Tests the second {@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 testDebugLDIFWrite2EnabledIncludeLDIF() throws Exception {
    Debug.setEnabled(true, EnumSet.of(DebugType.LDIF, DebugType.OTHER));
    testLogHandler.resetMessageCount();
    assertTrue(Debug.debugEnabled(DebugType.LDIF));
    Debug.debugLDIFWrite(new LDIFDeleteChangeRecord("dc=example,dc=com"));
    assertTrue(testLogHandler.getMessageCount() >= 1);
}
Also used : LDIFDeleteChangeRecord(com.unboundid.ldif.LDIFDeleteChangeRecord) Test(org.testng.annotations.Test)

Example 38 with LDIFDeleteChangeRecord

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

the class DebugTestCase method testDebugLDIFRead4EnabledWithoutLDIF.

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

Example 39 with LDIFDeleteChangeRecord

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

the class DebugTestCase method testDebugLDIFWrite2EnabledAll.

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

Example 40 with LDIFDeleteChangeRecord

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

the class DebugTestCase method testDebugLDIFWrite2EnabledOnlyLDIF.

/**
 * Tests the second {@code debugLDIFWrite} 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 testDebugLDIFWrite2EnabledOnlyLDIF() throws Exception {
    Debug.setEnabled(true, EnumSet.of(DebugType.LDIF));
    testLogHandler.resetMessageCount();
    assertTrue(Debug.debugEnabled(DebugType.LDIF));
    Debug.debugLDIFWrite(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