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