use of com.unboundid.ldap.sdk.ANONYMOUSBindRequest in project ldapsdk by pingidentity.
the class SASLUtilsTestCase method testANONYMOUSWithoutTrace.
/**
* Tests the ability to create an ANONYMOUS bind without the trace option.
*
* @throws Exception If an unexpected problem occurs.
*/
@Test()
public void testANONYMOUSWithoutTrace() throws Exception {
final BindRequest bindRequest = SASLUtils.createBindRequest(null, (String) null, null, "mech=ANONYMOUS");
assertNotNull(bindRequest);
assertTrue(bindRequest instanceof ANONYMOUSBindRequest);
final ANONYMOUSBindRequest anonymousBind = (ANONYMOUSBindRequest) bindRequest;
assertNull(anonymousBind.getTraceString());
}
use of com.unboundid.ldap.sdk.ANONYMOUSBindRequest in project ldapsdk by pingidentity.
the class SASLUtilsTestCase method testANONYMOUSWithTrace.
/**
* Tests the ability to create an ANONYMOUS bind with the trace option.
*
* @throws Exception If an unexpected problem occurs.
*/
@Test()
public void testANONYMOUSWithTrace() throws Exception {
final BindRequest bindRequest = SASLUtils.createBindRequest(null, (byte[]) null, null, "mech=ANONYMOUS", "trace=This is a test");
assertNotNull(bindRequest);
assertTrue(bindRequest instanceof ANONYMOUSBindRequest);
final ANONYMOUSBindRequest anonymousBind = (ANONYMOUSBindRequest) bindRequest;
assertNotNull(anonymousBind.getTraceString());
assertEquals(anonymousBind.getTraceString(), "This is a test");
}
use of com.unboundid.ldap.sdk.ANONYMOUSBindRequest in project ldapsdk by pingidentity.
the class SASLUtilsTestCase method testMechNotAsOption.
/**
* Tests the case in which the mechanism is specified as an argument rather
* than a SASL option.
*
* @throws Exception If an unexpected problem occurs.
*/
@Test()
public void testMechNotAsOption() throws Exception {
final BindRequest bindRequest = SASLUtils.createBindRequest(null, (String) null, "ANONYMOUS", (List<String>) null);
assertNotNull(bindRequest);
assertTrue(bindRequest instanceof ANONYMOUSBindRequest);
final ANONYMOUSBindRequest anonymousBind = (ANONYMOUSBindRequest) bindRequest;
assertNull(anonymousBind.getTraceString());
}
use of com.unboundid.ldap.sdk.ANONYMOUSBindRequest in project ldapsdk by pingidentity.
the class SASLUtilsTestCase method testMechOnlyAsOption.
/**
* Tests the case in which the mechanism is specified only as a SASL option.
*
* @throws Exception If an unexpected problem occurs.
*/
@Test()
public void testMechOnlyAsOption() throws Exception {
final BindRequest bindRequest = SASLUtils.createBindRequest(null, (String) null, null, "mech=ANONYMOUS");
assertNotNull(bindRequest);
assertTrue(bindRequest instanceof ANONYMOUSBindRequest);
final ANONYMOUSBindRequest anonymousBind = (ANONYMOUSBindRequest) bindRequest;
assertNull(anonymousBind.getTraceString());
}
use of com.unboundid.ldap.sdk.ANONYMOUSBindRequest in project ldapsdk by pingidentity.
the class SASLUtilsTestCase method testSameMechAsArgumentAndOption.
/**
* Tests the case in which the same mechanism is specified as both an argument
* and an option.
*
* @throws Exception If an unexpected problem occurs.
*/
@Test()
public void testSameMechAsArgumentAndOption() throws Exception {
final BindRequest bindRequest = SASLUtils.createBindRequest(null, (String) null, "ANONYMOUS", "mech=ANONYMOUS");
assertNotNull(bindRequest);
assertTrue(bindRequest instanceof ANONYMOUSBindRequest);
final ANONYMOUSBindRequest anonymousBind = (ANONYMOUSBindRequest) bindRequest;
assertNull(anonymousBind.getTraceString());
}
Aggregations