use of org.apache.directory.api.ldap.model.url.LdapUrl in project directory-ldap-api by apache.
the class LdapUrlTest method testLdapURLDNAttrsScopeNoFilterExtension.
/**
* test a LdapUrl with a Dn, some attributes, a scope, no filter and some extensions
*/
@Test
public void testLdapURLDNAttrsScopeNoFilterExtension() throws LdapURLEncodingException {
LdapUrl url = new LdapUrl("ldap://localhost:123/ou=system?cn,ou,dc?sub??!a=b,!c");
assertEquals("ldap://localhost:123/ou=system?cn,ou,dc?sub??!a=b,!c", url.toString());
}
use of org.apache.directory.api.ldap.model.url.LdapUrl in project directory-ldap-api by apache.
the class LdapUrlTest method testLdapURLDNAttrsDefaultScope.
/**
* test a LdapUrl with a Dn, some attributes an default scope
*/
@Test
public void testLdapURLDNAttrsDefaultScope() throws LdapURLEncodingException {
LdapUrl url = new LdapUrl("ldap://localhost:123/ou=system?ou,cn?");
assertEquals("ldap://localhost:123/ou=system?ou,cn", url.toString());
}
use of org.apache.directory.api.ldap.model.url.LdapUrl in project directory-ldap-api by apache.
the class LdapUrlTest method testLdapURLNoDNAttrsScopeBaseNoFilterExtension.
/**
* test a LdapUrl with no Dn, some attributes, a base scope, no filter and some extensions
*/
@Test
public void testLdapURLNoDNAttrsScopeBaseNoFilterExtension() throws LdapURLEncodingException {
LdapUrl url = new LdapUrl("ldap://localhost:123/?cn,dc,ou?base??!a=b,!c");
assertEquals("ldap://localhost:123/?cn,dc,ou???!a=b,!c", url.toString());
}
use of org.apache.directory.api.ldap.model.url.LdapUrl in project directory-ldap-api by apache.
the class LdapUrlTest method testLdapURLNoDNAttrsScopeFilterExtension.
/**
* test a LdapUrl with no Dn, some attributes, a scope, a filter and some extensions
*/
@Test
public void testLdapURLNoDNAttrsScopeFilterExtension() throws LdapURLEncodingException {
LdapUrl url = new LdapUrl("ldap://localhost:123/?cn,dc,ou?sub?(cn=test)?!a=b,!c");
assertEquals("ldap://localhost:123/?cn,dc,ou?sub?(cn=test)?!a=b,!c", url.toString());
}
use of org.apache.directory.api.ldap.model.url.LdapUrl in project directory-ldap-api by apache.
the class LdapUrlTest method testLdapURLExtensionAfterEmptyExtension.
/**
* Test a LdapUrl with an extension after an empty extension.
*/
@Test
public void testLdapURLExtensionAfterEmptyExtension() throws LdapURLEncodingException {
LdapUrl url = new LdapUrl("ldap://localhost:123/????!a=b,!c,d=e");
assertEquals("ldap://localhost:123/????!a=b,!c,d=e", url.toString());
}
Aggregations