| | |
| | | } |
| | | |
| | | @Test(dependsOnMethods = "testAdd") |
| | | public void testNumSubordinates() throws Exception |
| | | { |
| | | DN dn = DN.decode("dc=test,dc=com"); |
| | | assertEquals(backend.numSubordinates(dn), 1); |
| | | dn = DN.decode("ou=People,dc=test,dc=com"); |
| | | assertEquals(backend.numSubordinates(dn), 12); |
| | | dn = DN.decode("dc=com"); |
| | | assertEquals(backend.numSubordinates(dn), -1); |
| | | dn = DN.decode("dc=test1,dc=com"); |
| | | assertEquals(backend.numSubordinates(dn), 2); |
| | | dn = DN.decode("uid=user.10,ou=People,dc=test,dc=com"); |
| | | assertEquals(backend.numSubordinates(dn), 0); |
| | | dn = DN.decode("uid=does not exist,ou=People,dc=test,dc=com"); |
| | | assertEquals(backend.numSubordinates(dn), -1); |
| | | } |
| | | |
| | | @Test(dependsOnMethods = "testAdd") |
| | | public void testSearchIndex() throws Exception { |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | |
| | | |
| | | @Test(dependsOnMethods = {"testAdd", "testSearchIndex", |
| | | "testSearchScope", "testSearchNotIndexed", "testModifyDNNewSuperior", |
| | | "testMatchedDN"}) |
| | | "testMatchedDN", "testNumSubordinates", |
| | | "testNumSubordinatesIndexEntryLimitExceeded"}) |
| | | public void testDeleteSubtree() throws Exception { |
| | | Control control = new Control(OID_SUBTREE_DELETE_CONTROL, false); |
| | | ArrayList<Control> deleteSubTreeControl = new ArrayList<Control>(); |
| | |
| | | } |
| | | |
| | | @Test(dependsOnMethods = {"testSearchNotIndexed", "testAdd", |
| | | "testSearchIndex", "testSearchScope", "testMatchedDN"}) |
| | | "testSearchIndex", "testSearchScope", "testMatchedDN", |
| | | "testNumSubordinates", "testNumSubordinatesIndexEntryLimitExceeded"}) |
| | | public void testReplaceEntry() throws Exception { |
| | | Entry entry; |
| | | Entry oldEntry; |
| | |
| | | } |
| | | |
| | | @Test(dependsOnMethods = {"testSearchNotIndexed", "testAdd", |
| | | "testSearchIndex", "testSearchScope", "testMatchedDN"}) |
| | | "testSearchIndex", "testSearchScope", "testMatchedDN", |
| | | "testNumSubordinates", "testNumSubordinatesIndexEntryLimitExceeded"}) |
| | | public void testModifyEntry() throws Exception { |
| | | Entry entry; |
| | | Entry newEntry; |
| | |
| | | |
| | | @Test(dependsOnMethods = {"testSearchNotIndexed", "testAdd", "testSearchIndex", |
| | | "testSearchScope", "testModifyEntry", "testModifyDN", "testReplaceEntry", |
| | | "testDeleteEntry", "testMatchedDN"}) |
| | | "testDeleteEntry", "testMatchedDN", "testNumSubordinates", |
| | | "testNumSubordinatesIndexEntryLimitExceeded"}) |
| | | public void testModifyDNNewSuperior() throws Exception { |
| | | //Add the new superior entry we want to move to. Test to see if the child ID |
| | | //always above parent invarient is preseved. |
| | |
| | | |
| | | } |
| | | |
| | | @Test(dependsOnMethods = "testSearchNotIndexed") |
| | | public void testNumSubordinatesIndexEntryLimitExceeded() throws Exception |
| | | { |
| | | DN dn = DN.decode("dc=test,dc=com"); |
| | | assertEquals(backend.numSubordinates(dn), 1); |
| | | |
| | | // 1 entry was deleted and 2 added for a total of 13 |
| | | dn = DN.decode("ou=People,dc=test,dc=com"); |
| | | assertEquals(backend.numSubordinates(dn), 13); |
| | | dn = DN.decode("dc=com"); |
| | | assertEquals(backend.numSubordinates(dn), -1); |
| | | dn = DN.decode("dc=test1,dc=com"); |
| | | assertEquals(backend.numSubordinates(dn), 2); |
| | | dn = DN.decode("uid=user.10,ou=People,dc=test,dc=com"); |
| | | assertEquals(backend.numSubordinates(dn), 0); |
| | | dn = DN.decode("uid=does not exist,ou=People,dc=test,dc=com"); |
| | | assertEquals(backend.numSubordinates(dn), -1); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Provides a set of DNs for the matched DN test case. |