use of com.unboundid.asn1.ASN1Null in project ldapsdk by pingidentity.
the class DebugTestCase method testDebugASN1Read1EnabledOnlyASN1.
/**
* Tests the first {@code debugASN1Read} method with the debugger enabled
* and a debug type set that includes only the ASN.1 type.
*
* @throws Exception If an unexpected problem occurs.
*/
@Test()
public void testDebugASN1Read1EnabledOnlyASN1() throws Exception {
Debug.setEnabled(true, EnumSet.of(DebugType.ASN1));
testLogHandler.resetMessageCount();
assertTrue(Debug.debugEnabled(DebugType.ASN1));
Debug.debugASN1Read(new ASN1Null());
assertTrue(testLogHandler.getMessageCount() >= 1);
}
use of com.unboundid.asn1.ASN1Null in project ldapsdk by pingidentity.
the class DebugTestCase method testDebugASN1Write1EnabledWithoutASN1.
/**
* Tests the first {@code debugASN1Write} method with the debugger enabled
* and a debug type set that does not include the ASN.1 type.
*
* @throws Exception If an unexpected problem occurs.
*/
@Test()
public void testDebugASN1Write1EnabledWithoutASN1() throws Exception {
Debug.setEnabled(true, EnumSet.of(DebugType.OTHER));
testLogHandler.resetMessageCount();
assertFalse(Debug.debugEnabled(DebugType.ASN1));
Debug.debugASN1Write(new ASN1Null());
assertTrue(testLogHandler.getMessageCount() >= 0);
}
use of com.unboundid.asn1.ASN1Null in project ldapsdk by pingidentity.
the class PasswordValidationDetailsResponseControlTestCase method testDecodeControlInvalidValidationResponseType.
/**
* Tests the behavior when trying to decode a control whose value contains an
* invalid validation response type.
*
* @throws Exception If an unexpected problem occurs.
*/
@Test(expectedExceptions = { LDAPException.class })
public void testDecodeControlInvalidValidationResponseType() throws Exception {
final ASN1Sequence valueSequence = new ASN1Sequence(new ASN1Null((byte) 0x12));
new PasswordValidationDetailsResponseControl().decodeControl("1.3.6.1.4.1.30221.2.5.41", false, new ASN1OctetString(valueSequence.encode()));
}
use of com.unboundid.asn1.ASN1Null in project ldapsdk by pingidentity.
the class DebugTestCase method testDebugASN1Read2EnabledAll.
/**
* Tests the second {@code debugASN1Read} method with the debugger enabled
* and a debug type set of all types.
*
* @throws Exception If an unexpected problem occurs.
*/
@Test()
public void testDebugASN1Read2EnabledAll() throws Exception {
Debug.setEnabled(true);
testLogHandler.resetMessageCount();
assertTrue(Debug.debugEnabled(DebugType.ASN1));
Debug.debugASN1Read(Level.FINEST, new ASN1Null());
assertTrue(testLogHandler.getMessageCount() >= 1);
}
use of com.unboundid.asn1.ASN1Null in project ldapsdk by pingidentity.
the class DebugTestCase method testDebugASN1Write2EnabledOnlyASN1.
/**
* Tests the second {@code debugASN1Write} method with the debugger enabled
* and a debug type set that includes only the ASN.1 type.
*
* @throws Exception If an unexpected problem occurs.
*/
@Test()
public void testDebugASN1Write2EnabledOnlyASN1() throws Exception {
Debug.setEnabled(true, EnumSet.of(DebugType.ASN1));
testLogHandler.resetMessageCount();
assertTrue(Debug.debugEnabled(DebugType.ASN1));
Debug.debugASN1Write(Level.FINEST, new ASN1Null());
assertTrue(testLogHandler.getMessageCount() >= 1);
}
Aggregations