use of org.apache.directory.api.ldap.model.url.LdapUrl in project directory-ldap-api by apache.
the class LdapUrlTest method testLdapURLDNNoAttrsScope.
/**
* test a LdapUrl with a Dn, no attributes an scope
*/
@Test
public void testLdapURLDNNoAttrsScope() throws LdapURLEncodingException {
LdapUrl url = new LdapUrl("ldap://localhost:123/ou=system??sub");
assertEquals("ldap://localhost:123/ou=system??sub", url.toString());
}
use of org.apache.directory.api.ldap.model.url.LdapUrl in project directory-ldap-api by apache.
the class LdapUrlTest method testLdapURLDNNoAttrsScopeFilterExtension.
/**
* test a LdapUrl with a Dn, no attributes, a scope, a filter and some extensions
*/
@Test
public void testLdapURLDNNoAttrsScopeFilterExtension() throws LdapURLEncodingException {
LdapUrl url = new LdapUrl("ldap://localhost:123/ou=system??sub?(cn=test)?!a=b,!c");
assertEquals("ldap://localhost:123/ou=system??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 testLdapURLDNNoAttrsNoScopeFilter.
/**
* test a LdapUrl with a Dn, no attributes, no scope and filter
*/
@Test
public void testLdapURLDNNoAttrsNoScopeFilter() throws LdapURLEncodingException {
LdapUrl url = new LdapUrl("ldap://localhost:123/ou=system???(cn=test)");
assertEquals("ldap://localhost:123/ou=system???(cn=test)", url.toString());
}
use of org.apache.directory.api.ldap.model.url.LdapUrl in project directory-ldap-api by apache.
the class LdapUrlTest method testLdapURLDNAttrs.
/**
* test a LdapUrl with a Dn and attributes
*/
@Test
public void testLdapURLDNAttrs() throws LdapURLEncodingException {
LdapUrl url = new LdapUrl("ldap://localhost:123/ou=system?ou,dc,cn");
assertEquals("ldap://localhost:123/ou=system?ou,dc,cn", url.toString());
}
use of org.apache.directory.api.ldap.model.url.LdapUrl in project directory-ldap-api by apache.
the class LdapUrlTest method testLdapURLDNAttrsNoScopeFilterExtension.
/**
* test a LdapUrl with a Dn, some attributes, no scope, a filter and some extensions
*/
@Test
public void testLdapURLDNAttrsNoScopeFilterExtension() throws LdapURLEncodingException {
LdapUrl url = new LdapUrl("ldap://localhost:123/ou=system?cn,ou,dc??(cn=test)?!a=b,!c");
assertEquals("ldap://localhost:123/ou=system?cn,ou,dc??(cn=test)?!a=b,!c", url.toString());
}
Aggregations