use of nl.nn.adapterframework.parameters.Parameter in project iaf by ibissource.
the class LdapSenderTest method deleteAttribute.
@Test
public void deleteAttribute() throws SAXException, IOException, ConfigurationException, SenderException, LDAPException {
String result;
LDAPConnection connection = inMemoryDirectoryServer.getConnection();
LdapSender ldapSender = null;
try {
ldapSender = new LdapSender();
ldapSender.setLdapProviderURL("ldap://" + connection.getConnectedAddress() + ":" + connection.getConnectedPort());
ldapSender.setOperation("delete");
Parameter parameter = new Parameter();
parameter.setName("entryName");
parameter.setValue("cn=LEA Administrator,ou=groups,ou=development," + baseDNs);
ldapSender.addParameter(parameter);
ldapSender.configure();
ldapSender.open();
result = ldapSender.sendMessage("dummy", "<attributes><attribute name=\"mail\"><value>leaadministrator@ibissource.org</value></attribute></attributes>");
} finally {
if (ldapSender != null) {
ldapSender.close();
}
if (connection != null) {
connection.close();
}
}
assertEquals("<LdapResult>Success</LdapResult>", result);
compareXML("Ldap/expected/delete.xml", getTree());
}
Aggregations