ALF-588: MT - delete tenant requires deleteStore

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22230 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2010-09-03 13:09:31 +00:00
parent c1068b0b0c
commit 7c79fcea58
7 changed files with 98 additions and 8 deletions

View File

@@ -463,6 +463,31 @@ public abstract class BaseNodeServiceTest extends BaseSpringTest
assertTrue("New store not present is list of stores", storeRefs.contains(storeRef));
}
public void testDeleteStore() throws Exception
{
StoreRef storeRef = createStore();
// get all stores
List<StoreRef> storeRefs = nodeService.getStores();
// check that the store ref is present
assertTrue("New store not present is list of stores", storeRefs.contains(storeRef));
// Delete it
nodeService.deleteStore(storeRef);
storeRefs = nodeService.getStores();
assertFalse("Deleted store should not present is list of stores", storeRefs.contains(storeRef));
// Now make sure that none of the stores have the "deleted" protocol
for (StoreRef retrievedStoreRef : storeRefs)
{
if (retrievedStoreRef.getProtocol().equals(StoreRef.PROTOCOL_DELETED))
{
fail("NodeService should not have returned 'deleted' stores." + storeRefs);
}
}
// Commit to ensure all is well
setComplete();
endTransaction();
}
public void testExists() throws Exception
{
StoreRef storeRef = createStore();