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,15 +19,8 @@
package org.alfresco.repo.publishing;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertTrue;
import java.util.Map;
import javax.annotation.Resource;
import org.alfresco.service.cmr.publishing.PublishingService;
import org.alfresco.service.cmr.repository.NodeRef;
import org.junit.Test;
@@ -47,21 +40,10 @@ public class EnvironmentHelperTest extends AbstractPublishingIntegrationTest
environmentHelper = (EnvironmentHelper) getApplicationContext().getBean("environmentHelper");
}
@Test
public void testGetEnvironments() throws Exception
{
Map<String, NodeRef> environments = environmentHelper.getEnvironments(siteId);
assertTrue(environments.size() == 1);
NodeRef liveEnvironment = environments.get(PublishingService.LIVE_ENVIRONMENT_NAME);
assertNotNull(liveEnvironment);
assertTrue(nodeService.exists(liveEnvironment));
assertEquals(PublishingModel.TYPE_ENVIRONMENT, nodeService.getType(liveEnvironment));
}
@Test
public void testGetEnvironmentByName() throws Exception
{
NodeRef liveEnvironment = environmentHelper.getEnvironment(siteId, PublishingService.LIVE_ENVIRONMENT_NAME);
NodeRef liveEnvironment = environmentHelper.getEnvironment(siteId);
assertNotNull(liveEnvironment);
assertTrue(nodeService.exists(liveEnvironment));
assertEquals(PublishingModel.TYPE_ENVIRONMENT, nodeService.getType(liveEnvironment));
@@ -70,7 +52,7 @@ public class EnvironmentHelperTest extends AbstractPublishingIntegrationTest
@Test
public void testGetPublishingQueue() throws Exception
{
NodeRef liveEnvironment = environmentHelper.getEnvironment(siteId, PublishingService.LIVE_ENVIRONMENT_NAME);
NodeRef liveEnvironment = environmentHelper.getEnvironment(siteId);
NodeRef publishingQueue = environmentHelper.getPublishingQueue(liveEnvironment);
assertNotNull(publishingQueue);
assertTrue(nodeService.exists(publishingQueue));