Removed Environment from the Publishing Foundation API.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28957 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
N Smith
2011-07-12 14:41:36 +00:00
parent 8e3b855dea
commit db158066a0
23 changed files with 164 additions and 311 deletions

View File

@@ -19,11 +19,6 @@
package org.alfresco.repo.publishing;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertNull;
import static junit.framework.Assert.assertTrue;
import static junit.framework.Assert.fail;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@@ -92,12 +87,9 @@ public class ChannelServiceImplIntegratedTest extends AbstractPublishingIntegrat
assertEquals(channelName, channel.getName());
assertTrue(nodeService.exists(channel.getNodeRef()));
Map<String, NodeRef> environments = environmentHelper.getEnvironments(siteId);
assertTrue(environments.size() > 0);
for (NodeRef envNodeRef : environments.values())
{
assertNotNull(nodeService.getChildByName(envNodeRef, ContentModel.ASSOC_CONTAINS, channelName));
}
NodeRef environmentNode = environmentHelper.getEnvironment(siteId);
assertNotNull(environmentNode);
assertNotNull(nodeService.getChildByName(environmentNode, ContentModel.ASSOC_CONTAINS, channelName));
}
@Test
@@ -110,12 +102,9 @@ public class ChannelServiceImplIntegratedTest extends AbstractPublishingIntegrat
List<Channel> channels = channelService.getChannels(siteId);
assertTrue(channels.isEmpty());
Map<String, NodeRef> environments = environmentHelper.getEnvironments(siteId);
assertTrue(environments.size() > 0);
for (NodeRef envNodeRef : environments.values())
{
assertNull(nodeService.getChildByName(envNodeRef, ContentModel.ASSOC_CONTAINS, channelName));
}
NodeRef environmentNode = environmentHelper.getEnvironment(siteId);
assertNotNull(environmentNode);
assertNull(nodeService.getChildByName(environmentNode, ContentModel.ASSOC_CONTAINS, channelName));
}
@Test
@@ -131,13 +120,10 @@ public class ChannelServiceImplIntegratedTest extends AbstractPublishingIntegrat
assertEquals(1, channels.size());
Channel channel = channels.get(0);
assertEquals(newChannelName, channel.getName());
Map<String, NodeRef> environments = environmentHelper.getEnvironments(siteId);
assertTrue(environments.size() > 0);
for (NodeRef envNodeRef : environments.values())
{
assertNull(nodeService.getChildByName(envNodeRef, ContentModel.ASSOC_CONTAINS, channelName));
assertNotNull(nodeService.getChildByName(envNodeRef, ContentModel.ASSOC_CONTAINS, newChannelName));
}
NodeRef environmentNode = environmentHelper.getEnvironment(siteId);
assertNotNull(environmentNode);
assertNull(nodeService.getChildByName(environmentNode, ContentModel.ASSOC_CONTAINS, channelName));
assertNotNull(nodeService.getChildByName(environmentNode, ContentModel.ASSOC_CONTAINS, newChannelName));
}
@Test