use of org.apache.directory.api.ldap.model.subtree.SubtreeSpecification in project directory-ldap-api by apache.
the class SubtreeSpecificationParserTest method testSpecWithEmptySpecificExclusions.
/**
* Tests the parser with a valid specification with an empty specific
* exclusions set.
*/
@Test
public void testSpecWithEmptySpecificExclusions() throws Exception {
SubtreeSpecification ss = parser.parse(SPEC_WITH_EMPTY_SPECIFICEXCLUSIONS);
assertNotNull(ss);
assertTrue(ss.getChopBeforeExclusions().isEmpty());
}
use of org.apache.directory.api.ldap.model.subtree.SubtreeSpecification in project directory-ldap-api by apache.
the class SubtreeSpecificationParserTest method testWithBaseAndMinimumAndMaximum.
/**
* Tests the parser with a valid specification with base and minimum and
* maximum set.
*/
@Test
public void testWithBaseAndMinimumAndMaximum() throws Exception {
SubtreeSpecification ss = parser.parse(SPEC_WITH_BASE_AND_MINIMUM_AND_MAXIMUM);
assertEquals(new Dn("ou=ORGANIZATION UNIT").getName(), ss.getBase().getName());
assertEquals(1, ss.getMinBaseDistance());
assertEquals(2, ss.getMaxBaseDistance());
}
use of org.apache.directory.api.ldap.model.subtree.SubtreeSpecification in project directory-ldap-api by apache.
the class SubtreeSpecificationParserTest method testSpecOrderOfComponentsDoesNotMatter.
/**
* Tests the parser with a valid specification with unordinary component
* order.
*/
@Test
public void testSpecOrderOfComponentsDoesNotMatter() throws Exception {
SubtreeSpecification ss = parser.parse(SPEC_ORDER_OF_COMPONENTS_DOES_NOT_MATTER);
assertNotNull(ss);
}
Aggregations