| | |
| | | "postalAddress: {cn}${street}${l}, {st} {postalCode}", |
| | | "description: This is the description for {cn}.", |
| | | ""}; |
| | | // Add suffix and barnch entries |
| | | // Add suffix and branch entries |
| | | ldifNumberOfEntries += 2; |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | @Test |
| | | public void testAdd() throws Exception |
| | | { |
| | | addEntriesToBackend(topEntries); |
| | |
| | | assertTrue(backend.getEntry(oldEntry.getName()).hasValue(modifyAttribute, null, modifyValue)); |
| | | } |
| | | |
| | | @Test(dependsOnMethods = { "testAdd", "testRenameEntry", "testHasSubordinates" }) |
| | | @Test(dependsOnMethods = { "testAdd", "testRenameEntry", "testHasSubordinates", "testUtilityAPIs" }) |
| | | public void testDeleteEntry() throws Exception |
| | | { |
| | | deleteEntry(dnToDel); |
| | | } |
| | | |
| | | @Test(dependsOnMethods = "testDeleteEntry", expectedExceptions = DirectoryException.class) |
| | | @Test(dependsOnMethods = "testDeleteEntry") |
| | | public void testDeleteAlreadyDeletedEntry() throws Exception |
| | | { |
| | | try |
| | | { |
| | | deleteEntry(dnToDel); |
| | | fail("Should have generated a DirectoryException"); |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | // Expected exception, do nothing, test succeeds. |
| | | } |
| | | } |
| | | |
| | | private void deleteEntry(DN dn) throws Exception |